- 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 46 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
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
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
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)