Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 1

full_name=input("What's your name?

\n")
def find_surname():
space=' '
index = 0
while index < len(full_name):
if full_name[index] == space:
return index
index = index + 1
return -1
def format_name():
s=find_surname()
name=full_name[:s]
surname=full_name[s+1: ]
sr=surname.upper()
print(' => ',sr,', ',name)
format_name()

def Apples_and_Bananas_Song():
print('Apples and Bananas Song')
print("Type 'bye' to finish")
line='I like to eat, eat, eat, apples and bananas'
for i in range(4):
print(line)
while True:
vocal=input("Why don't we try to sing with the vocal '")
if vocal == 'bye':
break
for i in range(4):

new_line=vocal+line[1:3]+vocal+line[4:5]+vocal+line[6:8]+vocal+line[9:10]+vocal+voc
al+line[12:15]+vocal+vocal+line[17:20]+vocal+vocal+line[22:25]+vocal+line[26:29]+vo
cal+line[30:32]+vocal+line[33:37]+vocal+line[38:39]+vocal+line[40:41]+vocal+line[42
:]
print(new_line)
print('It was nice to sing with you')

Apples_and_Bananas_Song()

You might also like