Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Let us go through an exercise to see if we can remember the concepts that we covered in Programming I. Answer the following questions in
Let us go through an exercise to see if we can remember the concepts that we covered in Programming I. Answer the following questions in Python (questions 4 to 14) and Java (questions 15) based on the arcade game Pac-Man that was developed in 1980. 1. What is the input for this game? 2. What is the output for this game? 3. List as many variables (and their types) that the programmer needs to use to implement this game. 4. Create a variable called score with value equals 0 . 5. Create a variable called level with value equals 1 . 6. Create a variable called invincible with a value of false. 7. Create a variable called lives with a value of 2 . 8. Create a variable called collision with a value of false. 9. Create a variable called pallet with value equals 244 . 10. Create a variable called super pallet with value equals 1 . 11. Decrement pallet by 1. 12. Increment score by 1. 13. Write few lines of code to determine whether the player passes a level or not. 14. Write few lines of code to determine whether Pac-Man loses a life or not. 15. Implement questions 4 to 14 in Java
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started