Inky, Blinky, Pinky, and Clyde are the ghosts of Pacman, and they love to play their...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Inky, Blinky, Pinky, and Clyde are the ghosts of Pacman, and they love to play their own video game! The issue is, who gets to play when? Well, let's make some rules and determine who plays the game on what day using Python! Everyday, there will only ever be 1 player the game. Inky gets to play on any day beginning with the letter "T". Blinky gets to play on any day that comes after another day beginning with the letter "S". Pinky will always play on a day that is a multiple of 4, regardless of the other rules. Clyde isn't very picky, so he agreed to play on days where no one else is allowed to play the game. Your job is to write a function pacman_player that takes in the day of the week as a string, and the day of the month as an integer, and return the name of the player that plays the game. All player names should be capitalized. In ]: def pacman (dayOfWeek, dayOfMonth): pass In print (f"Question # 3a - Test Case #1 - ", 'Passed' if pacman ("Sunday", 31) == "Blinky" else 'Failed') print (f"Question # 3a - Test Case #2 -". 'Passed' if pacman ("Wednesday", 28) == "Pinky" else 'Failed') print (f"Question # 3a Test Case #3 'Passed' if pacman ("Friday", 15) == "Clyde" else 'Failed') Inky, Blinky, Pinky, and Clyde are the ghosts of Pacman, and they love to play their own video game! The issue is, who gets to play when? Well, let's make some rules and determine who plays the game on what day using Python! Everyday, there will only ever be 1 player the game. Inky gets to play on any day beginning with the letter "T". Blinky gets to play on any day that comes after another day beginning with the letter "S". Pinky will always play on a day that is a multiple of 4, regardless of the other rules. Clyde isn't very picky, so he agreed to play on days where no one else is allowed to play the game. Your job is to write a function pacman_player that takes in the day of the week as a string, and the day of the month as an integer, and return the name of the player that plays the game. All player names should be capitalized. In ]: def pacman (dayOfWeek, dayOfMonth): pass In print (f"Question # 3a - Test Case #1 - ", 'Passed' if pacman ("Sunday", 31) == "Blinky" else 'Failed') print (f"Question # 3a - Test Case #2 -". 'Passed' if pacman ("Wednesday", 28) == "Pinky" else 'Failed') print (f"Question # 3a Test Case #3 'Passed' if pacman ("Friday", 15) == "Clyde" else 'Failed')
Expert Answer:
Answer rating: 100% (QA)
python code def pacmandayOfWeek dayOfMonth Inky gets to play on any day beginning with the letter T ... View the full answer
Related Book For
Operations Management Creating Value Along the Supply Chain
ISBN: 978-0470525906
7th Edition
Authors: Roberta S. Russell, Bernard W. Taylor
Posted Date:
Students also viewed these programming questions
-
Write a function in Python that takes in a list of integers and returns a new list where each element is the product of all the numbers in the original list except for the one at the current index....
-
Write a function called fact which takes in a paramenter n and returns n! Please use a for loop, do not copy the example on the MATLAB help guide e.g. fact (5) should return 5! = 120
-
Bonnie and Clyde are the only two shareholders in Getaway Corporation. Bonnie owns 60 shares with a basis of $3,000, and Clyde owns the remaining 40 shares with a basis of $12,000. At year end,...
-
Consider a post office with two employees and a single waiting line. On average, the inter-arrival time is 6 minutes. Standard deviation of inter-arrival time is 3.94 minutes. Average service time is...
-
Compute the early, late, and slack times for the activities in the network that follows, assuming a time-constrained network. Which activities are critical? What is the time-constrained project...
-
Do you agree with those 5 beliefs pertaining to dementia? Also what is the "whole person approach "? What important aspects did you learn in reference to those beliefs ? The five beliefs are as...
-
Calculate the PRESS statistic for the model developed from the estimation data in Problem 11.2. How well is the model likely to predict? Compare this indication of predictive performance with the...
-
Refer to the consolidated statements of income on page 687 of the Intel Corporation annual report in the appendix. Required: a. Calculate the gross profit ratio for each of the past three years. b....
-
what ways can anticipatory foresight be harnessed as a strategic tool to navigate the complexities of a rapidly evolving global ecosystem, thereby sculpting innovative pathways for organizational...
-
Kinkaid Co. is incorporated at the beginning of this year and engages in a number of transactions. The following journal entries impacted its stockholders equity during its first year of operations....
-
1. Use the binary table to convert the decimal number to binary form. 4610= 64 512 32 512 16 SOLUTION: 2. Use the binary table to convert the decimal number to binary form. 8 4 2 256 k 256 128 64 32...
-
Scenario: As of October 31, 2023, you are a member of your firm's audit team responsible for reviewing the financial statements of Karke Dikhaao Limited (Karke) for the fiscal year ending on...
-
A company sells two models of a productbasic and premium. The basic model has a contribution margin per unit of $25 and unit sales of 750. The premium model has a contribution margin per unit of $40...
-
B. Find FICA Deductions The previous section of this chapter discussed the computation of gross earnings. Typically, employees do not receive the amount of their gross earnings in their paycheck,...
-
For each of Anne Schippel's observations listed below, develop questions you would ask Dry Supply in order to complete the balance sheet analysis. Observation 1: Accounts receivable have remained in...
-
DIRECTION: Based on the information below and the attached financial statements, prepare the following: 1. Value Added Tax Return -1st quarter 2021 2. Income Tax Return-Taxable year 2021 COMPANY...
-
On December 31,2022, Belt Enterprises must measure its impairment loss for plant and equipment. Belt has determined that the broadcast license is not impaired. The projected future undiscounted cash...
-
Record the following selected transactions for March in a two-column journal, identifying each entry by letter: (a) Received $10,000 from Shirley Knowles, owner. (b) Purchased equipment for $35,000,...
-
Armco, Inc., is a manufacturing company that has a contract to supply a customer with parts from April through September. However, Armco does not have enough storage space to store the parts during...
-
The Management Department recently purchased a small copier for faculty use. Although the workload of the office staff has improved somewhat, the secretaries are still making too many trips to the...
-
In Problem S1-10, suppose Amtrex is able to assign probabilities to each of the states of nature for each of the suppliers/ ports as follows: a. Using expected value, determine the port/supplier...
-
The chief goal of the private sector is effciency.Why? The primary focus of the public sector is equity. Why? It is quite possible to be highly effcient yet ineffective. It is also possible to be...
-
Why is healthcare reform such a contentious issue in the United States? Why have public and private efforts been unsuccessful in fully addressing the challenge of affordable health care? What role(s)...
-
Drawing on economic theory, what kinds of market failure underlie the worlds most pressing problems? Examine three examples: hunger, groundwater contamination, and literacy.
Study smarter with the SolutionInn App