Blake was here
The Forum > Technology > NP Python Olympiad
Page: 1 2 3
 OmnipotentEntity Administrator636 Posts11 Cresco 3:4 - 17.87.34880.589 days ago In most languages, casting to an integer passes the float through the floor function. [Quote] [Link]
 Blake Webmaster2083 Posts11 Cresco 3:5 - 10.22.11879.972 days ago awesomeguy said:How do you round something down to the closest integer? int(num) or don't generate a float in the first place. EDIT: nevermind. I see what you're saying. That was a typo. "Round down". [Quote] [Link]
 When's the next event? : D [Quote] [Link]
 Blake Webmaster2083 Posts11 Cresco 7:1 - 17.75.76859.595 days ago I need to write a better autograder. [Quote] [Link]
 awesomeguy said:How do you round something down to the closest integer? import math math.floor [Quote] [Link]
 beary605 said:awesomeguy said:How do you round something down to the closest integer? import math math.floor No see, what I meant was that if you round something down, it's not necessarily the closest integer. [Quote] [Link]
 can you do another competition accept this time use java or c++ my python skills are quite sad at best [Quote] [Link]
 Well, that would be kind of pointless, since then someone could say "Do it in Python, I suck at Java." [Quote] [Link]
 Blake Webmaster2083 Posts11 Cresco 7:5 - 10.31.90855.967 days ago The eventual goal is to let submissions be in any popular language. The problem is creating auto-graders for each language. To round a number without a fancy math module call, add .5 then use int(). [Quote] [Link]
 Blake Webmaster2083 Posts11 Cresco 8:2 - 15.77.78852.694 days ago I have a rather simple solution for the sandboxing of an auto-grader for certain languages. This approach would work for: Python Ruby Java C# JavaScript VB.NET I'll try to get it working within the coming weeks. I'd love to add C++ and Perl, but I'm still at a loss on how to sandbox those without the overhead of VM's. Ideas welcome. [Quote] [Link]