170k views
0 votes
3. Write a program that asks the user for their first name and last name. Ask the user for their student ID. You must use your own name and student ID. Output your initials and your ID with no spaces between your initials and ID number. Count the number of initials and ID numbers Output should be initials and numbers concatenated - example: rl000000 length

User Nall
by
5.0k points

1 Answer

3 votes

In python:

first_name = input("What is your first name? ")

last_name = input("What is your last name? ")

id_number = input("What is your ID number? ")

print(f"{first_name[0]}{last_name[0]}{id_number} length: {2 + len(id_number)}")

I hope this helps!

User SariDon
by
5.2k points