CodeHS Python Answers Key

Posted on

Python is one of the courses that you can learn on CodeHS, an online platform for learning programming and computer science concepts. With Python, the students will be able to create various different programs that are not specialized for any specific problems.

There are some things regarding Python, including data analysis and machine learning, web development, automation or scripting, software testing and prototyping and everyday tasks. On CodeHS, the course of Python is designed to allow the students to build their own websites and software.

CodeHS Python Answers Key

CodeHS Python Answer Keys

Are you currently taking a Python course on CodeHS and looking for the answer keys to Python assignments? If so, you do not have to worry, as this post will show you a list of Python answer keys that we got from quizizz.com. The answers of Python’s assignment were uploaded by Anthony Sinapi.

Here’s a list of Python’s assignment answers available on CodeHS:

QUESTIONS:

  1. How would I tell Tracy to move forward 100 pixels?

a. forward 100
b. move(100)
c. Tracy, move forward 100 pixels
d. forward(100)

  1. When using the circle() command, what value do we put inside the parentheses?

a. The radius of the circle
b. The center of the circle
c. The diameter of the circle
d. The width of the circle

  1. When Tracy is facing right, from what location does she start drawing her circle?

a. The top of the circle
b. The bottom of the circle
c. The left side of the circle
d. The middle of the circle

  1. Where does Tracy always start in the grid world?

a. At the (0,0) coordinate in the bottom left hand corner of the canvas
b. At the (-200,-200) coordinate in the bottom left hand corner of the canvas
c. At the (0,0) coordinate in the middle of the canvas
d. At the (-200,-200) coordinate in the middle of the canvas

  1. What are the dimensions of Tracy’s world?

a. 200 pixels x 200 pixels
b. 400 pixels x 200 pixels
c. 400 pixels x 400 pixels
d. 200 pixels x 400 pixels

  1. Which commands would move Tracy forward 100 pixels?

A. forward(100)
B. backward(-100)
C. forward(-100)

a. A, B, and C
b. A only
c. B and C
d. A and B

  1.  Tracy always starts facing in which direction?

a. Up
b. Down
c. Right
d. Left

  1. If Tracy is facing right, which of the following commands can be used to turn her to face up?

A. left(90)
B. turn(up)
C. right(-90)
D. setposition(90)

a. A only
b. A and C
c. A, B, and C
d. A, B, C, and D

  1. If Tracy started facing right, which direction would she be facing after we ran the following code If Tracy started facing right, which direction would she be facing after we ran the following code:

a. Up
b. Down
c. Left
d. Right

  1. Which of the following is NOT a reason for loops are useful when writing code?

a. Loops help us write the same program with fewer lines of code
b. Loops let us make shapes of multiple sizes
c. Loops make it easier to alter code once it’s written
d. Loops make our code easier to read

  1. If Tracy starts at the left edge of the canvas and moves forward 50 pixels, how many times will this code need to be repeated to have Tracy reach the right edge of the canvas?

a. 4
b. 8
c. 10
d. 50

  1.  If I use the command right(180), which way will Tracy turn?

a. She will turn in a full circle
b. She will turn and face the opposite direction
c. She will turn to face up
d. She will turn to face down

  1. If you wanted Tracy to complete her command immediately, which speed value would you use?

a. 0
b. 1
c. 5
d. 10

  1. Which of the statement are NOT true about comments:

a. Written in English for humans to read and understand
b. Helps other programmers understand your code
c. Helps keep the programmer organized
d. Only needed when a program is over 50 lines

  1.  What symbol is used at the beginning of an in-line comment?

a. ”
b. !
c. #
d. /

  1. What punctuation is needed to begin a multi-line comment?

a. $
b. “””
c. *
d. /

  1. Which of the names below follow all naming rules?

a. my_function
b. Draw a line
c. 4_circles
d. make_squares

  1. If I am creating a function that is going to draw 2 squares, which of the following would be the best name option?

a. Draw_Two_Squares
b. draw_squares
c. draw_shapes
d. 2_squares

  1. What 3 letters are used at the beginning when defining a function?

a. fun
b. def
c. for
d. sub

  1. Which is the proper way to call the function three_circles?

a. def three_circles()
b. three_circles()
c. run three_circles()
d. for three_circles()

  1.  If you want Tracy to move forward 100 pixels without making a line, what set of commands should you write?

a. penup()
forward(100)
b. penup(100)
c. forward(100)
penup()
d. forward(-100)

  1. How would I change Tracy’s trail to a yellow line with a thickness of 10 pixels?

a. Color(Yellow)
thickness(10)
b. color(“yellow”)
pensize(10)
c. color yellow()
pensize(10)
d. color yellow():
pensize(10)

  1. What would be the output of the following command?

circle(50,360,5)

a. circle
b. round
c. Pentagon
d. circle2

  1. What would be the output of the following command?

circle(50,180,3)

a. circle1
b. line
c. triangle
d. semi-circle

  1. What is the correct way to draw a circle that is filled in?

a. begin_fill() circle(20)
end_fill()
b. circle(begin_fill, 20, end_fill)
c. ircle(20) begin_fill() end_fill()
d. circle(20) end_fill()

ANSWER KEYS:

  1. d. forward(100)
  2. a. The radius of the circle
  3. b. The bottom of the circle
  4. c. At the (0,0) coordinate in the middle of the canvas
  5. c. 400 pixels x 400 pixels
  6. d. A and B
  7. c. Right
  8. b. A and C
  9. c. Left
  10. b. Loops let us make shapes of multiple sizes
  11. b. 8
  12. b. She will turn and face the opposite direction
  13. a. 0
  14. d. Only needed when a program is over 50 lines
  15. c. #
  16. b. “””
  17. d. make_squares
  18. b. draw_squares
  19. b. def
  20. b. three_circles()
  21. a. penu()
    forward(100)
  22. b. color(“yellow”)
  23. c.
  24. a
  25. b. circle(20) begin_fill() end_fill()

Leave a Reply

Your email address will not be published.