擅长:python、mysql、java
<p>要检查数字是奇数还是偶数,您可能不需要偶数、奇数列表,您可以检查以下代码:</p>
<pre><code>from random import randrange
import random
import time
x = random.randint(1, 6)
print("Rolling Dice...")
time.sleep(2)
print("Your number is....{}".format(x))
if x % 2 == 0:
print("It is an Even number!")
else:
print("It is an Odd number!")
</code></pre>