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

A fair coin is tossed 100 times. What is the probability that more than 55 heads are observed?
Which statement is always true for a square, but not always true for a rhombus? - Two angles are obtuse. - All sides are equal. - Two or more angles are ri
A speech on "books are the best companions".
What does advancement via individual determination mean ?
using exactly four 4's and any operations[+,-,x,/,()] write an expression to equal each of the following:345
When do we use passive voice?
Make short dialog based on these situations. Use can , can't ,will ,and won't !!! 1.Your friends arrive at your place in the middle of the day. They are very th
which types of laws does judasim uphold?
Make short dialog based on these situations. Use can , can't ,will ,and won't !!! 1.Your friends arrive at your place in the middle of the day. They are very th
8 1/5 - 3 4/10= show your work