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

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

Rating
-
Sold
-
Pages
67
Grade
A
Uploaded on
16-08-2022
Written in
2022/2023

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 with Answers- University of the People

Show more Read less
Institution
Course

Content preview

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!

Written for

Course

Document information

Uploaded on
August 16, 2022
Number of pages
67
Written in
2022/2023
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

€21,23
Get access to the full document:

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

Get to know the seller

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.
Millenialnurse Freelance Tutor
Follow You need to be logged in order to follow users or courses
Sold
252
Member since
4 year
Number of followers
147
Documents
1482
Last sold
3 weeks ago
Genuine Study Guides 2024

Holla me for assistance 24/7.

3,4

37 reviews

5
17
4
4
3
4
2
2
1
10

Recently viewed by you

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

Frequently asked questions