ctf-resources/htb/hacktheboo2024/coding/[Very Easy] oddly_even/challenge/challenge.py

12 lines
189 B
Python
Raw Permalink Normal View History

2024-10-23 11:10:43 +02:00
import random
def even_or_odd(n):
if n % 2 == 0:
return 'even'
return 'odd'
def gen_question():
n = random.randint(1, 100_000)
return f'{n}', f'{even_or_odd(n)}'