100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
CS 1101 Final Exam Review- University of the People 2023 $19.99   Add to cart

Other

CS 1101 Final Exam Review- University of the People 2023

 27 views  0 purchase
  • Course
  • Institution

CS 1101 FinaCS 1101 Final Exam Review- University of the People 2023CS 1101 Final Exam Review- University of the People 2023l Exam Review- University of the People 2023CS 1101 Final Exam Review- University of the People 2023CS 1101 Final Exam Review- University of the People 2023CS 1101 Final Exam ...

[Show more]

Preview 3 out of 24  pages

  • August 7, 2023
  • 24
  • 2023/2024
  • Other
  • Unknown
avatar-seller
1 Given the following code, what will the output be?
mylist = ["now", "four", "is", "score", "the", "and seven", "time", "years", "for"]
a=0
while a < 7:
print (mylist[a],)
a += 2
Select one:

a.
now is the time

b.
now is the time for

c.
for score and seven years

d.
now four is score the and seven time years for

2 Match concepts with their definition!
Any one of the languages that people have designed for specific purposes, such as representing
mathematical ideas or computer programs; all programming languages are this kind of languages.
formal language
Any one of the languages that people speak that evolved naturally.
natural language
An error that does not occur until the program has started to execute but that prevents the program
from continuing.
runtime error
An error in a program that makes it do something other than what the programmer intended.
Semantics error
The meaning of a program.
semantics
The structure of a program.
syntax
An error in a program that makes it impossible to parse — and therefore impossible to interpret.
syntax error
One of the basic elements of the syntactic structure of a program, analogous to a word in a natural
language.
Token

3 Assume that d is a Python dictionary. What does the following Python code produce?

d.items()

,Select one:

a.
a histogram


b.
an inverted dictionary


c.
a list of tuples


d.
a lookup


e.
a reverse lookup

4 What output will the following python commands produce:

n = 10000
count = 0
while n:
count = count + 1
n = n // 10

print (count)
Select one:

a.
5

b.
0

c.
10000

d.
1000

5 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

6 A variable that has a data type of "str" cannot be part of a compound data type

Select one:
True
False

7 What is the output of the following Python program?

mylist = [ [2,4,1], [1,2,3], [2,3,5] ]
total = 0
for sublist in mylist:
total += sum(sublist)
print(total)

Select one:

a.
14


b.
23


c.
0


d.

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

Will I be stuck with a subscription?

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

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

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