Blockly Beginners Tutorial AMT Coding Challenge (OUCC). Draw Square, Hexagon

Creator Academy Australia · Beginner ·🛠️ AI Tools & Apps ·1y ago

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 LEGO Wedo 2.0 Kangaroo and Joey Demonstration
LEGO Wedo 2.0 Kangaroo and Joey Demonstration
Creator Academy Australia
2 LEGO Wedo 2.0 Koala Demonstration
LEGO Wedo 2.0 Koala Demonstration
Creator Academy Australia
3 LEGO WeDo 2.0 Eagle vs Rabbit Demonstration
LEGO WeDo 2.0 Eagle vs Rabbit Demonstration
Creator Academy Australia
4 Animatronic Australia: The Kangaroo
Animatronic Australia: The Kangaroo
Creator Academy Australia
5 How Semiconductors Work: 3D Animation
How Semiconductors Work: 3D Animation
Creator Academy Australia
6 LEGO Wedo 2.0 Koala
LEGO Wedo 2.0 Koala
Creator Academy Australia
7 First impressions and unboxing First Lego League: Into Orbit 2018
First impressions and unboxing First Lego League: Into Orbit 2018
Creator Academy Australia
8 FLL Into Orbit Team Ranking Gears talks about Artificial Gravity
FLL Into Orbit Team Ranking Gears talks about Artificial Gravity
Creator Academy Australia
9 FLL Into Orbit team Ev3lution discusses isolation in space
FLL Into Orbit team Ev3lution discusses isolation in space
Creator Academy Australia
10 PI3-BOT (Pie Bot) Prototype
PI3-BOT (Pie Bot) Prototype
Creator Academy Australia
11 Dynamic display stand for LEGO Bugatti Chiron (preview)
Dynamic display stand for LEGO Bugatti Chiron (preview)
Creator Academy Australia
12 Creative Kids TV announcement featuring Creator Academy
Creative Kids TV announcement featuring Creator Academy
Creator Academy Australia
13 LEGO WeDo 2.0 Guided Lesson: Milo
LEGO WeDo 2.0 Guided Lesson: Milo
Creator Academy Australia
14 LEGO SPIKE PRIME: Turtle Prime Demonstration
LEGO SPIKE PRIME: Turtle Prime Demonstration
Creator Academy Australia
15 LEGO SPIKE PRIME "Wheelchair Prime"
LEGO SPIKE PRIME "Wheelchair Prime"
Creator Academy Australia
16 10 Reasons why EV3 is SUPERIOR to SPIKE Prime
10 Reasons why EV3 is SUPERIOR to SPIKE Prime
Creator Academy Australia
17 Your first launch after installing Python: Python for Kids Webinar Highlight
Your first launch after installing Python: Python for Kids Webinar Highlight
Creator Academy Australia
18 What is "Sharpening the Saw": Python for Kids Webinar Highlight
What is "Sharpening the Saw": Python for Kids Webinar Highlight
Creator Academy Australia
19 Why We Use Comments: Python for Kids Webinar Highlight
Why We Use Comments: Python for Kids Webinar Highlight
Creator Academy Australia
20 Build a Scratch Dinosaur Park (Full Lesson)
Build a Scratch Dinosaur Park (Full Lesson)
Creator Academy Australia
21 Scratch 3.0: Cat and Mouse Game Stream (Krunal)
Scratch 3.0: Cat and Mouse Game Stream (Krunal)
Creator Academy Australia
22 Python Tutorial: Make a Toilet Paper Calculator (Full Lesson)
Python Tutorial: Make a Toilet Paper Calculator (Full Lesson)
Creator Academy Australia
23 Scratch 3.0 Tutorial: Making a chatbot that plays 'heads or tails' (Full Lesson)
Scratch 3.0 Tutorial: Making a chatbot that plays 'heads or tails' (Full Lesson)
Creator Academy Australia
24 Getting Started with MicroPython on SPIKE PRIME (old)
Getting Started with MicroPython on SPIKE PRIME (old)
Creator Academy Australia
25 Easter Egg Game Tutorial in Scratch (Full Lesson)
Easter Egg Game Tutorial in Scratch (Full Lesson)
Creator Academy Australia
26 Accessing Weather API with Python (Highlights)
Accessing Weather API with Python (Highlights)
Creator Academy Australia
27 Accessing Translate API with Python (Highlights)
Accessing Translate API with Python (Highlights)
Creator Academy Australia
28 Scissors, Paper, Rock with Scratch 3.0 (Highlights)
Scissors, Paper, Rock with Scratch 3.0 (Highlights)
Creator Academy Australia
29 Making a really scary game with Scratch 3.0 (Highlights)
Making a really scary game with Scratch 3.0 (Highlights)
Creator Academy Australia
30 Making a Lemmings game with Scratch 3.0 (Highlights)
Making a Lemmings game with Scratch 3.0 (Highlights)
Creator Academy Australia
31 Space Navigation Game in Scratch (Highlights)
Space Navigation Game in Scratch (Highlights)
Creator Academy Australia
32 Scratch Supercat Game (Full Lesson)
Scratch Supercat Game (Full Lesson)
Creator Academy Australia
33 Introduction to Robots with LEGO Wedo 2.0 (Full Lesson)
Introduction to Robots with LEGO Wedo 2.0 (Full Lesson)
Creator Academy Australia
34 Getting Started With LEGO Spike Prime (Full Lesson)
Getting Started With LEGO Spike Prime (Full Lesson)
Creator Academy Australia
35 Scratch Walk Cycle Animation Tutorial (Full Lesson)
Scratch Walk Cycle Animation Tutorial (Full Lesson)
Creator Academy Australia
36 Building a Scissor Lift with LEGO Simple Machines (Highlights)
Building a Scissor Lift with LEGO Simple Machines (Highlights)
Creator Academy Australia
37 EV3 datalogging RPM challenge (highlights)
EV3 datalogging RPM challenge (highlights)
Creator Academy Australia
38 Learning about buses with LEGO (Full Lesson)
Learning about buses with LEGO (Full Lesson)
Creator Academy Australia
39 Make "Flappy Bird" in Scratch 3.0 (Highlights)
Make "Flappy Bird" in Scratch 3.0 (Highlights)
Creator Academy Australia
40 "Memory Arrows" game with Scratch 3.0 Lists (Highlights)
"Memory Arrows" game with Scratch 3.0 Lists (Highlights)
Creator Academy Australia
41 Learning about Gear Ratios with LEGO Simple Machines (Highlights)
Learning about Gear Ratios with LEGO Simple Machines (Highlights)
Creator Academy Australia
42 Scratch 3.0 Bouncing Ball with Stretch, Speed and Acceleration (Full Lesson)
Scratch 3.0 Bouncing Ball with Stretch, Speed and Acceleration (Full Lesson)
Creator Academy Australia
43 LEGO SPIKE Prime Order Tracking Robot (Highlights)
LEGO SPIKE Prime Order Tracking Robot (Highlights)
Creator Academy Australia
44 Scratch 3.0 Race Guesser (Full Lesson)
Scratch 3.0 Race Guesser (Full Lesson)
Creator Academy Australia
45 How Banks Work - a quick explanation for kids
How Banks Work - a quick explanation for kids
Creator Academy Australia
46 SPIKE Prime Safe + importance of passwords (Highlights)
SPIKE Prime Safe + importance of passwords (Highlights)
Creator Academy Australia
47 Combination Safe Coding Guide with LEGO SPIKE Prime
Combination Safe Coding Guide with LEGO SPIKE Prime
Creator Academy Australia
48 LEGO SPIKE Prime Parcel Scanning Robot
LEGO SPIKE Prime Parcel Scanning Robot
Creator Academy Australia
49 Building "Addy" the Addition Chatbot
Building "Addy" the Addition Chatbot
Creator Academy Australia
50 SPIKE 2.x PID Balancer with Scratch for SPIKE Prime / 51515: Gyro Girl
SPIKE 2.x PID Balancer with Scratch for SPIKE Prime / 51515: Gyro Girl
Creator Academy Australia
51 What is Procedural Programming
What is Procedural Programming
Creator Academy Australia
52 Zombie game in SCRATCH (plus horrifying zombie facts!)
Zombie game in SCRATCH (plus horrifying zombie facts!)
Creator Academy Australia
53 Swarming Bugs Scratch Game
Swarming Bugs Scratch Game
Creator Academy Australia
54 LEGO Mindstorms/SPIKE Prime Scanner and Printer
LEGO Mindstorms/SPIKE Prime Scanner and Printer
Creator Academy Australia
55 Fishing Game with SCRATCH (For Fathers Day!)
Fishing Game with SCRATCH (For Fathers Day!)
Creator Academy Australia
56 Measuring Paper Plane Speed with SPIKE Prime Line Graphs
Measuring Paper Plane Speed with SPIKE Prime Line Graphs
Creator Academy Australia
57 Comparing Mindstorms Robot Inventor and SPIKE Prime
Comparing Mindstorms Robot Inventor and SPIKE Prime
Creator Academy Australia
58 Code a 'Knock Knock Joke' game in Scratch 3.0
Code a 'Knock Knock Joke' game in Scratch 3.0
Creator Academy Australia
59 Creator Academy Australia Live Stream
Creator Academy Australia Live Stream
Creator Academy Australia
60 Discovering LEGO Mindstorms/SPIKE Gyro Pitch Deadzone
Discovering LEGO Mindstorms/SPIKE Gyro Pitch Deadzone
Creator Academy Australia

Related Reads

📰
AI Shorts generators you can actually edit (not a black box)
Learn to identify editable AI video generators and when to use black box solutions
Dev.to · Reel Mint
📰
I Wanted To Automate Website Testing Without Writing Hundreds Of Scripts. AI Changed The Approach.
Learn how AI-powered testing is revolutionizing website testing by shifting from script-based automation to goal-based testing, increasing efficiency and reducing manual effort
Medium · AI
📰
Claude Count Tokens API: Know What a Request Costs Before You Send It (Beginner’s Guide)
Learn to use the Claude Count Tokens API to estimate request costs before sending them, optimizing your AI workflow
Medium · AI
📰
Claude Count Tokens API: Know What a Request Costs Before You Send It (Beginner’s Guide)
Learn to use the Claude Count Tokens API to estimate request costs before sending them, optimizing your workflow and budget
Medium · Programming
Up next
Microsoft Bot Framework Web Chat Authentication with Microsoft Graph API Call using Auth Token in C#
Dewiride Technologies
Watch →