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 2 out of 5 pages
Exam (elaborations)

CS 1400 EXAM 2 QUESTIONS WITH VERIFIED ANSWERS

Document preview thumbnail
Preview 2 out of 5 pages

CS 1400 EXAM 2 QUESTIONS WITH VERIFIED ANSWERS

Content preview

CS 1400 EXAM 2 QUESTIONS WITH VERIFIED
ANSWERS


What are the three main parts of creating an animation in drawly? - Answers - Update,
display, setup

The animation loop contains only the update phase of the animation process. - Answers
- FALSE

What is the main difference between an animation and a game? - Answers - Games
have user input.

What is the purpose of the flip() function - Answers - It draws the pygame window

what module in pygame should one use to draw a circle - Answers - draw

what does pygame.key.get_pressed() return - Answers - A list of booleans

What is the name of the function that allows you to add an image to the screen? -
Answers - blit()

For a screen size of 1280x720, if I add an image at location 640x360 the image will be
centered on the screen. - Answers - FALSE

What module contains the function necessary to add an image to a program? - Answers
- image

Which of the following lines of code are associated with playing background music for a
game? - Answers - pygame.mixer.music.load("music.mp3") AND
pygame.mixer.music.play(-1)

Code to play sound effects must appear in the same area where the screen is updated.
- Answers - FALSE

Which of the following is a proper function header (the text between 'def' and ':' when
defining a function) for the object initializer? - Answers - __init__(self)

the first parameter of the initializer should always be self - Answers - TRUE

What is a more specific name for a variable that is defined to be part of an object? -
Answers - instance variable

What is the parameter self? - Answers - it is how an object refers to itself

, Objects can store data and also have _________________. - Answers - capabilities

What is the symbol of the operator that used in order to access a capability of a list? -
Answers - .

For a string name my_string how would I access a capability that returns the stored
string in all lowercase letters? - Answers - my_string.lower()

Mark all of the following that are true about classes and objects. - Answers - classes
should be defined in its own module (file), the first parameter of methods should always
be self, objects store data and have capabilities. These are all defined in the class.

Why can two different objects call the same method and have different results? -
Answers - Methods can use instance variables stored in the specific object

With a method call, every time I give the same input as parameters the output will
always be the same. - Answers - false

What must be true about the following code? You may assume the following code does
not produce errors.
my_widget = Widget("blue", 10) # This is creating an object my_widget.grow()
my_widget.print() - Answers - grow() is a method, grow() and print() are both defined in
the Widget class

The first parameter in a method definition will always be self. - Answers - TRUE

What is the event type when a mouse button is pressed? - Answers -
MOUSEBUTTONDOWN

The get_pressed() function returns the location of the mouse when the mouse button is
being held down. - Answers - FALSE

What is the name of the method that returns the x, y coordinate of the mouse? -
Answers - pygame.mouse.get_pos()

The distance formula can be used to determine if a mouse click happens in a circle, but
isn't accurate for other shapes. - Answers - TRUE

What is the output of the following code?
result = "I am Groot!".split()
print(result) - Answers - ['I', 'am', 'Groot!']

What is the output of the following program?
result = input("Enter two numbers: ").split()
print(result[0] + result[1]) - Answers - 52

Document information

Uploaded on
July 24, 2026
Number of pages
5
Written in
2025/2026
Type
Exam (elaborations)
Contains
Questions & answers
$12.99

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

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
GEEKA
3.8
(361)
Sold
2138
Followers
1448
Items
58662
Last sold
10 hours ago


Why students choose Stuvia

Created by fellow students, verified by reviews

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

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right 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 aced 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