# How to Draw a Circle in a Square CodeHS

Posted on

In CodeHS, you will learn how to program in Python. The term ‘Python’ means a language which is often used in Machine Learning, Data Analysis, websites like CodeHS and many more. In Python, you will learn commands, functions and control structures by writing creative programs and solving puzzles for Tracy to follow.

In the Python course, you will be allowed to draw ‘a circle in a square’. Drawing a circle in a square is one of the challenges that you find in Python. Unfortunately, many users find it hard to draw a circle in a square. If you’re looking for a guide to draw a circle in a square, you can dive into our post to find out the guide.

Drawing a Circle in a Square in CodeHS, Here’s How!

It’s such a normal if you get hard to draw a circle in a square in CodeHS. However, drawing a circle in a square will need the correct command to successfully make a circle in a square. To draw a circle in a square, you will use one parameter called radius for variable.

The parameter will work to draw both of them and will also combine the two shapes over using the same idea of radius that is half blunt the circle or double the radius if the entire length of the square, so you can get started to use tracy to go to the bottom left starting from the middle over.

To start drawing a circle in a square, you can use the command that we can show below. The command will write a program that requires you for a radius value. Then, you can  draw a blue circle inside a red square in the center of the canvas.

Here’s the command you can use to draw a circle in a square:

 speed(5) radius = int(input(“What radius do you want the square be?: “))

With this function, it will draw a blue circle inside the red square.

 def draw_blue_circle(): backward(radius) color(“blue”) begin_fill() pendown() circle(radius) end_fill()

With this function, it will draw a red square based on the radius the user type.

 def draw_red_square(): penup() right(90) forward(radius) left(90) color(“red”) pendown() begin_fill() forward(radius) for i in range(2): left(90) forward(radius*2) left(90) forward(radius*2) end_fill()

Now, you will call the two function codes we set.

 draw_red_square() draw_blue_circle()

Generally, that’s the command that many people use to draw a circle in a square. Certainly, there are so many command forms that some people use when drawing a circle in a square. That means you can find another command to draw a circle in a square if the command shown above cannot allow you to draw a circle in a square.

No worries! There are a number of tutorial videos on YouTube that show you a guide to draw a circle in a square in CodeHS for Python challenge. Well, you can watch some following videos to draw a circle in a square, here they are:

• A video entitled ‘Circle in a Square [4.3.5 or 2.13.5] [Python] [CodeHS] [Explained]’ uploaded by David Steckler Channel that you can watch here.
• A video entitled ‘Making a Circle out of Squares – Programming Foundations with Python’ uploaded by Udacity Channel that you can watch here.
• A video entitled ‘How to make a Square in Python(turtle) on CodeHS’ uploaded by Jody Michael Channel that you can watch here.
• A video entitled ‘Circles in Javascript’ uploaded by CodeHS Channel that you can watch here.
• A video entitled ‘Row of Circles [2.2.5] [For Loops] [Tracy] [CODEHS]’ uploaded by David Steckler Channel that you can watch here.

About Python with Tracy Course in CodeHS

The CodeHS provides Python with the Tracy the Turtle course that teaches students the basics of programming in the Python language. The term ‘Tracy’ means a turtle which can be instructed with the use of various commands to draw scenes on a canvas, including to draw a circle in a square.

In CodeHS, the students will learn Python functions, commands and control structure by writing creative programs and solving puzzles for Tracy to follow. This course uses a blended classroom approach.

The content in the Python course is a mix of web-based and physical activities. Furthermore, the students will write and run the code in the browser and engage in-person collaborative exercises with classmates. Well, the teachers will use tools and resources that are provided by CodeHS to leverage time in the classroom and give focused 1-on-1 attention to students.

Using the CodeHS online editor, the students will write and run programs in the browser. In the Python course, each lesson will include at least one formative short multiple choice quiz. You can also browse the content of this course here.

Additionally, Python with Tracy the turtle course is designed to complete beginners with no previous background in computer science or as a secondary introductory course which explores a new language, once Introduction to Computer Science in JavaScript course. Moreover, the course is extremely visual, interactive and dynamic that makes it engaging for those new to computer science.

The Python with Tracy turtle course consists of 6 sections including:

• Tracy’s World: You can learn about the world Tracy lives in and how to use commands that she will understand more.
• Moving Tracy Efficiently: You can establish the commands that they’ve learned to instruct Tracy around all parts of her world.
• Designing and Communicating Solutions: You can explore beneficial ways to break down large problems to write readable and successful programs.
• Controlling Tracy with Variables: You can learn to use variables and user input in their Tracy programs.
• Making Decisions: You can learn how to utilize if-self statements and while loops to instruct Tracy to make decisions based on conditions.
• Tracy Challenges: You can put together all of the concepts that they’ve learned to resolve advanced Tracy puzzles.

Okay, those are all the sections that you can learn on Introduction Python with Tracy turtle course. If you want to see the entire syllabus, you can just click this link or also click to explore the full course here.