• ¿Documento equivocado? Cámbialo gratis
  • Escrito por estudiantes que aprobaron
  • Inmediatamente disponible después del pago
  • Leer en línea o como PDF
Vender
¿Dónde estudias?
Tu idioma
Document preview thumbnail
Vista previa 2 fuera de 15 páginas
Examen

Cs 1064 - Python Midterm Exam Questions With Verified Answers

Document preview thumbnail
Vista previa 2 fuera de 15 páginas

Cs 1064 - Python Midterm Exam Questions With Verified Answers

Vista previa del contenido

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)

Información del documento

Subido en
24 de octubre de 2026
Número de páginas
15
Escrito en
2026/2027
Tipo
Examen
Contiene
Preguntas y respuestas
$14.99

¿Documento equivocado? Cámbialo gratis Dentro de los 14 días posteriores a la compra y antes de descargarlo, puedes elegir otro documento. Puedes gastar el importe de nuevo.
Escrito por estudiantes que aprobaron
Inmediatamente disponible después del pago
Leer en línea o como PDF

Seller avatar
Los indicadores de reputación están sujetos a la cantidad de artículos vendidos por una tarifa y las reseñas que ha recibido por esos documentos. Hay tres niveles: Bronce, Plata y Oro. Cuanto mayor reputación, más podrás confiar en la calidad del trabajo del vendedor.
GEEKA
3.8
(380)
Vendido
2253
Seguidores
1452
Artículos
64373
Última venta
17 horas hace



Por qué los estudiantes eligen Stuvia

Creado por compañeros estudiantes, verificado por reseñas

Calidad en la que puedes confiar: escrito por estudiantes que aprobaron y evaluado por otros que han usado estos resúmenes.

¿No estás satisfecho? Elige otro documento

¡No te preocupes! Puedes elegir directamente otro documento que se ajuste mejor a lo que buscas.

Paga como quieras, empieza a estudiar al instante

Sin suscripción, sin compromisos. Paga como estés acostumbrado con tarjeta de crédito y descarga tu documento PDF inmediatamente.

Student with book image

“Comprado, descargado y aprobado. Así de fácil puede ser.”

Alisha Student

Preguntas frecuentes