0% found this document useful (0 votes)
32 views

CS108L Week 6 Activity Programyourrobot Solutions

The document contains programming solutions for multiple levels of a robot programming game or tutorial on the website programyourrobot.com. For each level, it provides the main program method and any additional functions with the lines of code needed to complete the level. Higher levels incorporate more complex programming elements like loops and functions within functions.

Uploaded by

Jump Kiatchaiwat
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
32 views

CS108L Week 6 Activity Programyourrobot Solutions

The document contains programming solutions for multiple levels of a robot programming game or tutorial on the website programyourrobot.com. For each level, it provides the main program method and any additional functions with the lines of code needed to complete the level. Higher levels incorporate more complex programming elements like loops and functions within functions.

Uploaded by

Jump Kiatchaiwat
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

ProgramYourRobot

 Solutions    
 

Programyourrobot.com  

Level  1  
MAIN  METHOD  

• 1  step  forward  
• 1  step  forward  
• 1  step  forward  
• 1  step  forward  
 
 
 
 
 
 
 
ProgramYourRobot  Solutions    

 
 
programyourrobot.com  
Level  2  
 
MAIN  METHOD  
• F1  
• Left  turn  
• 1  step  forward  
• Right  turn  
• F1  
• Light  Bulb  
 
FUNCTION  1  
• 1  step  forward  
• 1  step  forward  
 
 
 
 
ProgramYourRobot  Solutions    

 
Programyourrobot.com  
Level  3a  
MAIN  METHOD  
• F2  
• F1  
• F2  
• 1  step  forward  
• Light  
FUNCTION  1  
• Left  turn  
• F2  
• Right  turn  
FUNCTION  2  
• 1  step  forward  
• 1  step  forward  
• 1  step  forward  
 
 
 
ProgramYourRobot  Solutions    

 
programyourrobot.com  
Level  3aa  
MAIN  METHOD  
• F2  
• F1  
• F2  
• 1  step  forward  
• Light  
FUNCTION  1  
• Left  turn  
• F2      
• Right  turn  
FUNCTION  2  
• 1  step  forward  
• 1  step  forward  
• 1  step  forward  
 
 
 
 
ProgramYourRobot  Solutions    

 
Programyourrobot.com  
Level  3b  
 
MAIN  METHOD  
• F1  
• F2  
• 1  step  forward  
• Light  
 
FUNCTION  1  
• Left  turn  
• F2  
• Right  turn  
FUNCTION  2  
• 1  step  forward  
• 1  step  forward  
• 1  step  forward  
 
 
ProgramYourRobot  Solutions    

 
programyourrobot.com  
LEVEL  4  
MAIN  METHOD  
• F1  
• F2  
• Monster  Confrontation  –  2  steps  forward  
• F1  
• Right  turn  
• F1  
• Light  
FUNCTION  1  
• 1  step  forward  
• 1  step  forward  
• 1  step  forward  
FUNCTION  2  
• Left  turn  
• 1  step  forward  
 
 
ProgramYourRobot  Solutions    

 
Programyourrobot.com  
Level  5  
MAIN  METHOD  
• Loop  1  –  1  step  forward  repeated  4  times  
• F1  
• Loop  2  –  1  step  forward  repeated  4  times  
• F2  
• Loop  3  –  1  step  forward  repeated  4  times  
• Left  turn  
• 1  step  forward  
• Light  
FUNCTION  1  
• Left  turn  
• 1  step  forward  
• 1  step  forward  
• Left  turn  
FUNCTION  2  
• Right  turn  
• 1  step  forward  
• 1  step  forward  
• Right  turn  
 
ProgramYourRobot  Solutions    

programyourrobot.com
Level 6
FUNCTION 1
• Loop 1 - 1 step forward repeated 4 times
• Left turn
• 1 step forward
• Monster confrontation – 1 step forward left turn
• Loop 2 – 1 step forward repeated 4 times
• Right turn
• Loop 3 – 1 step forward repeated 2 times
• Right turn

FUNCTION 2
• Loop 1 - 1 step forward repeated 4 times
• Left turn
• Left turn
• Loop 2 – 1 step forward repeated 2 times
• Right turn
• Loop 3 – 1 step forward repeated 2 times

You might also like