Trick or Treat challenge
Hey all, The Trick or Treat challenge seems pretty straightforward — I think I’ve solved it, but the three tests that are hidden in the SoloLearn challenges are coming out wrong. I don’t know why, because I can’t see the answers. Anyone know what could be going wrong? The challenge: Two of the houses that you will trick or treat at will give out a dollar bill. What is the percentage chance that you will randomly draw a dollar bill from your candy bag, after you visit (x) number of houses? Input Format An integer (>=3) representing the total number of houses that you visited. Output Format A percentage value rounded up to the nearest whole number. Sample Input 4 Sample Output 50 My answer (which works for 2/5 cases): houses = int(input()) x = 2/(houses)*100 print("%.0f" % x) I also tried to print(round(x)), which provides the same results.