Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The square of a number, z , is given by . Read z from input as a float and compute z _ squared using the

The square of a number, z, is given by
. Read z from input as a float and compute z_squared using the formula.
Ex: If the input is 3.90, then the output is:
15.21
Note:
can be computed using *.
z-squared = float(input())
1
2
3
4
Check
Next level
For input 3.90, z is 3.90 and z_squared is computed by:
Not all tests passed.
1: Compare output
File "/home/runner/local/submission/student/main.py", line 2
z-squared = float(input())
^^^^^^^^^
SyntaxError: cannot assign to expression here. Maybe you meant '==' instead of '='?
Input
3.90
Your output
Your program produced no output
Expected output
15.21
2: Compare output
File "/home/runner/local/submission/student/main.py", line 2
z-squared = float(input())
^^^^^^^^^
SyntaxError: cannot assign to expression here. Maybe you meant '==' instead of '='?
Input
1.70
Your output
Your program produced no output
Expected output
2.89
3: Compare output
File "/home/runner/local/submission/student/main.py", line 2
z-squared = float(input())
^^^^^^^^^
SyntaxError: cannot assign to expression here. Maybe you meant '==' instead of '='?
Input
3.20
Your output
Your program produced no output
Expected output
10.24
4: Compare output
File "/home/runner/local/submission/student/main.py", line 2
z-squared = float(input())
^^^^^^^^^
SyntaxError: cannot assign to expression here. Maybe you meant '==' instead of '='?
Input
1.80
Your output
Your program produced no output
Expected output
3.24
1

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Ehs 2.0 Revolutionizing The Future Of Safety With Digital Technology

Authors: Tony Mudd

1st Edition

B0CN69B3HW, 979-8867463663

More Books

Students also viewed these Databases questions