subject

Convert the given for loop to while loop and find the output of the program assuming the value entered for num is 15.
num = int (input ("Enter a value"))
sum =0
count=0
for i in range (1, num):
if i%2 == 0:
count += 1
sum += i
print(sum)
print(count)

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 18:40
Johnson enterprises uses a computer to handle its sales invoices. lately, business has been so good that it takes an extra 3 hours per night, plus every third saturday, to keep up with the volume of sales invoices. management is considering updating its computer with a faster model that would eliminate all of the overtime processing.
Answers: 2
question
Computers and Technology, 24.06.2019 19:20
Which command suppresses the visibility of a particular row or column in a worksheet?
Answers: 1
question
Computers and Technology, 25.06.2019 04:00
Plz there is a problem with my account. i no longer have ! ( hand,ambitious,virtuoso etc.) it's like getting brainliest means nothing. how do i get ranks back?
Answers: 1
question
Computers and Technology, 25.06.2019 05:30
Website hosting servers have their own unique ip address, what does this address consist of? a. numbers and letters b. numbers c. letters d. letters and symbols
Answers: 2
You know the right answer?
Convert the given for loop to while loop and find the output of the program assuming the value ente...
Questions
question
Mathematics, 13.04.2021 02:20
question
Health, 13.04.2021 02:20
Questions on the website: 13722363