Median. I encountered problem with this


I checked my code on Python. Everything worked well

However, I received this error on the online Python course:


# python3
print 9 / 2 # 4.5
# python2
print 9 / 2 # 4

changes where made division behavior when python3 was released

in python2, a division involving two integer will be floored (round down), to overcome this problem the division should involve a float


Thanks for your advice stetim94! I made a small change and then ...Great! :slight_smile:


hi there ,I tried the exact same code , it shows error invalid syntax at line 6 else: please help thanks


please don't hijack this topic, go here and make a new topic, fill in the template so we have all the details needed to help you