I feel like a retard but I cannot get this code to work (its review for an Intro to Python final I have later this week). The multiplier I am taking in during the second "while True:" block needs to be both an integer (which I have done) and equal to or greater than 1. I cannot figure out exactly how to add the second part without it fucking up the code. Its a word repeater program. Thanks. I'm not into coding at all and this is frustrating me
def repeat_word(re_word, count):
return (re_word + " ") * count
while True:
word = input("Please enter a word to repeat, or 'Q' to quit: ")
if word.lower() == "q":
print("Thank you for using Word Repeater! Goodbye!\n")
break
else:
while True:
Comment too long. Click here to view the full text.