Question: Write a python program: Make a variable called strength, and set its initial value to 5. Print a message reporting the player's strength. Set up
Write a python program:
- Make a variable called strength, and set its initial value to 5.
- Print a message reporting the player's strength.
- Set up a while loop that runs until the player's strength increases to a value such as 10.
- Inside the while loop, print a message that reports the player's current strength.
- Inside the while loop, write a statement that increases the player's strength.
- Outside the while loop, print a message reporting that the player has grown too strong, and that they have moved up to a new level of the game.
- Bonus: Play around with different cutoff levels for the value of strength, and play around with different ways to increase the strength value within the while loop.
Step by Step Solution
3.38 Rating (154 Votes )
There are 3 Steps involved in it
Answer Python code Start of program execution strength 5 Print players current strength printPlayers ... View full answer
Get step-by-step solutions from verified subject matter experts
