Question: My friend and I recently started learning python and we have a task that the both of us are struggling with. The task involves getting a number from the user and printing that many underscores. Example: user entered 8, the the code will print 8 underscores in one line. My code is

```
num = input('Enter a number: ')

```

after that, to make it print the underscores I thought it would be something like

```
print('_'*num)

```

I tried many variations of that and suggestions from the internet but I still can't get it to work without a syntax error. My friend and I are both very stuck on this, any help appreciated. Feel free to ask questions, I found this hard to explain since I'm new to this.

Answer: 
This is what you are looking for:

```
i = input("Enter the number: ")  # get input from user
character = "_"
for x in range(int(i)):
    print(character, end="")  # repeat print the specified character. end="" ensurer that all is in one line

```
`for i in (0, userinput): print('hello world', end = ')`
end = is for no newline