Blockly Beginners Tutorial AMT Coding Challenge (OUCC). Draw Square, Hexagon
Key Takeaways
Draws a square and hexagon using Blockly
Full Transcript
that's it guys good day I am Mr code and I am streaming from Sydney Australia so we are going to uh look at this beers. website beers. and then we're going to go into challenges up the top uh top right you click on challenges up the top right then you go into novices 2025 coding challenge specimen novices inside novices we're going to do two questions today we're going to do draw a square and hexagon now uh when you are doing these questions uh keep in mind that uh not all questions are like this exact one uh when we learn the principles of these questions we should uh use it as experience to deal with the uh harder questions uh that do come out of the exam because these sample questions tend to be a little on the easier side okay having said that let's have a look at draw a square okay draw a square here write a program that moves the turtle so that it draws the square shown in Gray okay so I don't actually have a outline here so I'm going to refresh it here we are all right there's a hint here that says that uh we can um uh use the hide menu button above here give you some more programming space and that's always a great idea okay um if you don't need the menu uh just hide it now this Square here uh if you have a look at your turtle uh it is facing north okay the the big circle of the turtle its head is where it's facing now when it's looking North then when I move forward when I do a a block like this to move forward it'll move in the direction of the head okay so uh if I move forward now it'll start um uh drawing uh a line forward for 80 units press run you can see that okay this is not completely correct yet okay so we need to make it so that our code makes our Turtle draw the whole Square in one go okay so um when we are looking at this uh it's worth measuring um uh these lines and the great thing is that they've positioned this Square really close to these um uh the X and Y axis ruler so uh you can see that uh the the the sides of the square are at 200 when we start and then it ends around about uh slightly less than 50 okay so it's somewhere uh about 150 something all right so if this is 50 units then this is 50 units 50 units 150 maybe okay so if we go move forward 150 and press run you'll see that we are still a little bit off so let's try 160 ah and that looks much more like it after you've moved forward uh which way do we turn we have to turn towards the left anticlockwise right so here we go turn to the left for 90° 90° is by default there uh and that will be great so if I press run you can see that we've made our first line and then also we've turned to the left hand side down the next line okay what does this pen up um block do if I go pen up and Pen down if you imagine that our Turtle when it is drawing it it's like a pen and it is down on the paper Okay so pen down means it is drawing a line okay uh whereas pen up means that you move the turtle but it doesn't draw anything all right so we don't need to touch this block for this particular challenge so we move forward 160 down we turn left 90° um then we have to do it again because all four sides of a square are equal so I need to move forward 160 and then turn left again but if you are in an exam situation right we need to do things quickly now this is question that should take you less than 5 minutes right and if you keep dragging and dropping these blocks might take you too much time so what do we do after you've worked out what is the correct length of this Square you can right click and then hit duplicate on the Block right click duplicate right click duplicate and this is going to speed things up okay 1 2 3 four sides of the square now if you are experienced with blockly you might be wondering hey why is it that there's no Loop here uh I can just use a repeat block a loop block and then repeat this four times well that's the Challenge from OUC sometimes they will limit the number of blocks that you have in your disposal disposal sorry uh so that you have to find an alternate method to solve these problems s okay so obviously uh people who are used to coding will probably know that uh a loop block will be really really helpful in this situation but uh for this case we do not have any uh loop blocks so that's why we have to drag these blocks in and then we have to duplicate them okay run the code and it looks like our answer is now correct see we have a correct nice green correct message all right if you have any questions about these um uh these challenges make sure you comment in the comment section below or send me a message I will do my best to answer everybody you hit the next one we're going to do hexagon so hexagon is uh on the left hand side if you unhide your menu you'll find hexagon and then here we are going to do something very similar to drawing the square except in last time when we were drawing we had to turn towards the left this time we have to turn towards the right okay write a program that draws the hexagon shown below you not allowed to use more than six blocks now that's important because if I had done move forward turn move forward turn move forward turn each time that's like 12 blocks right so it's saying that we can't use more than six blocks so if we try to do exactly the same thing as we did for um uh our Square it will not work it will fail okay so let's see how far we have to move forward we start at with this line we start at the 200 Mark 200 at the Y value and it ends at the 100 Mark so uh that means that 200 - 100 is 100 so we move forward 100 that should be exactly the length of the line of this hexagon the side of this hexagon and then if you you read the um uh the the hints it says for more programming space yeah hide the menu above but also it says the side lengths are 100 oh so I I missed that I I should have read that first before I started calculating right and it says the turtle will need to turn 60° quite often to draw a hexagon so move forward 100 turn to the right 60° move forward for 100 turn to the right and then you're going to see that we are now starting to draw this uh block but we've run out of blocks the six blocks that we are allowed to use includes these numbers that are attached to my blocks okay so that's three blocks with three numbers so that's six blocks now we need to work out how to do this six times okay so we need to move forward turn right 60° six times right but we can't copy and paste it so this is what I mentioned before there is now a new category of blocks here called Loops if you go inside it says there is a repeat 10 times if you use this block anything that you put inside this block gets repeated this many times so if I put this move forward and turn right here it's going to repeat that 10 times of course 10 times is going to be Overkill we only needed to do it six times press run and that's it the answer is now correct okay remember when you are using um uh these Turtle blocks um don't always count on all the blocks being available to you all the time there are some questions that will reduce the functionality of blocks for example limiting the number of blocks you can use and there's also some um some questions that will eliminate those blocks all together like the draw square one where it didn't have any Loops okay so keep that in mind when you're going forward doing this exam if you want to do any other questions for uh OUC you can check out my replays I've got hundreds of replays uh just waiting for you to check out uh in case uh you want to do more of these coding questions at home and that's it for us today I will see you again next week bye-bye for
Original Description
I stream live coding sessions every week, and members can get access to the live streams as well as replays of past lessons.
Topics include Scratch, Blockly, Python and OUCC.
Join our livestreams by becoming a member:
https://www.youtube.com/channel/UC_EJBSPUTFORXV6gbQFdRgA/join
This members-only lesson teaches advanced student Python Tips
Watch on YouTube ↗
(saves to browser)
Sign in to unlock AI tutor explanation · ⚡30
Playlist
Uploads from Creator Academy Australia · Creator Academy Australia · 0 of 60
← Previous
Next →
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
LEGO Wedo 2.0 Kangaroo and Joey Demonstration
Creator Academy Australia
LEGO Wedo 2.0 Koala Demonstration
Creator Academy Australia
LEGO WeDo 2.0 Eagle vs Rabbit Demonstration
Creator Academy Australia
Animatronic Australia: The Kangaroo
Creator Academy Australia
How Semiconductors Work: 3D Animation
Creator Academy Australia
LEGO Wedo 2.0 Koala
Creator Academy Australia
First impressions and unboxing First Lego League: Into Orbit 2018
Creator Academy Australia
FLL Into Orbit Team Ranking Gears talks about Artificial Gravity
Creator Academy Australia
FLL Into Orbit team Ev3lution discusses isolation in space
Creator Academy Australia
PI3-BOT (Pie Bot) Prototype
Creator Academy Australia
Dynamic display stand for LEGO Bugatti Chiron (preview)
Creator Academy Australia
Creative Kids TV announcement featuring Creator Academy
Creator Academy Australia
LEGO WeDo 2.0 Guided Lesson: Milo
Creator Academy Australia
LEGO SPIKE PRIME: Turtle Prime Demonstration
Creator Academy Australia
LEGO SPIKE PRIME "Wheelchair Prime"
Creator Academy Australia
10 Reasons why EV3 is SUPERIOR to SPIKE Prime
Creator Academy Australia
Your first launch after installing Python: Python for Kids Webinar Highlight
Creator Academy Australia
What is "Sharpening the Saw": Python for Kids Webinar Highlight
Creator Academy Australia
Why We Use Comments: Python for Kids Webinar Highlight
Creator Academy Australia
Build a Scratch Dinosaur Park (Full Lesson)
Creator Academy Australia
Scratch 3.0: Cat and Mouse Game Stream (Krunal)
Creator Academy Australia
Python Tutorial: Make a Toilet Paper Calculator (Full Lesson)
Creator Academy Australia
Scratch 3.0 Tutorial: Making a chatbot that plays 'heads or tails' (Full Lesson)
Creator Academy Australia
Getting Started with MicroPython on SPIKE PRIME (old)
Creator Academy Australia
Easter Egg Game Tutorial in Scratch (Full Lesson)
Creator Academy Australia
Accessing Weather API with Python (Highlights)
Creator Academy Australia
Accessing Translate API with Python (Highlights)
Creator Academy Australia
Scissors, Paper, Rock with Scratch 3.0 (Highlights)
Creator Academy Australia
Making a really scary game with Scratch 3.0 (Highlights)
Creator Academy Australia
Making a Lemmings game with Scratch 3.0 (Highlights)
Creator Academy Australia
Space Navigation Game in Scratch (Highlights)
Creator Academy Australia
Scratch Supercat Game (Full Lesson)
Creator Academy Australia
Introduction to Robots with LEGO Wedo 2.0 (Full Lesson)
Creator Academy Australia
Getting Started With LEGO Spike Prime (Full Lesson)
Creator Academy Australia
Scratch Walk Cycle Animation Tutorial (Full Lesson)
Creator Academy Australia
Building a Scissor Lift with LEGO Simple Machines (Highlights)
Creator Academy Australia
EV3 datalogging RPM challenge (highlights)
Creator Academy Australia
Learning about buses with LEGO (Full Lesson)
Creator Academy Australia
Make "Flappy Bird" in Scratch 3.0 (Highlights)
Creator Academy Australia
"Memory Arrows" game with Scratch 3.0 Lists (Highlights)
Creator Academy Australia
Learning about Gear Ratios with LEGO Simple Machines (Highlights)
Creator Academy Australia
Scratch 3.0 Bouncing Ball with Stretch, Speed and Acceleration (Full Lesson)
Creator Academy Australia
LEGO SPIKE Prime Order Tracking Robot (Highlights)
Creator Academy Australia
Scratch 3.0 Race Guesser (Full Lesson)
Creator Academy Australia
How Banks Work - a quick explanation for kids
Creator Academy Australia
SPIKE Prime Safe + importance of passwords (Highlights)
Creator Academy Australia
Combination Safe Coding Guide with LEGO SPIKE Prime
Creator Academy Australia
LEGO SPIKE Prime Parcel Scanning Robot
Creator Academy Australia
Building "Addy" the Addition Chatbot
Creator Academy Australia
SPIKE 2.x PID Balancer with Scratch for SPIKE Prime / 51515: Gyro Girl
Creator Academy Australia
What is Procedural Programming
Creator Academy Australia
Zombie game in SCRATCH (plus horrifying zombie facts!)
Creator Academy Australia
Swarming Bugs Scratch Game
Creator Academy Australia
LEGO Mindstorms/SPIKE Prime Scanner and Printer
Creator Academy Australia
Fishing Game with SCRATCH (For Fathers Day!)
Creator Academy Australia
Measuring Paper Plane Speed with SPIKE Prime Line Graphs
Creator Academy Australia
Comparing Mindstorms Robot Inventor and SPIKE Prime
Creator Academy Australia
Code a 'Knock Knock Joke' game in Scratch 3.0
Creator Academy Australia
Creator Academy Australia Live Stream
Creator Academy Australia
Discovering LEGO Mindstorms/SPIKE Gyro Pitch Deadzone
Creator Academy Australia
More on: Visual / Block Coding
View skill →Related Reads
📰
📰
📰
📰
AI Shorts generators you can actually edit (not a black box)
Dev.to · Reel Mint
I Wanted To Automate Website Testing Without Writing Hundreds Of Scripts. AI Changed The Approach.
Medium · AI
Claude Count Tokens API: Know What a Request Costs Before You Send It (Beginner’s Guide)
Medium · AI
Claude Count Tokens API: Know What a Request Costs Before You Send It (Beginner’s Guide)
Medium · Programming
🎓
Tutor Explanation
DeepCamp AI