Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I need help getting the correct outputs for 4.2.2: Basic while loop with user input. in zybooks. user_num = int(input()) while user_num>=1: print('Body') user_num =

I need help getting the correct outputs for 4.2.2: Basic while loop with user input. in zybooks.

user_num = int(input()) while user_num>=1:

print('Body') user_num = int(input())

print('Done.')

#user entry in line 2

Testing with inputs: 9 5 2 -1

Your output Body Body Body Done.

Testing with inputs: 0 -17 Output differs.

See highlights below. Special character

legend Your output Done.

Expected output Body Done.

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

Students also viewed these Databases questions