• Wrong document? Swap it for free
  • Written by students who passed
  • Immediately available after payment
  • Read online or as PDF
Sell
Where do you study
Your language
Document preview thumbnail
Preview 2 out of 15 pages
Exam (elaborations)

Cs 1064 - Python Midterm Exam Questions With Verified Answers

Document preview thumbnail
Preview 2 out of 15 pages

Cs 1064 - Python Midterm Exam Questions With Verified Answers

Content preview

CS 1064 - PYTHON MIDTERM EXAM QUESTIONS WITH
VERIFIED ANSWERS


The print statement is: - Answers - a call to a function

True/false: a python program must be compiled into an executable form before it can be
run - Answers - False

Define case sensitive - Answers - the difference between uppercase and lowercase
letters matter

What output does the following code produce? Print('apple', 'banana') - Answers -
apple banana

What output is produced by this? Print(15+30) - Answers - 45

What output is produced?

Print('Ready', end=' ')
Print('Set', end='')
Print('Go') - Answers - Ready setgo

What output is produced?

Print('oak', 'elm', 'pine', end='!', sep='#') - Answers - oak#elm#pine!

True/false: the value of a variable can change through a program - Answers - true

True/false: python variables are created using an assignment statement - Answers -
true

A python identifier can only be composed of: - Answers - letters (A-Z), digits (0-9), and
underscore character. Identifiers can't begin with a digit

By convention, variable names in python should be composed of: - Answers - all
lowercase letters, with words separated by underscore

All python variables are: - Answers - object references, meaning they are names that
refer to an object somewhere in memory

Assignment operators (=) have a _____ precedence than arithmetic operators -
Answers - lower

What are the arithmetic operators? - Answers - + = addition

, - = subtraction
* = multiplication
/ = division
% = gets remainder in integer division
** = exponent
// = integer/floor division, returning only integer quotient

True/false: in python, the assignment statement is also an expression - Answers -
false. The assignment operator doesn't return a value

True/false: you must use a print statement to display result of an expression in python
shell - Answers - false. The expression is evaluated and the result is displayed
immediately

Write code that produces the following line of output:

Don't you hate it when someone answers their own question? I do. - Answers -
print("Don't you hate it when someone answers their own question?", end=' ')

Print('I do.')

What are the modules in the python standard library that have to be imported first -
Answers - math
Random
String
Turtle
Datetime
Os
Urllib

Built-in functions vs. Built-in types (both don't have to be imported) - Answers - built-in
functions: print, input

Built-in types: int, float, str, list, range

True/false: the effect of the setheading depends on the current heading of the turtle -
Answers - false. When setting the heading explicitly, the current heading doesn't matter

Turtle heading (degrees) - Answers - see week of 8/30 doc

Turtle explicit positioning on coordinate system (goto function) - Answers - see week of
8/30 doc

Which way would turtle be facing after this code?

Turtle.setheading(270)

Document information

Uploaded on
October 24, 2026
Number of pages
15
Written in
2026/2027
Type
Exam (elaborations)
Contains
Questions & answers
$14.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
(380)
Sold
2253
Followers
1452
Items
64373
Last sold
16 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