Create a program that will take the first and last name of a person and output the initials. | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
- 2

Create a program that will take the first and last name of a person and output the initials.

I just wanna know if this code is correct. First_name = input() Last_name = input() print(f"{First_name[0].upper()} {Last_name}")

17th Jun 2021, 3:00 PM
Mythirayaee
5 Answers
+ 5
print(f"{First_name[0].upper()}{Last_name[0].upper()}")
17th Jun 2021, 3:02 PM
TOLUENE
TOLUENE - avatar
+ 1
firstname = input() lastname = input() print(firstname[0].upper() + lastname[0].upper()) O/P abhishek bachhav AB
27th Aug 2021, 11:29 AM
Abhishek Bachhav
Abhishek Bachhav - avatar
0
first_name = input() last_name = input() print(first_name[0] + last_name[0])
26th Jul 2021, 6:31 PM
Devesh Narang
Devesh Narang - avatar
- 1
Thanks
17th Jun 2021, 3:04 PM
Mythirayaee
- 1
firstname=(input()) lastname=(input()) print( "hello"+" " + firstname +" "+ lastname[(0)])
11th Feb 2022, 9:14 AM
Swethaa K
Swethaa K - avatar