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

ano ang kahulugan ng bahaghari
1 1/3 times 2 1/2 middle school
what step must come first in the scientific method
it takes 8.0 seconds for 12 coulombs of charge to flow through a wire. how much current is flowing through it?
the protist known as an euglena is sometimes considered an animal-like protist and other times a plant-like-protist. Why would scientists classify it as an anim
Could you please provide the answer as well as explain it, I will be very grateful...
what type of website advocates an individual or group's opinion or point of view?
People with diabetes often receive insulin injections. What effect does insulin have on the body?
ano ang kahulugan ng bahaghari
you slide across a wooden floor in your socks. there is a normal force of 1033 n acting on you, and the coefficient of kinetic friction is 0.21. what is the for