Answer:
Explanation:
Let's do this in Python, we can first generate the random number from 1 to 100. Then compare that with the input number from the guesser.
from random import random
random_0_1 = random()
random_1_100 = 1 if round(100*random_0_1) < 1 else round(100*random_0_1)
for trial in range(3):
guess = input('Guess the number: ')
if guess == random_1_11:
print('You guessed correctly!')
break
else:
print(2 - trial + " remaining try")
Explanation:
DATA statements are used in conjunction with READ statements. Together they assign numbers or strings to variable names.