Answered step by step
Verified Expert Solution
Question
1 Approved Answer
begin{tabular}{|l|l|} hline Code 1 & def repeat_word (word, num): print (word * num) hline #-main-ts repeat_word (yes, 5) repeat_word (huh?, 2) end{tabular}
\begin{tabular}{|l|l|} \hline Code 1 & def repeat_word (word, num): print (word * num) \\ \hline \#-main-ts \\ repeat_word ("yes", 5) \\ repeat_word ("huh?", 2) \end{tabular} 1. Using Code 1 as an example; what line of code could you write to repeat your own name 100 times on the screen using the repeat_word() function? 2. Explain why there is no output to Code 3. 3. Consider Code 5 ; why is used on the first print statement in the function
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started