100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
COMP CS 1101 Quiz All Units with Answers- University of the People $22.98   Add to cart

Exam (elaborations)

COMP CS 1101 Quiz All Units with Answers- University of the People

 1 view  0 purchase
  • Course
  • Institution

COMP CS 1101 Quiz All Units with Answers- University of the People/COMP CS 1101 Quiz All Units with Answers- University of the People/COMP CS 1101 Quiz All Units with Answers- University of the People/COMP CS 1101 Quiz All Units with Answers- University of the People/COMP CS 1101 Quiz All Units wit...

[Show more]

Preview 4 out of 67  pages

  • August 16, 2022
  • 67
  • 2022/2023
  • Exam (elaborations)
  • Questions & answers
avatar-seller
Quiz unit 1

What is Python’s response to the command: type(123)
Select one:
a. <class 'float'>
b. <class 'bool'>
c. SyntaxError: invalid syntax
d. <class 'int'>


e. <class 'str'>
Consider the following text from a Python interpreter.
>>> print(2 + 2)
4
What is the text ">>>" called?

Select one:
a. a function
b. an operator
c. a prompt


d. a statement
e. a value
Which one of the following words best describes formal languages?
Select one:
a. ambiguity
b. literalness
c. poetry
d. prose
e. redundancy


Feedback
Your answer is incorrect.
The correct answer is: literalness
Consider the following text from a Python interpreter.
>>> print(2 + 2)
4
What is the text "print(2 + 2)" called?

Select one:

,a. a function
b. an operator
c. a prompt
d. a statement


e. a value
Which one of the following Python expressions computes the number of miles in 5 km, where
one mile is 1.61 km?
Select one:
a. 5 * 1.61
b. .61


c. 1.
d. 1.61 + 5
e. miles = "5 km"
What is python’s response to the command: type("0.123")
Select one:
a. <class 'float'>
b. <class 'bool'>
c. SyntaxError: invalid syntax
d. <class 'int'>
e. <class 'str'>


Which one of the following Python expressions computes the total number of seconds in 21
minutes and 21 seconds?
Select one:
a. 21 + 21
b. 21 + 60
c. "21 minutes" + "21 seconds"
d. 21 * 60 + 21


e. seconds = 21 + "21 minutes"
string is a Python type that represents sequences of numeric values.
Select one:
True
False


What does the Python interpreter output for the following input?

,>>> 1,234.567,890

Select one:
a. 1234
b. 1234.6
c. 1234.56789
d. (1, 234.567, 890)


e. SyntaxError: invalid token
True or False: Learning to debug can be frustrating, but it is a valuable skill that is useful for
many activities beyond programming.
Select one:
True


False
Which of the following is not a valid Python numeric literal:
Select one:

a. 123

b. 0123



c. 0.00

d. 12.3

e. 0.75

Consider the following text from a Python interpreter.
>>> print(2 + 2)
4
What is the text "+" called?


Select one:

a. a function

b. an operator



c. a prompt

d. a statement

, e. a value

Consider the following text from a Python interpreter.
>>> print(2 + 2)
4
What is the text "4" called?


Select one:

a. a function

b. an operator

c. a prompt

d. a statement

e. a value



Which one of the following Python expressions has the value 64?
Select one:

a. 8 ^ 2

b. 8 ** 2



c. 8 +- 2

d. 8 += 2

e. 8 -+ 2

What is Python’s response to the command: type(0.123)
Select one:

a. <class 'float'>



b. <class 'bool'>

c. SyntaxError: invalid syntax

d. <class 'int'>

e. <class 'str'>

Match concepts with their definition!

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 Millenialnurse. Stuvia facilitates payment to the seller.

Will I be stuck with a subscription?

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

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

67163 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
$22.98
  • (0)
  Add to cart