Here is my code:
# This program makes the robot calculate the average amount of light in a simulated room
from myro import *
init(\"simulator\")
from random im
If you want to return multiple items from scan()
, don't use three separate return
statements. Instead, do this:
return leftLightSeries, centerLightSeries, rightLightSeries
Also, when you call the function, you have to assign variable(s) to the returned values; it won't automatically create new local variables with the same names. So in main
, call scan()
like this:
leftLightSeries, centerLightSeries, rightLightSeries = scan()