write a program to print the square of numbers between 10 to 20 in python
Answers
Answered by
14
Answer:
This is the required program for the question in Python 3.
print("Square of numbers between 10 to 20 are...")
for i in range(11, 20):
print(i*i, end=" ")
One liner:
print("Square of numbers between 10 to 20 are...","\n"," ".join(str(i*i) for i in range(11,20)))
Algorithm:
- START.
- Iterate a loop in the range I = 11 to 19.
- Display the value of I².
- STOP.
See the attachment for output ☑.
Attachments:
Similar questions