Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Note: Using print ( ) with end = ' ' causes the output to end without a detault newine. input _ count input ( )
Note: Using print with end causes the output to end without a detault newine.
inputcount input
traveledlist
for i in rangeinputcount:
traveledlist.appendinput
printfList has inputcount elements:
for value in traveledlist:
printfvalue end
# Print newline to end the line
print
For input:
Georgia
Washington
inputcount is assigned with Then, two values Georgia and 'Washington' are read from input into traveledlist.
'List has elements: is output. For each value in traveledlist, is output, followed by the value and Thus, the output is:
List has elements:
GeorgiaWashington
Not all tests passed.
: Compare output
Output is nearly correct, but whitespace differs. See highlights below. Special character legend
Input
Georgia
Washington
Your output List has elements:
GeorgiaWashington
Expected output
List has elements:
GeorgiaWashington
: Compare output
Output is nearly correct, but whitespace differs. See highlights below. Special character legend
I CANT GET THE SPACING RIGHT! PLEASE HELP
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started