100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
ENGR 102 - MIDTERM QUESTIONS AND CORRECT DETAILED ANSWERS WITH RATIONALES 2025/2026 (VERIFIED ANSWERS) |ALREADY GRADED A+ $12.99
Add to cart

Exam (elaborations)

ENGR 102 - MIDTERM QUESTIONS AND CORRECT DETAILED ANSWERS WITH RATIONALES 2025/2026 (VERIFIED ANSWERS) |ALREADY GRADED A+

 5 views  0 purchase
  • Course
  • ENGR 102
  • Institution
  • ENGR 102

ENGR 102 - MIDTERM QUESTIONS AND CORRECT DETAILED ANSWERS WITH RATIONALES 2025/2026 (VERIFIED ANSWERS) |ALREADY GRADED A+

Preview 2 out of 6  pages

  • November 29, 2024
  • 6
  • 2024/2025
  • Exam (elaborations)
  • Questions & answers
  • engr 102
  • ENGR 102
  • ENGR 102
avatar-seller
Ashley96
ENGR 102 - MIDTERM

!= - ANS-now not identical to
% five.2f - ANS-Inserts a area before inputting the value
%-10s - ANS-Left justify the string by 10
%+10s - ANS-Right justify the string by means of 10
• Use if-elif-else: - ANS-• When you have got a couple of "cases" of the same kind
• Generally, the conditionals within the if-elif statements ought to be very much like
each other
<= - ANS-less than or same to
<list name>.Append(<thing to add>) - ANS-adds elements to a list
<list name>[:] - ANS-all values in listing
== - ANS-identical to
>= - ANS-greater than or equal to
2 // four - ANS-zero
A and B is equivalent to now not ((no longer A) or (not B)) - ANS-true
A compiler or interpreter interprets the program into gadget commands - ANS-actual
A computer software is only a textual content report with laptop instructions in it - ANS-genuine
A for loop can be expressed equivalently via some time loop. - ANS-actual
Add within the center of the listing - ANS-<list name>[a:a] = [<thing to add>]
adds the element before the a place within the listing
After the subsequent code is accomplished, the fee of colors is ['red', 'green', 'yellow'].

Shades = ['red', 'green', 'blue']
fav_color = colours[2]
fav_color = 'yellow' - ANS-false
An enter are available as a ___________. - ANS-string
Assume that my_list is [0, 1, 2, 3].

What value is lower back through max(my_list[:2]) ? - ANS-1
bool('zero.Zero') - ANS-True
bool('zero') has the cost False. - ANS-fake it is proper
bool('False') - ANS-True
bool(0) - ANS-False
bool(3) - ANS-True
Boolean Operators - ANS-and, or, AND no longer
Boolean order of operations - ANS-no longer then and then or
Can strings be sliced? - ANS-Yes! When printing positive elements of strings, they can but can
not be modified!
Ceil( ) - ANS-rounds up
Consider the following sequences of assignments. What is the value of variable z at the quit?

, X=2
y = three
x *= 4
y += four*x
z = y - (x + 2)
z += x - z - ANS-8
Convert the binary range a hundred and one to a decimal wide variety - ANS-five
del my_list[i] - ANS-Delete an detail from a list.
Determine the result. Type "Error" if appropriate.

50 % (2 // four) - ANS-error
Do you get variety mistakes when reducing lists? - ANS-No!
Does the int feature round the range up or down? - ANS-down
end=' ' - ANS-A key-word parameter for the print() feature that causes the characteristic to NOT
add a newline on the cease of the string.
Exp( ) - ANS-Exponential characteristic e^x
glide(False) - ANS-0.Zero
flow(True) - ANS-1.0
ground( ) - ANS-rounds down
for loop - ANS-for i in range(10):
print("Doing Something")
Range is 0-9 not 1-10!
For loop that runs through values in listing - ANS-for i in <list>:
#do something right here
Given the listing nums = [[1, 2, 3], [8, 9]], what does nums[1] evaluate to (this is, what's
nums[1])? Type 'error' if you assume there's an errors. - ANS-[8,9]
How do you upload strings? - ANS-'str1' + 'str2'
How do you multiply strings by using a factor of x? - ANS-'str' * x
if declaration - ANS-if <condition>:
<things to do>
Indicate which assignment statements are legitimate

x=y+2

z += y * z

x + 1 = three

x + y = y - ANS-x = y + 2

z += y * z
int(True) - ANS-1
len(list) - ANS-Find the duration of the list.

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

Will I be stuck with a subscription?

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

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

50843 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
$12.99
  • (0)
Add to cart
Added