Its a very noob question, I am trying my hands on python and going through this exercise right now. Their solution suggests it could actually be done without creating any function which makes it easier, however, I am still wondering why my function wouldn't work.
Here's what my code looks like:
1 number = int(input("Please enter a number of your choice: "))
CC 2 def odd_or_even():
3 if number % 2 == 0:
4 print("You've entered an Even number :)")
5 else:
6 print("You've enterd an Odd number.")
7
8 return odd_or_even()
Also, you'll notice I have a warning on second line which reads:
oddOrEven.py|2 col 1 C| E302 expected 2 blank lines, found 0 [pep8]
in my vim. Can someone explain what exactly's wrong there?