Question: please give the python code using if statement only. It compiler keep saying I have error but i ' m not sure where i '

please give the python code using if statement only. It compiler keep saying I have error but i'm not sure where i'm going wrong since it says assume that x was assigned a float. Please just solve this using if statement
I don't want any definitions or anything of the sort please. This is just begining programming to python and the chapter only deals with if statement in this section.
Question
Goal: Learn to use control flows to obtain conditional results.
Assignment: Assume the variable has been assigned a float. Write a piece of code that assigns the absolute value of to
value. You cannot use the built-in function abs.
1
if x 0:
\value = x*-1
reeaback - No use ot bullt-In
Feedback - Execution
More information
No output.
Feedback:
O? The expected value for 'value` was 0 but actual is 10
please give the python code using if statement

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!