MP4
Write a program that computes how much the user owes for parking in a particular parking garage. The garage charges $4.25 per hour. However, the minimum amount they charge is $7. This means that if the total comes to something less than $7, the user is still charged $7. In addition, if the user was parked for more than 3 hours, they earn a 25% discount.
For example, if they were parked for 4 hours, they would owe $17. But since they were parked for more than 3 hours, they get 25% off and only owe $12.75. Follow the comments in main to ask the user how many hours they parked and compute their total. Do not worry about formatting the total.
The Construction class is completed for you, but you may want to look at it to make sure you understand how to use it. Then write a program in the main method that asks the user to enter the sales tax rate as a decimal, the number of boards needed, and the number of windows needed. Create a Construction object to compute the cost of the lumber and windows. Use $8 for the cost of lumber. Use $11 for the cost of windows. Print the total cost. Then use the method to compute the tax and print out the grand total including tax. The code doesn't fully work but most of the components are there. I could have taken more time to perfect the code.
MP3
A t-shirt costs $22. You can personalize the t-shirt for $1 extra.
Using only one variable called cost and the increment and decrement operators, print the cost of the t-shirt, the cost of a personalized t-shirt, and then the original cost of the t-shirt.
I see this as a glow due to a successful code.
You and a friend are going out for the night. You have decided to treat your friend, so you’re paying for the whole night. However, since you have a fixed amount of money to spend on fun things, you need to track how much the outing will cost so you can update your budget.
Write a program to help yourself estimate what the total cost of the night will be. Your program will estimate the cost by taking the cost of the activities for one person and estimating how much it will cost for two people.
Here’s what you know about your activities:
Dinner - you know you typically get cheap dinners, so you expect that your friend’s dinner will be twice as expensive as yours
Laser Tag - since laser tag is charged per person, you and your friend will cost the same
Ice cream - you like the triple scoop, but your friend likes a single scoop. Your friend’s ice cream will cost 1/3 as much as yours.
Your program should ask how much YOUR dinner cost, how much laser tag costs per person, and how much YOUR ice cream costs. It should then compute how much your friend’s costs will be based on the information above. Be sure your program takes the input in this exact order.
Then print how much dinner will cost (for both of you), how much laser tag will cost (for both of you), and how much the ice cream will cost (for both of you). Then print the grand total for the evening.
It took me a while to get it right but I did eventually
MP2
Use the things you've learned from the articles, and the brainstorming notes you made, to code your choose-your-own-adventure story. Think about how you will use text strings and conditionals in your story. The minimum number of endings for your branching story will be 6, but you can challenge yourself by adding additional choices, "forks in the road," and endings as work to bring your story to life.
The game play is essentially the same. The player will take their turn and then the computer will take a turn. When the computer is playing, it will always continue rolling while the round score is less than or equal to 15. Once the round score is over 15, it will bank its points (unless it rolls a 1 first).
The game should continue until either the player or computer roll over 100 in the round. If both roll over 100 in the same round, the winner is the player with the higher total.
MP1
You are to program a robot to create a picture using what we learned so far about loops and functions. The picture should express your creativity and understanding of how to use programming tools we have learned so far.
It should meet the following minimum guidelines:
- a house
- at least one door
- at least two windows
- a roof
- at least 3 unique items in the background (in the sky, on the ground, etc.)
- your code should use at least 5 loops.
-you should comment the steps in your code to make it easier for people to read
-your code should have at least 3 functions you created (these should help to simplify your code)
At the beginning of the pandemic, the Department of Education created a COVID-19 Pre-Screening Tool for School Attendance. It is posted in multiple locations around the school. You can find it here: https://bit.ly/3nsYXYs.
On CodeHS implement the Python questionnaire. Your program should:
treat the user as a student taking the questionnaire to determine whether s/he should attend school.
ask the user each of the four screening questions, in order.
If the user answers YES to any of the first three questions, your program should reply that the user should stay home.
If the user answers NO to the first three questions but YES to the fourth, your program should tell the user to contact the school.
If the user answers NO to all four screening questions, your program should tell the user that the user to go ahead and attend school, provided s/he is feeling well and has no other symptoms of illness.
Your program may:
Cut and paste text directly from the questionnaire into your program.
Accept only YES or NO answers (or Y or N, or similar). Make sure to tell the user how you expect them to answer.
Your program may not:
Ask all the questions at once. Your program must ask one and only one question at a time.