Median. I encountered problem with this


#1

I checked my code on Python. Everything worked well

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


#2

# 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


#3

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


#4

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


#5

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


#6