Challenges
Python
Robot
- First drive
- Square1 coin
- Loop square1 coin
- Hexagon2 coins
- Staircase2 coins
- Fetch the ball2 coins
- Star3 coins
- Robot soccer2 coins
Drone
Python
Make it talk
- Print your name.
- Print your crew's call sign.
- Bonus: print a countdown: 3, 2, 1, Lift off!
Text goes inside quote marks, inside the brackets. Use one print() per line.
Python
Name your variables
- Make a variable called
name, set to your name. - Make a variable called
fav_number, set to your favourite number. - Bonus: print a sentence that uses your variables.
Names can't have spaces, so use an underscore. Text needs quote marks. Numbers don't.
Python
Loop the loop
- Print Lift off! 10 times, using only 2 lines of code.
- Loop over
range(5)and printieach time. Which numbers appear? - Bonus: print Ready once, Go! three times, then Landed once.
The first line ends with a colon. The line that repeats is indented under it.
Robot
First drive
- Drive forward 30 cm.
- Then drive back to where you started, without turning.
- Bonus: slide 30 cm to the right, then back again.
The second number is the direction. 0 is forward. Which number is backwards?
Robot
Square
1 coin
- Drive a square with 40 cm sides.
- Finish where you started.
- Write every move out, one line at a time.
A square has 4 sides and 4 corners. Each corner is a quarter turn.
Robot
Loop square
1 coin
- Drive the same square using a loop and a variable called
side. - Change
sideto 600 and it should still finish where it started.
Look at your Square program. Which lines repeat? Put them in a loop, and use side instead of a number.
Robot
Hexagon
2 coins
- Drive a hexagon with 30 cm sides.
- Use a loop.
- Finish where you started.
Going all the way round is 360 degrees. Share that between 6 corners.
Robot
Staircase
2 coins
- Climb 3 steps, each 20 cm tall and 20 cm deep.
- Use a loop.
- No
turn_forallowed.
The robot can drive sideways without turning. Change the direction number.
Robot
Fetch the ball
2 coins
- The ball is 60 cm straight ahead.
- Drive to it, collect it and bring it back to the start.
- Put it down with
robot.kicker.place().
Drive straight into the ball and the magnet holds it. Drive back without turning so the ball stays at the front.
Robot
Star
3 coins
- Drive a five-pointed star with 50 cm lines.
- Use a loop.
- Bonus challenge for crews who finish early.
Each turn is bigger than 90. Going round a star turns the robot all the way round twice.
Robot
Robot soccer
2 coins for a coded goal
1 coin for a driven goal
- The goal is to the right.
- Collect the ball and score.
- Driven goals use the AIM controller.
Collect the ball first. Then turn to face the goal before you kick.
Drone
Yellow rings
- Plug a controller into a laptop.
- Open VEXcode AIR and choose the Simulator tab.
- Fly through both yellow rings, then land on the platform.
Use small stick movements. Climb to the height of the rings before you fly forward.
Drone
Land on target
1 coin
- Take off, fly to the target and land on it.
- The target is 1 m ahead and 50 cm to the right.
- Your landing must touch the target.
Drone distances are in millimetres, and the direction comes first.
Drone
Landing showdown
2 coins for the closest landing
- Each crew flies its Land on target program once.
- Measure from the centre of the target to the centre of the drone.