Answered step by step
Verified Expert Solution
Link Copied!

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

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 ... 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

Income Tax Fundamentals 2013

Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill

31st Edition

1111972516, 978-1285586618, 1285586611, 978-1285613109, 978-1111972516

More Books

Students also viewed these Programming questions

Question

Brief the importance of span of control and its concepts.

Answered: 1 week ago

Question

What is meant by decentralisation?

Answered: 1 week ago

Question

Write down the Limitation of Beer - Lamberts law?

Answered: 1 week ago

Question

Discuss the Hawthorne experiments in detail

Answered: 1 week ago