+ 1
there is question with answer which not the best answer here
What is the output of this code? try: variable = 10 print (10 / 2) except ZeroDivisionError: print("Error") print("Finished") =============================== the options here https://prnt.sc/l8yqab =============================== I think the best answer is 5 Finished as in programming integer over integer give integer check that http://prntscr.com/l8yrd8
2 Respostas
+ 3
Good Questioning. But the thing is that you are using python2. This course is python3. So has some differences. Plis check:
https://code.sololearn.com/cRD9pyn5VZAY
Edit: I not sayng python2 is bad is just different.
+ 3
Ahmed Helal Ahmed
integer/integer=integer ,this is in python2 but when you divide integer by integer in python3 it will give you value in float.means value is very accurate.but if you want integer then you can simply convert float to integer with the help of built in function int().
e.g
print(int(10/5))