Error
Errors:
Grader Results
Pass | Test | Message | |
---|---|---|---|
- | Test results will show here. | - |
Errors:
Karel is participating in her neighborhood’s adopt a street program! This means that Karel is in charge of keeping her adopted street clean and litter-free. Help Karel beautify her community by picking up all of the yellow tennis balls as she walks down the street. Your program should match the Ending World.
Hint: Use for loops to make Karel’s job easier!
Read me! Copy your code when you are done! You will need it when you get to Cleanup Challenge Level 3.
Debugging Tips
- Basic Commands:
- Use the error message to identify where your mistake is.
- Check that you correctly spelled the command.
- Check that you included the parentheses.
- Ensure all commands are all the way to the left - there are no spaces before the command.
- For For Loops:
- Check that you included the colon.
- Check your indentation. If you press “enter “after the colon, the editor should automatically indent for you.
- If you need to adjust your indentation, use the “tab” key.
Ending World
Karel's Built in Commands
Karel Commands
|
|
|
|
|
UltraKarel
UltraKarel Commands
|
UltraKarel Conditions
|
|
Color
Random
Functions
Writing a Function
Writing a function is like teaching karel a new word.
Naming Functions: You can name your functions whatever you want, but you can't have spaces in the function name.
Remember that commands in functions must be indented one level
Calling a Function
You call a function to tell the computer to actually carry out the new command.
Conditional Statements
Remember that comands in conditional statements must be indented one level.If statements
If/Else statements
Example of if statements
Karel Conditions
Don't forget the()
at the end!
|
|