Skip to content

Latest commit

 

History

History
14 lines (10 loc) · 471 Bytes

File metadata and controls

14 lines (10 loc) · 471 Bytes

Exercise 3

Calculate the total of all numbers which ends with 5 in the range 0...1000 and print it to the console using string formatting (Format: "The total of all numbers in the range 0...1000 is x.") Use for-loop and range(start,stop,step) function for it. Use f-strings or str.format() function to format the string.

Example

total = 0

# put your code here

print(f"The total of all numbers in the range 0...1000 is {total}.") # Total: 50000.