• Wrong document? Swap it for free
  • Written by students who passed
  • Immediately available after payment
  • Read online or as PDF
Sell
Where do you study
Your language
Document preview thumbnail
Preview 2 out of 11 pages
Exam (elaborations)

Python Exam 3-Questions With 100% Verified Answers.

Document preview thumbnail
Preview 2 out of 11 pages

Python Exam 3-Questions With 100% Verified Answers.

Content preview

Python Exam 3-Questions With 100%
Verified Answers.
A while loop written as while True - ✔✔Might be an infinite loop depending on what the
loop body contains


What would be the final value of total for the following program?
total = 0
for i in range(10):
for j in range(10):

total = total + 1 - ✔✔100



the term for an operator that may not evaluate one of its sub-expressions is called -
✔✔short-circuit


T or F Computers can generate truly random numbers - ✔✔false



T or F Top-down design is also called stepwise refinement - ✔✔true


T or F in top-down design, the main algorithm is written in terms of functions that don't exist
yet - ✔✔True


Which of the following statements is true about computer
simulation -They model real world exactly
-Once the sim is written, the input values can be tweaked to see how it affects the results

, -All computer sims are easy to write
-All of the above

-None of the above - ✔✔-Once the sim is written, the input values can be tweaked to see
how it affects the results


Which of the following statements could be true about the following python code?
from random import randrange
for i in range (10):
print(randrange(10))


-It might output the numbers 0-9 in that order
-It might output 0-9 in some order
-It might output 0 ten times
-all of the above

-none of the above - ✔✔all of the above



A simulation that uses probabilistic events is called - ✔✔Monte Carlo



The initial version of a system used in spiral development is called a - ✔✔prototype


Which of the following is not a step in pure top-down
design -repeat the process on smaller problems
-Detail the algorithm in terms of its interfaces with smaller problems
-Construct a simplified prototype of the system

-Express the algorithm in terms of smaller problems - ✔✔Construct a simplified prototype
of the system


What is unit testing - ✔✔testing separate parts/units of the program separately

Document information

Uploaded on
May 14, 2025
Number of pages
11
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers
$13.99

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

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.
QUINTER
3.6
(73)
Sold
425
Followers
105
Items
40134
Last sold
1 week ago



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

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions