Creating a Guessing Game With Python
Guess Game Guess Game As a beginner I wanted to get the hold off the basic concepts of python by making some playful apps. So this is one of those programs… Guess Game As a beginner I wanted to get the hold off the basic concepts of python by making some playful apps. So this is one of those programs which will help the beginners to learn some basic concepts and how they are implemented. import random secret=random.randint(1,20) #random module is useful for getting a random number which the user has to guess. #randint function of the random module gets a random number between 1-20 and stores it in a variable named "secret". You can increase or decrease the range according to your need. print("you have to guess the secret number between 1-20") print("Let's begin!!!") for chances in range(1,5): print("Take a guess") guess=int(input()) if guess> secret: print("your guess is high") print("sorry...