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 3 out of 22 pages
Exam (elaborations)

ENGR 102 Midterm Study Guide Questions with Correct Answers | Updated (100% Correct Answers)

Document preview thumbnail
Preview 3 out of 22 pages

ENGR 102 Midterm Study Guide Questions with Correct Answers | Updated (100% Correct Answers)

Content preview

1


ENGR 102 Midterm Study Guide Questions
with Correct Answers | Updated (100%
Correct Answers)
What characters are allowed when using print statements in Python?
(Pick all that applies) Answer: letters, numbers, and underscores

The basic types of variables in Python are _____________, floating-
point, and string. Answer: integers

Which of the following are valid variable names (pick one)

-Winner!

-2nd_name

-My_Name

-Gig'Em

-Gig-Em Answer: My_Name (does not start with a number or _ and
does not have a !,',-, or space

How do you print a floating-point variable, x_value, in Python?
Answer: print(float(x_value))

Consider the lines of code written in Python. What is the output on
the screen?


© 2025 All rights reserved

,2
x=1

y=2

z=3

z *= y

print(z) Answer: 6

What is the output of the following code?

Hint: Output will be a floating point number

num_x = 3.2

num_y = 2

val_num = num_x//num_y

print(val_num) Answer: 1.0(A float operating another float or integer
always returns a float, if neither are floats, it will return an integer
UNLESS IT IS DIVIDING WHICH WILL ALWAYS OUTPUT A FLOAT)

length_x = 3.2

length_y = 2

area_rect = length_x*length_y

print(area_rect) Answer: 6.4

© 2025 All rights reserved

, 3
What is the output of the following program?

Hint: Output will be a floating point number

num1 = 33

num2 = 55

num3 = float(num1)

print(num3) Answer: 33.0

num_x = 6

num_y = 2

val_num = num_x + num_y

print('val_num') Answer: val_num [note the '' ;)]

print("Testing",1,2,3,sep='...',end="over") Answer: Testing...1...2...3over

Write the python statement to assign your age (an integer value) to
the variable "my_age" ? Answer: my_age = int(input())

What is the value stored in variable X after the following python
statements are executed?

X=2

Y=5

© 2025 All rights reserved

Document information

Uploaded on
January 16, 2026
Number of pages
22
Written in
2025/2026
Type
Exam (elaborations)
Contains
Questions & answers
$13.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.
Passit
3.5
(23)
Sold
128
Followers
6
Items
14482
Last sold
2 weeks 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