Generating Random Numbers in Python

preview_player
Показать описание

Рекомендации по теме
Комментарии
Автор

thank you so much, this video is super simple and usefull

kevindomenechaliaga
Автор

Very nice. But i need a help on solving "Write a program that generates two integers under 100, show them on screen, and prompts the user to enter the sum of these two integers. The program then reports true if the answer is correct, false otherwise." My coding is //from random import randint
print(randint(0, 100))
print(randint(0, 100))
number1=randint(0, 100)
number2=randint(0, 100)
print("Enter the value")
val = int(input())
if val==number1+number2:
print("true")
else:
print("false")// But even though i am entering correct sum it is saying false.

riviera