Write Program Call Fancymyname User First Last Name Print Like Example Output Bellow Pleas Q37136574

Write a program call FancyMyName which as the user for theirfirst and last name and print it like the example outputbellow:

Please enter your first name and last name, separated by aspace?

You entered the name(input) : Louis Henry

Output: LoUiS HeNrY


Solution


Hello

Hope you are doing well!

Below is the python code of above problem.

print(“Please enter your first name and last name,separated by a space?”)
str1=input()
str2=””
print(“You entered the name(input) :”,str1)
for i in range(len(str1)):
if i % 2 == 0 or str1[i] == ” “:
str2=str2+str1[i].upper()
else:
str2=str2+str1[i]
print(str2)

Output:

ideone.com A new close shortcuts fullscreen </> source code 1 # your code goes here 2 print( Please enter your first name an

Hoping

OR
OR

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.