Number Guessing Game Python gui in Hindi with While loop | Python Computer Guess My Number | 2021
Number Guessing Game Python gui in Hindi with While loop | Python Computer Guess My Number | 2021
Note : Recplace (greater than) and (less than) with their sign/symbol ( Because Youtube donot allow angle brackets in description ) OR You can get this code on github by using github link
Code github Link : https://github.com/ubaidahmadceh/python_tkinter_GUI_projects/blob/main/Number_Guessing_Game_GUI.py
code :
from tkinter import *
from random import randint
root = Tk()
root.title("Number Guessing wali Game GUI")
root.geometry('300x300')
number = randint(1,11)
def check():
user_guess_integer = int(user_guess.get())
if user_guess_integer == number:
statement_1 = Label(root, text="you win this game")
statement_1.pack()
elif user_guess_integer (greater than) number:
statement_2 = Label(root, text="Too large guess")
statement_2.pack()
elif user_guess_integer (less than) number:
statement_3 = Label(root, text="Too small guess")
statement_3.pack()
else:
statement_4 = Label(root, text="Please guess between 0 to 10")
statement_4.pack()
user_guess = Entry(root)
user_guess.pack()
check_button = Button(root, text="Check", command=check)
check_button.pack()
root.mainloop()
python gui in hindi with while loop,number guessing game python gui,number guessing game with tkinter,number guessing game with python,number guessing game in python,number guessing game,python in hindi,number guessing,examples of while loop in python,learn while loop in python,python hindi,python computer guess my number,python gui,while loop example,while loop in python,python language,gui with python,python tutorials,computer science,python,python-3