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:
Hoping
OR
OR