In [7]:
a=input()
b=int(input())
print(type(a))
print(type(b))
In [15]:
import pandas as pd
a=10
print("hello",a+10,"Hui")
import random
random.choice(range(20))
Out[15]:
In [8]:
import random
def guessing_game(name,actual):
#guess = int(input())
#print(type(guess))
counter,maxx,guess=0,5,-1
while(guess != actual):
print("Please enter your guess")
guess = int(input())
counter+=1
if(guess < actual):
print("sorry, try a bit greater number")
print("you have left ",maxx-counter,"attempts")
elif(guess > actual):
print("Sorry, Try a bit lesser number")
print("you have left ",maxx-counter,"attempts")
else:
print("Congrats, you have won. :)")
print("Hi welcome to guessing game")
print("There are a maximum of 5 attempts, and the number will always be leser than or equal to 20")
Name=input()
guessing_game(Name,random.choice(range(20)))
In [ ]: