2022PythonExamples/5 - Random Numbers and For Loops/main.py

11 lines
341 B
Python

import random
for i in range(10):
print("Index Number: " + str(i))
for i in range(5):
print("Int Value " + str(i + 1) + ": " + str(random.randint(1, 100)))
print("Float Value " + str(i + 1) + ": " + str(random.random() * 100 + 1))
print("Boolean Value " + str(i + 1) + ": " + str(True if random.random() > .5 else False))