val = int(input())
for x in range (0, val):
print('*',end='')
I want to get the answer input is 5 when
*****
*****
*****
*****
*****
How to do this???
val = int(input())
for x in range (0, val):
print('*',end='')
I want to get the answer input is 5 when
*****
*****
*****
*****
*****
How to do this???
Python is a bit weird, you can actually multiply your string by a number, and it will print the string that many times.
val = int(input())
for x in range (0, val):
print('*' * val)