Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Document preview thumbnail
Preview 1 out of 2 pages
Exam (elaborations)

Codehs Python Exam | Questions with Correct Answers| Verified

Document preview thumbnail
Preview 1 out of 2 pages

Codehs Python Exam | Questions with Correct Answers| Verified

Content preview

Codehs Python Exam | Questions with Correct Answers| Verified
for loopAnswerrepeats a set of commands


indentationAnswerThe placement of text farther to the right necessary for the for loop or
functions as a way to show what commands are part of them


setheading(90)AnswerSet the orientation of the turtle to north (up)


seth(0)AnswerSet the orientation of the turtle to East


functionAnswerhelps the code to be reused and to be more organised


calling a functionAnsweryou are telling the computer to run (or execute) that set of actions by
adding the name and () in your code


defining a functionAnswerusing the keyword def to declare the function and follow this up with
the function name. Parameters to the function need to be added, together with the
parentheses and a colon.Defining a function means to teach the computer a new command and
explain what it should do when receiving that command.


what is wrong with this
circle(20)
begin_fill()
end_rill()Answerthe circle should be in the middle


What shape is this? circle(10, 360, 4)Answersquare


What shape is this? circle(10, 360, 3)Answertriangle

Document information

Uploaded on
February 26, 2025
Number of pages
2
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers
$10.49

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Sold
0
Followers
0
Items
3
Last sold
-



Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their exams and reviewed by others who've used these revision notes.

Didn't get what you expected? Choose another document

No problem! You can straightaway pick a different document that better suits what you're after.

Pay as you like, start learning straight away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and smashed it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions