Learn practical skills, build real-world projects, and advance your career
num = 65
if num & 1:
    print('The given number {} is odd.' .format(num))
else:
    print('The given number {} is even.' .format(num))
The given number 65 is odd.
result = 'odd' if num & 1 else 'even'
result
'odd'
jovian.commit(project='python-branching-and-loops')
[jovian] Attempting to save notebook.. [jovian] Updating notebook "adeebmuhaimin/python-branching-and-loops" on https://jovian.ai/ [jovian] Uploading notebook.. [jovian] Capturing environment.. [jovian] Committed successfully! https://jovian.ai/adeebmuhaimin/python-branching-and-loops