100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
CNIT 155 Exam 1 Review Questions & answers $7.99   Add to cart

Exam (elaborations)

CNIT 155 Exam 1 Review Questions & answers

 0 view  0 purchase
  • Course
  • Institution

CNIT 155 Exam 1 Review Questions & answers

Preview 2 out of 5  pages

  • June 30, 2024
  • 5
  • 2023/2024
  • Exam (elaborations)
  • Questions & answers
avatar-seller
CNIT 155 Exam 1 Review
While loops are pretest loops (T/F)
True


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




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


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


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


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


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


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

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


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


Which of the following is an example of De Morgan's Law?
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.
nothing, an error occurs


Which character starts a comment in a Python program?
#


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


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


Which of the following is a correct syntax for a while loop?

The benefits of buying summaries with Stuvia:

Guaranteed quality through customer reviews

Guaranteed quality through customer reviews

Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.

Quick and easy check-out

Quick and easy check-out

You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.

Focus on what matters

Focus on what matters

Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!

Frequently asked questions

What do I get when I buy this document?

You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.

Satisfaction guarantee: how does it work?

Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.

Who am I buying these notes from?

Stuvia is a marketplace, so you are not buying this document from us, but from seller EXAMQA. Stuvia facilitates payment to the seller.

Will I be stuck with a subscription?

No, you only buy these notes for $7.99. You're not tied to anything after your purchase.

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

73243 documents were sold in the last 30 days

Founded in 2010, the go-to place to buy study notes for 14 years now

Start selling
$7.99
  • (0)
  Add to cart