..l ROGERS 11:36 AM jhub.cas.mcmaster.ca jupyter minor5 Control Panel Logout Men
ID: 3728355 • Letter: #
Question
..l ROGERS 11:36 AM jhub.cas.mcmaster.ca jupyter minor5 Control Panel Logout Menu Trusted Python 3 O Markdown Validate t Background The purpose of this assignment is to create a program that plays the game Buzz. Buzz is a game where the players take turns counting from 0 up to some ending number and say "Buzz" each time a number which is a multiple of the "Buzz Number" or contains the "Buzz Number" as one of the digits comes up. For example if the "Buzz Number" was 3, then they would count 1, 2, "Buzz", 4, 5, "Buzz", 7. Additionally, the number 13 would also be a "Buzz" because it contains a 3 Requirements 1. The program creates a function that playsExplanation / Answer
def buzz(checknum, buzznum): strcn = str(checknum) strbn = str(buzznum) if checknum % buzznum == 0: return str("Buzz") if strcn.find(strbn) != -1: return str("Buzz") return strcn def whilebuzz(buzzcount, buzznum): output = [0] counter = 1 i = 0 while iRelated Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.