100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.2 TrustPilot
logo-home
Exam (elaborations)

PSU COMPUTER SCIENCE 101 EXAM 1 STUDY QUESTIONS WITH 100% CORRECT ANSWERS

Rating
-
Sold
-
Pages
20
Grade
A+
Uploaded on
01-12-2025
Written in
2025/2026

PSU COMPUTER SCIENCE 101 EXAM 1 STUDY QUESTIONS WITH 100% CORRECT ANSWERS

Institution
CS 101
Course
CS 101










Whoops! We can’t load your doc right now. Try again or contact support.

Written for

Institution
CS 101
Course
CS 101

Document information

Uploaded on
December 1, 2025
Number of pages
20
Written in
2025/2026
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

Content preview

Which statement describes the punctuation conventions used for character data in
Python?
a. When you initialize or assign a character literal to a variable, the convention is to
surround the literal with double quotes.
b. When you initialize or assign a character literal to a variable, you are not allowed to
use single quotes.
c. When you initialize or assign a character literal to a variable, the convention is to
surround the literal with asterisks.
d. When you initialize or assign a character literal to a variable, the convention is to
simply place the literal value after the equals sign.

,Give this one a try later!


a. When you initialize or assign a character literal to a variable, the
convention is to surround the literal with double quotes.




What would be displayed by the following code sequence?


a = [1, 2, 3]
b=a
a.append(4)
b.append(4)
print(b)


a. [4, 1, 2, 3]
b. [1 2, 3, 4]
c. [1, 2, 3, 4, 4]
d. [1, 2, 3]


Give this one a try later!


c. [1, 2, 3, 4, 4]




Suppose you create a Python list containing the elements "J", "A", "W", "S", and 3, in that
order. What are the index values of the first and last elements of this list?
a. 1 and 5
b. 0 and 3
c. 0 and 4
d. 1 and 3


Give this one a try later!

, c. 0 and 4




The primary difference between / and // in Python 3 is that
a. / depends on the values computed upon; // does not
b. // always results in an integer; / may result in fractions or decimals
c. / gives a quotient and // gives a remainder


Give this one a try later!


b. // always results in an integer; / may result in fractions or decimals




Which statement should you place in the blank of the following Python code if you
want to add an assignment statement that changes the value of the variable
apple_pies?
apple_pies = 4
_____
a. apple_pies = apple_pies + 2
b. lemon_pies = apple_pies + 2
c. pies = "apple pies"
d. apple_pies(5)


Give this one a try later!


a. apple_pies = apple_pies + 2




When using IDLE, you choose shell mode _____.
a. in order to save your work for future use
b. by saving your file and then pressing F5

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.
TestITandFixIT Johns Hopkins University
View profile
Follow You need to be logged in order to follow users or courses
Sold
34
Member since
11 months
Number of followers
0
Documents
4729
Last sold
3 weeks ago

3.3

6 reviews

5
3
4
0
3
1
2
0
1
2

Recently viewed by you

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

Frequently asked questions