Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

PARTICIPATION ACTIVITY 5 . 2 . 5 : While loop iterations. What is the output of the following code? ( Use IL for

PARTICIPATION ACTIVITY
5.2.5: While loop iterations.
What is the output of the following code? (Use "IL" for infinite loops.)
1)
x =0
while x >0:
print(x, end='')
x = x -1
print('Bye')
Check
Show answer
2)
x =5
y =18
while y >= x:
print(y, end='')
y = y - x
Check
Show answer
3)
x =10
while x !=3:
print(x, end='')
x = x /2
Check
Show answer
4)
x =1
y =3
z =5
while (not (y < x < z)):
print(x, end='')
x = x +1
Check
Show answer

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

Recommended Textbook for

Database Concepts

Authors: David Kroenke, David J. Auer

3rd Edition

0131986252, 978-0131986251

More Books

Students also viewed these Databases questions

Question

1. Identify three approaches to culture.

Answered: 1 week ago

Question

2. Define communication.

Answered: 1 week ago