What's problem in this code? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

What's problem in this code?

houses = int(input()) bill = 1/3 #your code goes here a = 2 / houses *100 if a == int(a) : print(int(a)) else : b = a - int(a) if b >= 0.5 : print(int(a+1)) else : print(int(a)) Halloween candy from code couch

14th Jan 2020, 2:44 PM
Jitendra
Jitendra - avatar
3 Answers
0
What is your goal ?
14th Jan 2020, 3:36 PM
Jnn
Jnn - avatar
0
But looks like you want to round up or down depending on whats nearer?
14th Jan 2020, 3:37 PM
Jnn
Jnn - avatar
0
There is no problem indeed, but it seems the problem wants you to round up every number above .0, for example: from 19.1 to 20 or from 50.05 to 51
24th Jan 2020, 2:16 PM
Damian Cortez
Damian Cortez - avatar