World Clock
Challenge: Vancouver is 3 hours behind New York. London is 8 hours ahead of Vancouver. It is 4:00 am on Monday in New York. The object of the activity is to create an algorithm to calculate what time it is in the other two cities and your area. Use the Pen blocks to code the VR Robot to draw the minute hand and hour hand on each clock to show the time.
- Download the World Clock activity worksheet as a PNG file from this Google slideshow.
- To learn more about downloading .png files from slideshows, see this article.
- Select the Art Canvas+ Playground and upload the activity worksheet.
- To learn more about uploading images to the Art Canvas+ Playground, see this article.
- Design an algorithm to calculate what time it is in Vancouver, London, and your area.
- Declare variables to store the New York time, Vancouver time, London time, and your time.
- Determine the time difference between New York and your area.
- Use variables to create an expression for each clue sentence to calculate the Vancouver time, London time, and your time.
- Code the VR Robot to draw the minute hand and hour hand on each clock.
- Use the variable values to calculate the angle the VR Robot needs to turn to draw the hour hand on each clock.
- Use the [print] block to print the time in Vancouver, London, and your area to the Print Console.
Helpful Hints
- The hour hand on the clock turns 30 degrees (360 / 12) clockwise every hour since there are 12 hours in a 360-degree hour hand rotation.
Use the set block from the Variables category to set the variable to a given value.

Matching Python command
NewYork = 4
For help with creating variables and storing data in the project, please select the “TUTORIALS” button in VEXcode VR and choose the Storing Data Tutorial.


- For more information about the name rules for variables in VEXcode VR, please see this article.