Answers for "randint but only even numbers python"

2

python random randint except a number

import random

x = int(raw_input("Number(1-6): ")) # note I made x an int

while True:
    y = random.randint(1, 6)
    if x != y: break
Posted by: Guest on May-02-2021

Code answers related to "randint but only even numbers python"

Python Answers by Framework

Browse Popular Code Answers by Language