write a program to display multiples of 7 till 70
Answers
Answered by
2
Required Answer:-
Question:
- Write a program to display multiples of 7 till 70.
Solution:
Here comes the program. It is written in Python.
print("Multiples of 7 upto 70 are as follows: ")
for i in range(1,11):
print(7*i,end=" ")
Another approach,
print("Multiples of 7 are as follows.")
print(*[7*i for i in range(1, 11)])
Algorithm:
- Create a loop that iterates ten times.
- Multiply 7 with each number in the given range.
- Display the result.
Refer to the attachment.
Attachments:
Similar questions