Question: #Type in this code below, complete the lines / code where asked. Answer all questions in the code. name = input ( Please enter

#Type in this code below, complete the lines/code where asked. Answer all questions
in the code.
name = input("Please enter your first name: ")
print(name)
length = len(name)
print("The length of this name is: ",length)
fi = name[0]
print("The first initial is: ",fi)
print("The second to the last letter of the string is: ", name[length-1])
#What is happening with the above statement? Why?
#Re-write the above line to correctly display the second to last letter of the string
segment = name[1:3]
print(segment)
#What does the first number represent? What does second number represent?
#Use different first and second numbers and observer results.
lname = input("Please enter your last name: ")
fullname = #write the code to concatenate the first and last names and print out

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!