User Rating: 0 / 5

Star InactiveStar InactiveStar InactiveStar InactiveStar Inactive
 

If07. Two numbers are given. Print the ordinal number of the smaller of them.

Solution in Python 3:

import random

A = random.randrange(-3,3)
B = random.randrange(-3,3)
print("Два числа:", A, B)

if A < B:
_min = 1
else:
_min = 2
print("Smaller: ", _min)