Question: Python Programming 2 Assignment Overvien This project focuses oa sone mathematical manipulation, in particular integer operations. The Prohlem (rom the Handley Math Page, 141.104.2 DvWinch

Python Programming 2 Assignment Overvien This project focuses oa sone mathematical manipulation, in particular integer operations. The Prohlem (rom the Handley Math Page, 141.104.2 DvWinch hhs math s.htm Visitors, cspocially young ones, often waited for General Douglas MacArthur to perform a miracle, or at least utter something profound, when they me kim. The Gencral could not always live up to his press notices. So, MacArthur started using a mathematical trick that he described as the old number 115" as a way to maintain his image, have some fun, and mystify his guests. Ask your friend to write down the number of month in which he was born. (January is, February is 2, and so on). Turn your back so you cannot see what your friend is jotting down in response to your instructions. Then have that person write down: Month of birth (Example February) 2 Double it: 4 Add S:9 Multiply by 50: 45 Add friend's age (Example 40):490 Subtract 365: 125 At this point, ask your friend to call out the total, which in this case, is 125. In yoar head quickly and socretly add 115. In this example, you will end up with 240. Then proclaim, Why, you were bor in February and you'rc 40 ycars old. Here's how he did it. The first number-and the sccond if the total is a four-digit number-will indicate your friend's birth month, once you've added good old 115. The last two digits will indicate his age. Program Specifications Your program will play the MacArthur game as follows: 1. Print a message to the user about the game and explain the rules 2. Prompt the user for both a birth month or an, 2 fur Feb ete.) and their age 3. Print out the "special" umber that results from the algarlh above . Add 115 to the number, and find the value of the last two digits (age) and the first one ar two digits (birth month). Print out the birth month and the age of the player 5. Deliverables Program2. ?? .. your source code solution (remember to include your name, the date, program number and comments) Assignment Notes: One of the main issues here is that we are working with integers, and division with integer numbers is a little different. Integer division always returns an integer result. Thus 10/3 yields 3. The operatian45ields D. There is another operator, callcd the modulus operator, which indicates the remainder aftera division. The modulus operator is indicated by the t sign. Thus 103 is 1 (a remainder of 1). 495 is 4. You can use these facts to pather the digits in the hundred's, ten's and one's place of a three digit integer. Try some experiments in the Python interpreter to see how to accomplish this task. To clarify the prablerm specificatians, we provide at the end of this document a snapshat of interaction with the already written program Getting Started 1 Using IDLE (Ninja) create a new program 2. Save the name of the proieet: program2.py 3. Create tbe preface print information and prompt for the user integer Run the program and lix any erars 5. Submit the program on CS isle, even though it may be incomplete. 6. Each time you revise yaur program resubmit it on CS isle. You may continue to resubmit until the due date. 7. Now, prompt for the two numbers and convert to intepers (birth month and age). B. Perform the calculations 9. Scparate the last two numbers from the sum (how to do that)? Print thosc numbers. 10. Now you enter a cycle of edil-run to increnentally develop your prograzm 11. Submit your final version
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
