Question: Select the option that would change the code from question 2 . 1 to calculate and produced the described result: total _ divisible = 0

Select the option that would change the code from question 2.1 to calculate and produced the described result:
total_divisible =0
current_num =0
while current_num <10:
if current_num %2==0:
total_divisible = total_divisible +1
current_num = current_num +1
print(total_divisible)
Choice 1 of 6: Change the condition of the if statement
Choice 2 of 6: Use a for loop instead of a while loop
Choice 3 of 6: Fix the indentation
Choice 4 of 6: Change the condition of the while loop
Choice 5 of 6: Add an else to the if statement
Choice 6 of 6: None of these will work

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 Databases Questions!