Geschreven door studenten die geslaagd zijn Direct beschikbaar na je betaling Online lezen of als PDF Verkeerd document? Gratis ruilen 4,6 TrustPilot
logo-home
Tentamen (uitwerkingen)

COMP 208 Final Exam 2023 Questions and Answers with complete solution

Beoordeling
-
Verkocht
-
Pagina's
17
Cijfer
A+
Geüpload op
29-03-2023
Geschreven in
2022/2023

COMP 208 Final Exam 2023 Questions and Answers with complete solution Why are computers designed to run programs from RAM and not from the hard disk? A) Because it is impossible to run program from the hard disk. B) Because the hard disk, compared to RAM, is very slow. C) A program, on the hard disk, cannot be modified. B Write the binary code (binary number) for the character D (capital letter D). Why does the computer only store information in binary? A) Because binary arithmetic is fun. B) Computers can store more information using binary codes than any other way. C) This is not true. Computers do not only understand binary. D) Because it is made from transistors and they only have two states: charge and discharge. D Write: megabyte, gigabyte, or terabyte in the space provided, for the following: 100,000,000 bytes How would the above number be best described? Do not write numbers, only write the word that best fits the number. Write it in the same case as shown above megabyte Assume this binary number is an integer. What value is it in decimal? 5 Since computer arithmetic has finite precision, is it true that we could carry out all our arithmetic in fraction notation in order to not loose precision? (True/False) True Which statement is true given this Python statement? (assume it is indented) print("hello) A) This statement does not exist in Python. B) Error: missing a closing double quote and it needs a terminating semi-colon. C) It will still run, even though is it missing a closing double quote. D) Error: missing a closing double quote D What does the following print to the screen? print("John is ", 5, "years old.", " And 5 is ", type(5)) John is 5years old. And 5 is class 'int' Assuming we have the following equation in Python, what would be outputed? print(5 + 10 / 2 2 * 2) 25.0

Meer zien Lees minder
Instelling
Vak

Voorbeeld van de inhoud

COMP 208 Final Exam 2023 Questions and Answers with
complete solution
Why are computers designed to run programs from RAM and not from the hard disk?

A) Because it is impossible to run program from the hard disk.
B) Because the hard disk, compared to RAM, is very slow.
C) A program, on the hard disk, cannot be modified.
B
Write the binary code (binary number) for the character D (capital letter D).
01000100
Why does the computer only store information in binary?

A) Because binary arithmetic is fun.
B) Computers can store more information using binary codes than any other way.
C) This is not true. Computers do not only understand binary.
D) Because it is made from transistors and they only have two states: charge and
discharge.
D
Write: megabyte, gigabyte, or terabyte in the space provided, for the following:
100,000,000 bytes
How would the above number be best described?
Do not write numbers, only write the word that best fits the number. Write it in the same
case as shown above
megabyte
Assume this binary 00000101 number is an integer. What value is it in decimal?
5
Since computer arithmetic has finite precision, is it true that we could carry out all our
arithmetic in fraction notation in order to not loose precision? (True/False)
True
Which statement is true given this Python statement? (assume it is indented)
print("hello)

A) This statement does not exist in Python.
B) Error: missing a closing double quote and it needs a terminating semi-colon.
C) It will still run, even though is it missing a closing double quote.
D) Error: missing a closing double quote
D
What does the following print to the screen?
print("John is ", 5, "years old.", " And 5 is ", type(5))
John is 5years old. And 5 is <class 'int'>
Assuming we have the following equation in Python, what would be outputed?
print(5 + 2 * 2)
25.0

,What does the term string mean?

A) It is a physical object used to tie things together.
B) All the statements that compose a program are known collectively as a string.
C) A finite series of symbols concatenated together.
D) It is an integer number.
C
Which print() statement is wrong?

A) print("Hello","World")
B) print('Hello "World"')
C) print('Hello World")
D) print("Hello World");
C
Which of the following is NOT true about the empty string.

A) The empty space takes up no space in RAM
B) print(len("")) gives 0
C) print("") gives no output other than a new line
D) The symbol that represents the empty string is ""
A
What is the output of
print(5 + 5)

Write a single value
10
What is the output of
print("5" + "5")

Write a single value
55
Assume we have this code:
x = "My name is bob"
print(x[3:6])

What is printed to the screen?
nam
One reason why variables are useful is because we can store the result of a
computation in a variable and use it later without having to recompute the value.
(True/False)
True
Which way to declare a variable is NOT correct?

A) x, y = 10, 20
B) x = 5

, C) int x
D) All of the above are correct
C
Given the following code:
x = 10y = 20
y=x

Select the sentence that is true:

A) The value 20 is deleted by Python and no longer exists.
B) Python backs-up the number 20 in RAM and can be accessed later.
C) The above code results in a run-time error.
D) The value 20 is overwritten by the number 10 and no longer exists.
D
The equal sign (=) in Python does not have the same meaning as in Math. In Python it
means assign (change the value in a variable to a new value). In Math it means the
equations on either side of the equal result in the same solution. (True/False)
True
Given the following code:

def compute(x):
y = x**3
z = (2 * x) + 5
return (y + z)

print(compute(2))

What value is printed to the screen?
17
The boolean True and False are strings. (True/False)
False
What does 10==5 result in Python

A) True
B) Syntax error
C) False
C
What does x = not (5 <10) result in Python? (what does x get?)

A) Syntax error
B) False
C) True
B
What does "moon".upper() != "moon" in Python?

A) False

Geschreven voor

Vak

Documentinformatie

Geüpload op
29 maart 2023
Aantal pagina's
17
Geschreven in
2022/2023
Type
Tentamen (uitwerkingen)
Bevat
Vragen en antwoorden

Onderwerpen

€12,40
Krijg toegang tot het volledige document:

Verkeerd document? Gratis ruilen Binnen 14 dagen na aankoop en voor het downloaden kun je een ander document kiezen. Je kunt het bedrag gewoon opnieuw besteden.
Geschreven door studenten die geslaagd zijn
Direct beschikbaar na je betaling
Online lezen of als PDF

Maak kennis met de verkoper

Seller avatar
De reputatie van een verkoper is gebaseerd op het aantal documenten dat iemand tegen betaling verkocht heeft en de beoordelingen die voor die items ontvangen zijn. Er zijn drie niveau’s te onderscheiden: brons, zilver en goud. Hoe beter de reputatie, hoe meer de kwaliteit van zijn of haar werk te vertrouwen is.
magdamwikash23 Western Governers University
Volgen Je moet ingelogd zijn om studenten of vakken te kunnen volgen
Verkocht
114
Lid sinds
3 jaar
Aantal volgers
94
Documenten
5328
Laatst verkocht
3 dagen geleden
Magda

NURSING STUDY GUIDES/EXAMS AND NOTES ALL VERIFIED BY EXPERTS All my uploaded documents, exams and essays are verified by relevant experts.I can assure an A or at least 90% if you use any of my documents.

3,9

14 beoordelingen

5
7
4
2
3
2
2
2
1
1

Recent door jou bekeken

Waarom studenten kiezen voor Stuvia

Gemaakt door medestudenten, geverifieerd door reviews

Kwaliteit die je kunt vertrouwen: geschreven door studenten die slaagden en beoordeeld door anderen die dit document gebruikten.

Niet tevreden? Kies een ander document

Geen zorgen! Je kunt voor hetzelfde geld direct een ander document kiezen dat beter past bij wat je zoekt.

Betaal zoals je wilt, start meteen met leren

Geen abonnement, geen verplichtingen. Betaal zoals je gewend bent via iDeal of creditcard en download je PDF-document meteen.

Student with book image

“Gekocht, gedownload en geslaagd. Zo makkelijk kan het dus zijn.”

Alisha Student

Bezig met je bronvermelding?

Maak nauwkeurige citaten in APA, MLA en Harvard met onze gratis bronnengenerator.

Bezig met je bronvermelding?

Veelgestelde vragen