Question: PYTHON PROGRAMMING!!!! import random as rand rest = 'no' # Loop runs as long as the adventurer doesn't want to rest while rest == 'no':

PYTHON PROGRAMMING!!!! 
import random as rand rest = 'no' # Loop runs as long as the adventurer doesn't want to rest while rest == 'no': actual = -99 # Value of the actual Sphinx number health = 0 # Adventurer health bar beast_health = 50 # Sphinx health bar 
# 5. Ask the user to guess the Sphinx's number in the following way: # 'Adventurer... if you can guess my number between 1 and 5 you can pass without any trouble. What is your guess?' # Store the result in the variable guess. # Generate a random number between 1 and 5 and store the result in the variable actual. if guess == actual: # Executes if the user's guess is the same as the Sphinx's number print('SUCCESS! PASS WITH CARE AND YOUR LIFE...') else: # Executes if the user's guess is not the same as the Sphinx's number print('INCORRECT! PREPARE TO FIGHT!') hits = 0 # Represents the number of hits the beast takes while beast_health > 0: # Runs while the beast is still alive # 7. Inside the while loop for the fight: # If the weapon carried is a sword, generate a random number between 16 and 20 for an attack value. # Store this attack in a variable called my_attack. # Otherwise, generate a random number between 10 and 15. # Store this attack in a variable called my_attack. 

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!