ctf-resources/htb/hacktheboo2024/coding/[Very Easy] oddly_even/README.md

34 lines
No EOL
641 B
Markdown

![img](../../../../../assets/htb.png)
<img src='../../../../../assets/logo.png' style='zoom: 80%;' align=left /> <font size='10'>Oddly Even</font>
1<sup>st</sup> October 2024
Prepared By: ir0nstone
Challenge Author(s): ir0nstone
Difficulty: <font color='green'>Very Easy</font>
# Synopsis
Given a number, print "even" if it is even and "odd" if it is odd.
## Skills Required
* Basic Python
# Solution
First, we take in the number:
```py
a = int(input())
```
We can then check if the number is divisible by `2`. If it is, we print "even", otherwise we print "odd".
```py
if a % 2 == 0:
print('even')
else:
print('odd')
```