Class 12th CBSE CS
Write a Program to generate random number between 1 to 6 and check whether a user
guess a number or not.
Solution: –
import random while True: n = random.randint(1,6) guess = int(input("Enter a number between 1 to 6 :- ")) if n == guess: print("You won the game .....") break else: print("Try again")
Fun & Easy to follow
Works on all devices
Your own Pace
Super Affordable
Popular Videos
UX for Teams
Learn the basics and a bit beyond to improve your backend dev skills.

Chris Matthews
Designer
SEO & Instagram
Learn the basics and a bit beyond to improve your backend dev skills.

Chris Matthews
Designer