Assign userstr with a string from user input with the


How to Program with Python3

Assign user_str with a string from user input, with the prompt: 'Enter a string:n' 

Hint -- Replace the ? in the following code:user_str = ?('Enter a string:n')

Reminder: The "n" is a newline character that is not visible in the output and causes following output to appear on the next line. 

Note: These activities may test code with different test values. This activity will perform two tests: the first with user input of "Hello!", the second with user input of "3230 Main St.".

Write the codes below:

I was able to get the below for the first test done correctly (in line 2 and 3 below), but I can't figure out how to do the second one to run the way the system wants it to. Line 3 can't be changed.

2. user_str = ('Enter a string:nHello!')

3. print(user_str)

Solution Preview :

Prepared by a verified Expert
Basic Computer Science: Assign userstr with a string from user input with the
Reference No:- TGS02658777

Now Priced at $10 (50% Discount)

Recommended (95%)

Rated (4.7/5)