Computer Science, asked by LoknathDas31, 6 months ago

Write a program to generate random integer in a between 1 to 1000 and give the user three

chance to guess the correct number. If he/she guesses it correctly in three time display

“winner”

Else display “better luck next time”.​

Answers

Answered by rzv59008
1

import random

S=random.rand(1,1000)

c=3

while True:

a=input('enter your guess')

if a==S:

print('winner')

break

if c<1:

print('better luck next time')

break

c-=1

the above is a python code.

please mark me as the brainliest

Similar questions