In [7]:
a=input()
b=int(input())
print(type(a))
print(type(b))


surya
10
<class 'str'>
<class 'int'>

In [15]:
import pandas as pd
a=10
print("hello",a+10,"Hui")
import random 
random.choice(range(20))


hello 20 Hui
Out[15]:
6

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)))


Hi welcome to guessing game
There are a maximum of 5 attempts, and the number will always be leser than or equal to  20
surya
Please enter your guess
10
sorry, try a bit greater number
you have left  4 attempts
Please enter your guess
15
sorry, try a bit greater number
you have left  3 attempts
Please enter your guess
18
Sorry, Try a bit lesser number
you have left  2 attempts
Please enter your guess
17
Sorry, Try a bit lesser number
you have left  1 attempts
Please enter your guess
16
Congrats, you have won. :)

In [ ]: