Page 1 of 1

The following program outputs "The sum is 16". Modify line 6 so that the program will output "The sum is 12". 12 2 3 45

Posted: Fri Jul 08, 2022 6:38 am
by answerhappygod
The Following Program Outputs The Sum Is 16 Modify Line 6 So That The Program Will Output The Sum Is 12 12 2 3 45 1
The Following Program Outputs The Sum Is 16 Modify Line 6 So That The Program Will Output The Sum Is 12 12 2 3 45 1 (16.32 KiB) Viewed 47 times
The following program outputs "The sum is 16". Modify line 6 so that the program will output "The sum is 12". 12 2 3 45 6 7 8 9 10 sum = 0 number = 0 while number < 6: number += 1 if number == 2 or number: == 3: continue sum += number print("The sum is", sum)