Answer to Question #327972 in Python for sandhya

Question #327972

Tournament Training:

To prepare for the upcoming marthon.Ramesh trains one long distancerun each saturday .He considers a saturday to be a progress day if he runs more kilometers thsn the previous saturday Ramesh wants to track the no.of progress day

Given the no.of kilometer run by rsmesh on each aturday print the total no.of progress days

The 1st line of input contains space-seperated integers

i/p:

12 11 10 12 11 13

o/p:2

i/p:1 2 1 1 1

o/p:1


1
Expert's answer
2022-04-12T16:15:03-0400
print("Please, enter integer separated by a space: ", end='')
number = input().split(' ')
number = [int(i) for i in number]
count = 0
for i in range(1, len(number)):
    if number[i] > number[i-1]:
        count += 1
print("Total progress days: " + str(count))

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS