CMN 152V EXAM 2026 LATEST
QUESTIONS AND ANSWERS| ACE
YOUR GRADES.
What do you do if a string has quotes in it - correct answer -do ''' '''
Looking In things - correct answer -in
Print ( 'H' in 'Hello') - correct answer -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" -
correct answer -so it would say whatever variiable is in it
Ex: name = 'deb'
Print( 'Hello {}' .format(name) )
, Page | 2
Print( 'Hello' + ' ' + 'World' )
Print( 'comma ' * 3 + 'chameleon') - correct answer -Hello World
Comma comma comma chameleon
How to you test if something is equal - correct answer -==
How do you test if something is unequal - correct answer -!=
How do you make an ordered kind of collection - correct answer -
a list with 2 brackets [ ]
How to retrive something from a list - correct answer -print (
highways[1])
What number do lists start at - correct answer -0
Getting stretches of a list - correct answer -he slice stops before,
not after, the second number