0

Write a script that prints the multiples of 7 between 0 and 100. Print one multiple per line and avoid printing any numbers that aren't multiples of 7. Remember that 0 is also a multiple of 7.

def multiple(start, end):
    while start <= end:
        if start % 7 == 0:
            print (start)
        start = start + 1 
print(multiple(0,100))
SuperStormer
  • 4,531
  • 5
  • 20
  • 32
  • Note that you are returning None in `multiple` as there is no explicit return statement and printing it outside the function. Just call the function and not print it. And add a conditional statement inside the function to continue the loop when `start` is not a multiple of 7. – roksui Feb 11 '22 at 06:10

0 Answers0