I am in an intro to programming class which is using zyBooks so I'm not sure (due to the way this interpreter works) if my problem is just me doing something stupid or just not working properly with the zyBooks thing.
Its asking me to do a basic user input string. These are the instructions:
Assign user_str with a string from user input, with the prompt: 'Enter a string: '
Hint -- Replace the ? in the following code: user_str = ?('Enter a string: ')
I believe i've followed the instructions its given me but I'm getting this error. Thanks for any help!!!
1
2 '''Your Solution Goes here '''
3 user_str = int(input'Enter a string: '))
4 print()
5
6 print(user_str)
The error I'm getting:
Exited with return code 1
Traceback (most recent call last):
File "main.py", line 3, in <module>
user_str = int(input('Enter a string: '))
ValueError: invalid literal for int() with base 10: 'Hello!'
user_str = input('Enter a string: ')