Skip to content

A Small Project For Effective Learning. #62

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions guessgaeme.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import random
import time
print("Lets play guessing game:\n")
n=int(random.randint(1,30))
time.sleep(1)
print("i have choosen my no \n ")
print("guess my selected no")
p,chance=0,9
while p!=n and chance>0:
p=int(input())
if p<n:
print("Add me")
chance-=1
elif p>n:
print("Decrease ME")
chance-=1
elif p==n:
print("Wohooo! You are An IQ master")
break

print('You have {} chances left'.format(chance))
if chance==0:
print("You Loose the game")