Write a program to in python to print your name five times
Answers
Answered by
41
Explanation:
for i in range(5):
print("your name")
Answered by
21
Required Answer:-
Question:
- Write a program in Python to print your name 5 times.
Solution:
Here comes the program.
1. Using loop.
for i in range(5):
print("My name is abcd.")
2. Without using loop.
print("My name is abcd.\n"*5)
When strings are multiplied with any number (n) , the new string formed becomes the original string repeated n times.
See the attachment for output ☑.
Attachments:
Similar questions