Question: Q 1 . What is the output? x = 0 while x < 5 : print ( x ) x + = 1 Question 7

Q1.What is the output?
x =0
while x <5:
print(x)
x +=1
Question 7 options:
1234
0123
12345
01234 Q2. What is the value of x after the following code executes?
x =10
while x >5:
x -=2
Question 8 options:
6
4
10
5 q3. What is the functionality of the following code?
total =0
count =1
while count <=5:
total += count
count +=1
print(total)
Question 9 options:
Prints the value of count after the loop
Prints the sum of numbers from 1 to 5
Prints the product of numbers from 1 to 5
Raises an error Q4. What is the value of x after the following code executes?
num =10
while num >0:
print(num)
num -=3
Question 10 options:
10987654321
108642
10741
10

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Accounting Questions!