Reputation: 43
I am trying to make a program which takes a number as input, and the outputs this many as # symbols. I got as far as -
Hash = input(“Enter a number? “)
But I dont know how to use that input to display the # that many times. E.g.
Enter a number? 6
(printed)######
Can anyone tell me how I can do this?
Upvotes: 0
Views: 299
Reputation: 1
Remember to indent this properly You can use:
Hash=int(input("Please enter a number: "))
for each in hash:
print("#")
Upvotes: 0
Reputation: 1399
This simple code will give the result you want.
n=int(input(“Enter a number? “))
print('#'*n)
Upvotes: 0