1. Write a simple Python program that prompts the user for the year he or she was born. Using only the birth year, echo back to the user how old he or she is now and how old the user will be in the...

Python 3 Programming




1. Write a simple Python program that prompts the user for the year he or she was born. Using only the birth year, echo back to the user how old he or she is now and how old the user will be in the year 2035.  A passing assignment will include a screenshot of the executed program from within IDLE. The screenshot must also be accompanied with the saved Python code file for the assignment. 2. Write a simple Python script that validates usernames for a membership system. This membership system is in the early phases of implementation and only has 10 existing users. Each username is stored within a list of unique usernames for accessing the system. You want to start allowing more users to register with the system. Usernames are case-insensitive, but the system requires that usernames must be at least four characters but no more than 20 characters, and cannot already be in use by an existing user in the stored list. Your program should prompt the user to enter a desired username and determine if it meets the requirements and respond accordingly so that the user can find and validate an accepted username for the system. A successful passing assignment will have a screenshot of the executed program from within IDLE.  Multiple runs should be shown in the screenshot(s) illustrating the handling of the different conditions for validating different username failures and success. The screenshot must also be accompanied with your saved Python code file for the assignment. 3. Write a simple Python program that simulates Mattel's Magic 8-Ball toy. If you are unfamiliar with the Magic 8-Ball, refer to the entry on Wikipedia for more information. Essentially, you will be creating a program that receives a question from the user and randomly outputs one of these 20 possible answers that are inside the Magic 8-Ball:  A passing assignment will have a screenshot of the executed program from within IDLE. The screenshot must also be accompanied with your saved Python code file for the assignment. 4. Create a simple Python program that becomes Monty Hall of Let's Make a Deal, offering the user to keep some quick cash or trade the cash and play for the "Big Deal" by picking what's behind either Door #1, Door #2, or Door #3. Here's how the game will work. The user will be prompted to roll two dice (computer dice) to determine a quick cash amount to keep. By adding the two numbers on the dice, e.g., 2 + 3 = 5, and then multiplying that number by $100 yields a total prize of $500, which would be quick cash. Sure, it's not real money, but let's pretend. The user will then be prompted to either keep the money or risk it for what's behind one of three doors, known as the "Big Deal." Each door will have a different amount. One is just a bit more than the dice roll, while one is significantly bigger, and one is significantly smaller. To accomplish a sense of suspense, the amounts need to be randomized, as well as the doors, so that the same door isn't always the "Big Deal." If the user picks the cash, say goodbye and the game is over. However, if the user picks the "Big Deal," prompt the user to pick a door. After the user picks a door, make sure the user is ready by prompting him or her, and then reveal the door with the lower amount from the doors not picked. Then prompt the user to open the door he or she picked, and lastly, show the user the other door not picked, pausing between each reveal. For this project, use the original amount of the quick cash from the dice roll as a multiplier to determine the amounts behind the doors. One door will be low, one medium, and one big, based on one of the following corresponding multipliers: low: 0, 0.05, 0.15, or 0.25 medium: 1.25, 1.5, 1.75, or 2 big: 10, 15, 20, or 25 e.g. $500 * 0.15 = $75, $500 * 1.75 = $875, $500 * 15 = $7,500 Do not use the same multiplier for every game. This should be achieved randomly to keep the game interesting. Also make good use of the input function to pause game play and build suspense, allowing the user to hit Enter to advance through the stages of the game. A passing final project will have screenshots of the executed program from within IDLE, with each of the following executions: Keeping the quick cash from the dice roll Going for the "Big Deal" and picking a door Finally, discuss ways that the program could be enhanced and what type of error handling could be incorporated into the program.
Jan 15, 2021
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here