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

CMN 152V EXAM QUESTIONS WITH CORRECT ANSWERS LATEST UPDATE 2026

Document preview thumbnail
Preview 1 out of 1 pages

CMN 152V EXAM QUESTIONS WITH CORRECT ANSWERS LATEST UPDATE 2026 can you add spaces between terms in code with really changing the meaning - Answers yes how do u write pi - Answers how do you write e - Answers math.e how do u have access to a module's functionality (ex. math) - Answers import it aka; import math if you dont write print you will only see what when you run code - Answers the last output in the block how to print something - Answers print( ) how to write a variable - Answers x = 6 can an _ start a variable - Answers yes _x is a valid variable can some names not be variables - Answers yes, thinks like math and other variables that have other meanings in python how to find what type something is - Answers type ( ) what type is just: 1 - Answers intiger int what type is: 1.0 - Answers float what type is 3 + 5.0 - Answers float what is something put in ' ' - Answers string str what is boolean - Answers bool what is not False - Answers true what is not not False - Answers false how do you find string length - Answers len ( ) to print do print ( len ( ) ) what do you do if a string has quotes in it - Answers do ''' ''' looking In things - Answers in print ( 'H' in 'Hello') - Answers true format() uses the same funny dot (.) notation. If you have a string with a pair of curly brackets ({}) and call format, format will replace the curly brackets with whatever is in the parentheses. The Google

Content preview

CMN 152V EXAM QUESTIONS WITH CORRECT ANSWERS LATEST UPDATE 2026

can you add spaces between terms in code with really changing the meaning - Answers yes
how do u write pi - Answers math.pi
how do you write e - Answers math.e
how do u have access to a module's functionality (ex. math) - Answers import it
aka; import math
if you dont write print you will only see what when you run code - Answers the last output in the
block
how to print something - Answers print( )
how to write a variable - Answers x = 6
can an _ start a variable - Answers yes _x is a valid variable
can some names not be variables - Answers yes, thinks like math and other variables that have other
meanings in python
how to find what type something is - Answers type ( )
what type is just: 1 - Answers intiger
int
what type is: 1.0 - Answers float
what type is 3 + 5.0 - Answers float
what is something put in ' ' - Answers string
str
what is boolean - Answers bool
what is not False - Answers true
what is not not False - Answers false
how do you find string length - Answers len ( )
to print do print ( len ( ) )
what do you do if a string has quotes in it - Answers do ''' '''
looking In things - Answers in
print ( 'H' in 'Hello') - Answers true
format() uses the same funny dot (.) notation. If you have a string with a pair of curly brackets ({}) and
call format, format will replace the curly brackets with whatever is in the parentheses. The Google-
able jargon for this is really bad: "string interpolation" - Answers so it would say whatever variiable is
in it

ex: name = 'deb'
print( 'Hello {}' .format(name) )
print( 'Hello' + ' ' + 'World' )
print( 'comma ' * 3 + 'chameleon') - Answers Hello World
comma comma comma chameleon
how to you test if something is equal - Answers ==
how do you test if something is unequal - Answers !=
how do you make an ordered kind of collection - Answers a list with 2 brackets [ ]
how to retrive something from a list - Answers print ( highways[1])
what number do lists start at - Answers 0
Getting stretches of a list - Answers he slice stops before, not after, the second number
print( even_numbers[0:3] )
.append - Answers add thing to the end of a list
.extend - Answers add a list to the end of a lest
.insert - Answers stick more things into a list

Document information

Uploaded on
February 2, 2026
Number of pages
1
Written in
2025/2026
Type
Exam (elaborations)
Contains
Questions & answers
$10.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.
joshuawesonga22
3.4
(12)
Sold
114
Followers
2
Items
15009
Last sold
1 week 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