alexhawj06
alexhawj06 alexhawj06
  • 17-11-2020
  • Computers and Technology
contestada

Ask the user for their full name (using a single input), write a section of code below that will correctly print the users first name and last name on separate lines.

Respuesta :

Cytokine
Cytokine Cytokine
  • 17-11-2020

name = input("Enter your name: ")

lst = name.split()

print(lst[0])

print(lst[1])

We split the name apart at the spaces and print out the object at index 0, which is the first name and at index 1, which is the last name.

I hope this helps!

Answer Link

Otras preguntas

*****PLEASE HELP QUESTION ATTACHED*****
________ is an on margin purchase. Answer A cash stock purchase Buying stock on credit. Buying goods on credit none of the above
why was Christianity important in Ancient Rome
What is a half of 4/5
22. The main difference between speed and velocity involves A. direction. B. weight. C. distance. D. gravity.
who heads the judicial branch
How did most people cook and heat their houses in the 1890s
Explain why you might not want to use the variables "x" or "o" when solving a word problem
In the modern US political system, what is the main system political parties use to nominate candidates? primary caucus general election party appointment
What is 2/3 minus 1/5 equals? Steps I need to show.