Question: follow directions and add the two lines for this python. Exercise 3 1 ####This code is partially written for you, you need to add two
Exercise 3 1 ####This code is partially written for you, you need to add two lines only: ##This program should do the following: ##1. Ask the user to enter a number and save it in userNum. ##2. Convert the value of userNum to 1, only if it is negative. ##3. Display user Num. user Num = int(input("enter a number:")) #Your solution goes here print(userNum) ##sample run 1 ##enter a number: 0 ##0 ## ##sample run 2 ##enter a number: 7 ##7 ## ##sample run 3 ##enter a number: -9 ##1
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
