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

is y= 1/4x-2 parallel or not?​
Explain how Concentrating Solar Power (CSP) technology works.
Air pressure doesn't crush you because molecules in air push_________.
In a fruit punch drink, the 3 ingredients are apple juice, orange juice and cranberry juice. If 3/4 of the drink is apple juice and 1/10 is orange juice then wr
Hankins, Inc., is considering a project that will result in initial aftertax cash savings of $6.3 million at the end of the first year, and these savings will g
what trophic level are insects in
Help me please thanks
Organisms can be classified in the same species by morphology and _____.
8x(11-4) divided by 2
Ms. Thompson went to buy socks for her Jordans. She brought $20 to the store. Each pair of scold costs $2.50. How many pairs of socks can she buy with $20?