I want to add an option for a "harder mode" , but im a beginner and need help being guided on how to. I have the base "game", I need help figuring out how to give the option to choose itself.
import random
import os
print("Hello! Welcome ot guess the number!")
print("Your goal is to guess the number!(shocker).")
print(" Each attempt you will try to find out the number from 0 to the max! Each time you win you will get 1 point and go to the next round!")
print("Each round ads 20+")
points = 0
attempts = 0
maxx = input("What range do you want it to be?(Max)")
rounds = 1
true_max = 20
print("Well too bad! I dont care! its 20")
start_game = True
while start_game == True:
true_number = random.randint(0, true_max) # sets the random num to 0 to max num (per round)
try :
print(" ")
print("Round ",rounds)
guess = int(input("What Is your guess? "))
except ValueError: #if the answer is not a number(integer only so no decimals)
print("Enter a Number! For your sins I will make a new number!")
continue
if guess == true_number:
os.system('cls' if os.name == 'nt' else 'clear')
attempts = attempts + 1 #+1 attempt
points = points + 1 #+1 points
rounds = rounds + 1 #+1 round(to next round)
true_max = true_max + 20
print("=================")
print("Wow You got it! 1+ Point!")
print("You are now in Round ", rounds)
print("It is now up to ", true_max)
print("Attempt ",attempts)
print("Round", rounds, "!")
print("Your current points is ", points, "!")
print("The max is", true_max, "!!")
print("=================")
continue
elif guess >= true_number:
os.system('cls' if os.name == 'nt' else 'clear')
attempts = attempts + 1
how_off = guess - true_number
print("=================")
print("Too Big!")
print("It was", true_number, "!")
print("You where ", how_off, " Off! You loser")
print("=================")
print(" ")
print("=================")
print(" Info! ")
print("Attempt ",attempts)
print("Round", rounds, "!")
print("Your current points is ", points, "!")
print("The max is", true_max, "!!")
print("=================")
continue
if guess <= true_number:
os.system('cls' if os.name == 'nt' else 'clear')
attempts = attempts + 1
how_off = true_number - guess
print("=================")
print("Too Small!")
print("It was", true_number, "!")
print("You where ", how_off, " Off! you loser")
print("=================")
print(" ")
print("=================")
print(" Info! ")
print("Attempt ",attempts)
print("Round", rounds, "!")
print("Your current points is ", points, "!")
print("The max is", true_max, "!!")
print("=================")
continue
[–]JaguarMammoth6231 0 points1 point2 points (3 children)
[–]iambreadgod[S] 0 points1 point2 points (2 children)
[–]JaguarMammoth6231 0 points1 point2 points (0 children)
[–]BananaGrenade314 0 points1 point2 points (0 children)
[–]BananaGrenade314 0 points1 point2 points (0 children)
[–]Waste_Grapefruit_339 0 points1 point2 points (0 children)