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

CSC148 – Questions with Detailed Verified Answers, complete practice and review material

Rating
-
Sold
-
Pages
27
Grade
A+
Uploaded on
09-12-2025
Written in
2025/2026

This document contains a collection of CSC148 questions accompanied by detailed, verified answers. It covers core concepts from the course, including problem-solving, algorithmic thinking, recursion, data structures, and Python programming fundamentals. The material is structured to support exam preparation and reinforce key theoretical and practical skills.

Show more Read less
Institution
Course










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

Written for

Course

Document information

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

Subjects

Content preview

Page | 1



CSC148 Questions with Detailed
Verified Answers

Question: the only mutable types
Answer: list and dictionaries and user defined classes


Question:Where is all data stored in?
Answer: objects that have 3 components -> id, type and value


Question:What is special about id
Answer: The id of an object is a unique identifier, meaning that no other
object has the same identifier.


Question:difference between object and variable?
Answer: a variable stores an object with value, id and type
Variables are not objects because it doesn't store data but only storing the id.
it REFERS to an object


Question:What is special about the type of object
Answer: it defines what operators you can use on it


Question:3 + 'hello'
Answer: TypeError: unsupported operand type(s) for +: 'int' and 'str'


Question:>>> prof = 'Diane'

, Page | 2

>>> id(prof)
4405312456
>>> prof = prof + ' Horton'
>>> prof
'Diane Horton'
>>> id(prof)
Answer: >>> # The old str object couldn't change, so Python made a new
>>> # str object for the variable prof to refer to. Since it's
>>> # a new object, it has a different id.
>>> id(prof)
4405308016


Question:what is aliasing?
Answer: referring to the same object so they have the same id


Question:phrase this "z = x" in english
Answer: "make z refer to the object that x refers to."


Question:y = y
id value changes?
Answer: no, just like how x= y means they now have the same id,
y = y will also have the same id as before


Question:y = [1,2,3]
x = [1,2,3]
id(y)
id(x)

, Page | 3

Answer: >>> id(y)
2493677724232
>>> id(x)
2493677724296


Question:>>> x = [1, 2, 3]
>>> z = x
>>> z[0] = -999
>>> x
Answer: x = [-999, 2,3]


Question:what if you want to check if two variables value are exactly the
same?
Answer: "== " compares the values stored in the objects reference. This is
called value equality.


Question:what if you want to check if the variables are referring to the exact
same object
Answer: "is" like x is y, which will check the id


Question:special case for immutable stuff?
Answer: >>> x = 'foo'
>>> y = 'foo'
>>> x is y
True
HOWEVER
>>> x = "ice cream"
$15.99
Get access to the full document:

100% satisfaction guarantee
Immediately available after payment
Both online and in PDF
No strings attached

Get to know the seller
Seller avatar
TESTBANKSSTORES
4.0
(1)

Get to know the seller

Seller avatar
TESTBANKSSTORES Chamberlain College Of Nursing
Follow You need to be logged in order to follow users or courses
Sold
5
Member since
4 months
Number of followers
1
Documents
960
Last sold
1 month ago
TESTBANKSSTORES

Accounting, Finance, Statistics, Computer Science, Nursing, Chemistry, Biology & More — A+ Test Banks, Study Guides & Solutions As a Top 1st Seller on Stuvia and a nursing professional, my mission is to be your light in the dark during nursing school and beyond. I know how stressful exams and assignments can be, which is why I’ve created clear, reliable, and well-structured resources to help you succeed. I offer test banks, study guides, and solution manuals for all subjects — including specialized test banks and solution manuals for business books. My materials have already supported countless students in achieving higher grades, and I want them to be the guide that makes your academic journey easier too. I’m passionate, approachable, and always focused on quality — because I believe every student deserves the chance to excel. **Ace Your Exams with Confidence!**

Read more Read less
4.0

1 reviews

5
0
4
1
3
0
2
0
1
0

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