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
Exam (elaborations)

CSE 101 Exam 1

Rating
-
Sold
-
Pages
47
Grade
A+
Uploaded on
27-06-2025
Written in
2024/2025

Exam of 47 pages for the course CSE 101 at CSE 101 (CSE 101 Exam 1)

Institution
CSE 101
Course
CSE 101

Content preview

Which of the following is a syntax error?


Give this one a try later!


Forgetting to type a closing quotation mark for a string.




What is the output of the following valid Python code?

,x=8
if x == 3:
print('A')
elif x >= 3:
print('B')
if x <= 8:
print('C')


-C
-B
-AB
-AC
-BC


Give this one a try later!


BC




Consider the following valid Python code fragment:
if x > 4:
if x < 9:
print('W')
else:
print('X')
else:
if x < 9:
print('Y')
else:
print('Z')
For which one of the following ranges of integers would the code print Y?


- 4 through 9 (inclusive)
- any value greater than 4
- any value less than or equal to 4
- 5 through 9 (inclusive)
- any value strictly less than 9

,Give this one a try later!


any value less than or equal to 4




What is the output of the following valid Python code?
x=5
if x >= 4:
print('A')
elif x >= 3:
print('B')
else:
print('C')


-B
-BC
-A
-AB
-AC


Give this one a try later!


A




When iterating over a string, which of the following functions most directly lets you
combine the counter-driven style of for-loop with the for-each style of for-loop?


Give this one a try later!


enumerate

, Think back to the algorithm we implemented in lecture for the Caesar cipher
(encryption) algorithm. We relied on the ord and chr functions, and also on some
facts regarding the Unicode values for letters of the Latin alphabet. With all this in
mind, what is the value of y after the code below has finished executing?
x = ord('B') + 5
y = chr(x)


Give this one a try later!


'G'
B --> 2
2+ 5 = 7
7th letter = G




Suppose a Colab code cell contained only the single line of code shown below.
Assume x and y are variables created and assigned integer values in previous code
cells. What would be printed when the code cell is executed?
x=y


- Either True or False, depending on the particular values of x and y
- The new value of x
- No output
- The previous value of x


Give this one a try later!


No output




What will be the output of the program given below?


a=5

Written for

Institution
CSE 101
Course
CSE 101

Document information

Uploaded on
June 27, 2025
Number of pages
47
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers
$8.50
Get access to the full document:

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


Also available in package deal

Thumbnail
Package deal
Latest Bundled pack for CSE 101 Questions and Answers
-
11 2025
$ 16.50 More info

Get to know the seller

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.
codersimon West Virgina University
View profile
Follow You need to be logged in order to follow users or courses
Sold
796
Member since
3 year
Number of followers
478
Documents
6385
Last sold
1 month ago
**SOUNDEST LEANING MATERIALS FROM CODERSIMON **

Learning is not attained by chance; it must be sought for with ardor and diligence On this page, you find exams,tests,summaries, notes ,documents, package deals, and flashcards offered by codersimon

3.8

86 reviews

5
43
4
11
3
16
2
4
1
12

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