6.5k views
2 votes
What is the scope of leftCharacter?

def rhyme(word):
leftCharacter = word[0]
if leftCharacter != 'd':
return 'd' + word[1:]
else:
return 'f' + word[1:]

def poem():
print("Enter Q to quit.")
userWord = input("Enter a word: ")
while userWord != 'Q' and userWord != 'q':
rhymeWord = rhyme(userWord)
print(rhymeWord)
userWord = input("Enter a word: ")

# the main part of your program that calls the function
poem()


the entire program

rhyme

poem

the main part of your program that calls the function

2 Answers

1 vote

Answer:

The scope of leftCharacter is rhyme. I hope this helps you out. Have a wonderful and safe day. <3<3<3

Step-by-step explanation:

User Yuri Yaryshev
by
5.3k points
5 votes

Answer:

Rhymeword

Step-by-step explanation:

edge 2020

User GreenSaguaro
by
5.6k points