Ask your own question, for FREE!
MIT 6.00 Intro Computer Science (OCW) 24 Online
OpenStudy (anonymous):

In PS5, how do I use the test harness to test my code? I see the test harness code, but am unsure how to apply it to my solutions. I'm currently just trying to test my code for problem 3, the TitleTrigger.

OpenStudy (hba):

Can you please post the problem here?

OpenStudy (anonymous):

Problem 3 of this set: http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-00sc-introduction-to-computer-science-and-programming-spring-2011/unit-2/lecture-12-introduction-to-simulation-and-random-walks/MIT6_00SCS11_ps5.pdf The instructions say I should be able to test my solution to problem 3 with the test code, but I'm unsure of how to do so. I've attached the python file with the test harness in it (the relevant code I think is the test1TitleTrigger defined in the ProblemSet5 class). To see all of the files for the entire assignment, they can be seen here: http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-00sc-introduction-to-computer-science-and-programming-spring-2011/unit-2/lecture-12-introduction-to-simulation-and-random-walks/ If it would be helpful for me to post all of my code so far and all of the testing code, let me know (I'm starting to think this might be easiest for y'all, but not sure). Thanks in advance for any assistance.

OpenStudy (anonymous):

I figured it out. The test harness referenced a different file name than the name of the file I was coding in, but after I fixed that, things went smoothly.

OpenStudy (hba):

Okay good (y)

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!