Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Print user_num1 is negative. if user_num1 is less than 0. End with newline. Assign user_num2 with 5 if user_num2 is greater than 12. Otherwise,
Print "user_num1 is negative." if user_num1 is less than 0. End with newline. Assign user_num2 with 5 if user_num2 is greater than 12. Otherwise, print "user_num2 is less than or equal to 12.". End with newline. 1 user_num1 = int(input()) 2 user_num2 = int(input()) 3 4 5 if user_num1 < 0: 6 Your code goes here *** print("user_num1 is negative.") 7 if user_num2 >= 14: 8 user_num2 = 5 9 else: Check 10 11 12 print('user_num2 is', user_num2) 13 print("user_num2 is less than or equal to 12.") Try again X A possible solution uses an if statement for user_num1, and an if-else statement for user_num2. 1: Compare output Output differs. See highlights below. Special character legend X Your output Input Expected output 2: Compare output 3: Compare output Input Your output Input Your output 0 13 user_num2 is less than or equal to 12. user num2 is 134 user_num2 is 5 -1 12 user_num1 is negative. user_num2 is less than or equal to 12. user_num2 is 12 1 -2 2 user_num2 is less than or equal to 12. user_num2 is -2 2 Print "user_num1 is negative." if user_num1 is less than 0. End with newline. Assign user_num2 with 5 if user_num2 is greater than 12. Otherwise, print "user_num2 is less than or equal to 12.". End with newline. 1 user_num1 = int(input()) 2 user_num2 = int(input()) 3 4 5 if user_num1 < 0: 6 Your code goes here *** print("user_num1 is negative.") 7 if user_num2 >= 14: 8 user_num2 = 5 9 else: Check 10 11 12 print('user_num2 is', user_num2) 13 print("user_num2 is less than or equal to 12.") Try again X A possible solution uses an if statement for user_num1, and an if-else statement for user_num2. 1: Compare output Output differs. See highlights below. Special character legend X Your output Input Expected output 2: Compare output 3: Compare output Input Your output Input Your output 0 13 user_num2 is less than or equal to 12. user num2 is 134 user_num2 is 5 -1 12 user_num1 is negative. user_num2 is less than or equal to 12. user_num2 is 12 1 -2 2 user_num2 is less than or equal to 12. user_num2 is -2 2
Step by Step Solution
There are 3 Steps involved in it
Step: 1
C are mainpy 1 usernum1 intinput 2 usernum2 ...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started