Boolean12. Three integers are given: A, B, C. Check the truth of the statement: "Each of the numbers A, B, C is positive".

Решение на Python 3:

import random
A = random.randrange(-10,10)
B = random.randrange(-10,10)
C = random.randrange(-10,10)
print("A = ", A)
print("B = ", B)
print("C = ", C)
a = (A>0)
b = (B>0)
c = (C>0)
x = (a and b and c)
print("A is positive: ", a)
print("B is positive: ", b)
print("C is positive: ", c)
print("Each of the numbers A, B, C is positive: ", x)