I'm in a computer programming course on Florida Virtual School, and I'm stressing out over our current assignment, because it seems like it should be easy.
The point of the assignment is to write a program to count how many times the Scribbler robot stalls and then print the results on the screen, but I can't seem to count it.
Here's my code:
from myro import* init("simulator") def pressC(): key = "x" while key != "c": key = raw_input("Enter c to continue: ") def stopStalling(): stallIndication = getStall() if(stallIndication == 1): backward(1,1) else: forward(1,1) def numStalls(stallNumber): stallNum = 0 for count in range(stallIndication): result = getStall() if(result == 1): stallNum = stallNum + 1 return stallNum def main(): pressC() senses() while timeRemaining(30): stopStalling() numStalls(stallNumber) stop() main()
Anything helpful would be greatly appreciated! It's my senior year, and I'm just ready to finish this class, haha. Thanks in advance!