Add an if branch to complete double_pennies()'s base case. Sample output with inputs: 1 10 Number of pennies after 10 days: 1024 Note: If the submitted code has an infinite loop, the system will stop...


Add an if branch to complete double_pennies()'s base case.<br>Sample output with inputs: 1 10<br>Number of pennies after 10 days: 1024<br>Note: If the submitted code has an infinite loop, the system will stop running the code after a few seconds, and report

Extracted text: Add an if branch to complete double_pennies()'s base case. Sample output with inputs: 1 10 Number of pennies after 10 days: 1024 Note: If the submitted code has an infinite loop, the system will stop running the code after a few seconds, and report "Program end never reached." The system doesn't print the test case that caused the reported message.
344614.2214230.qx32qy7<br>2 def double_pennies (num_pennies, num_days) :<br>total_pennies<br>4<br>

Extracted text: 344614.2214230.qx32qy7 2 def double_pennies (num_pennies, num_days) : total_pennies 4 " Your solution goes here ... 6 7 else: total_pennies double_pennies ((num_pennies 2), (num_days - 1)) 10 return total_pennies 11 12 # Program computes pennies if you have 1 penny today, 13 # 2 pennies after one day, 4 after two days, and so on 14 starting_pennies 15 user_da ys int(input ()) !! int (input ()) 16 17 print('Number of pennies after', user_days, 'days: ', end="") 18 print(double_pennies (starting_pennies, user_days))

Jun 11, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here