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: 
Many of the responses here are way too complex for a very simple problem. The only issue with your code is that `num` is a string, not an integer. You cannot multiply two strings, thus this will throw `TypeError: can't multiple sequence by non-int of type 'str'`. The fix is simple, change the type:

```py
num = input('Enter a number: ')
print("_" * int(num))

```
Most likely the issue is you need to use `int(input("Enter a number: "))` instead of just `input`, to convert the input from a string to an integer.