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

CNIT 155 EXAM 1 REVIEW QUESTIONS

Document preview thumbnail
Preview 1 out of 3 pages

CNIT 155 EXAM 1 REVIEW QUESTIONS

Content preview

CNIT 155 EXAM 1 REVIEW QUESTIONS


While loops are pretest loops (T/F) - Answers -True

Computers can create true random numbers (T/F) - Answers -False

sum_total is a legal python identifier (T/F) - Answers -True

In python, the division operator (/) gives a float result, even if both of the numbers are
integers (T/F) - Answers -True

The input function returns a Boolean if the user types in True (T/F) - Answers -True

String can be used as a sequence in a for loop (T/F) - Answers -True

The int function can be used to convert a string of digits into an integer (T/F) - Answers
-True

If you enter a bunch of letters in response to the input the function, the input function
returns a string (T/F) - Answers -True

in is a reserved word in Python (T/F) - Answers -True

if is a legal Python identifier (T/F) - Answers -False

Which of the following is an example of De Morgan's Law? - Answers -Not (not A or not
B) = A and B

What is printed by the last line of the following code:
x = 10
y = input("enter a letter:")
print(y)
Assume the user enters the letter z in response to the prompt. - Answers -nothing, an
error occurs

Which character starts a comment in a Python program? - Answers -#

Which of the following range function will result in a for loop counting backwards? -
Answers -range(3, 0, -1)

What is printed when the following code is executed?
for university in ('PU', 'IU', 'Butler')
print(university, "is a university") - Answers -PU is a university
IU is a university

Document information

Uploaded on
January 24, 2026
Number of pages
3
Written in
2025/2026
Type
Exam (elaborations)
Contains
Questions & answers
$11.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.
GEEKA
3.8
(360)
Sold
2132
Followers
1446
Items
57752
Last sold
2 hours 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