100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
ENGR Final Exam UPDATED ACTUAL Questions and CORRECT Answers $11.49   Add to cart

Exam (elaborations)

ENGR Final Exam UPDATED ACTUAL Questions and CORRECT Answers

 4 views  0 purchase
  • Course
  • ENGR
  • Institution
  • ENGR

ENGR Final Exam UPDATED ACTUAL Questions and CORRECT Answers Troubleshooting is mostly for new programmers; experienced programmers avoid creating bugs - CORRECT ANSWER- False What format string should be used in plot() to specify a green dashed line? - CORRECT ANSWER- g-- Visual Breaks in...

[Show more]

Preview 3 out of 22  pages

  • October 31, 2024
  • 22
  • 2024/2025
  • Exam (elaborations)
  • Questions & answers
  • ENGR
  • ENGR
avatar-seller
MGRADES
ENGR Final Exam UPDATED ACTUAL
Questions and CORRECT Answers
Troubleshooting is mostly for new programmers; experienced programmers avoid creating
bugs - CORRECT ANSWER✔✔- False


What format string should be used in plot() to specify a green dashed line? - CORRECT
ANSWER✔✔- g--


Visual Breaks in Code
Whitespace can be used to separate different sections of the code. This helps identity sections
of the code that have different purposes. - CORRECT ANSWER✔✔- True


This code will generate an error(assume that the modules are installed correctly).


import numpy as np
import matplotlib.pyplot as plt
x = np.array([1, 2, 3, 4, 5])
y = (x - 3)**2
plt.plot(x, y, 'o')

plt.show() - CORRECT ANSWER✔✔- False


What will be printed? Type "Error" if appropriate.


num_items = 7
my_string = '' #empty string


if num_items > 2:
my_string += 'e'
elif num_items <= 7:
my_string += 'h'

,else:
my_string += 'd'


print(('m' + my_string), end = '?') - CORRECT ANSWER✔✔- me?


This code will generate an error(assume that the modules are installed correctly):


import numpy as np
impot matplotlib.pyplot as plt
from math import *


x = np.array([1, 2, 3, 4, 5])
y = (cos(x) - 3)**2
plt.plot(x, y, 'o')

plt.show() - CORRECT ANSWER✔✔- True


how many times will the inner while loop iterate during the fourth iteration of the outer loop,
that is when i equals 4? Numeric answer should be given.


i=1
s=0
while i <= 5:
j=1
while j < i:
s=i*j
j += 1

i += 1 - CORRECT ANSWER✔✔- 3


What format string should be used in plot() to create a black line style using plus markers? -
CORRECT ANSWER✔✔- k+

, What will the following code output in the Command window? (For an infinite loop, type
'IL')


a=5
b = 15
while (b >= a):
print('^%d' % b, end = '^')

b -= a - CORRECT ANSWER✔✔- ^15^^10^^5^


This code will generate an error(assume that numpy is installed correctly):


import numpy as np
x = np.linspace(-1,1,10)

y = np.cos(x) - CORRECT ANSWER✔✔- False



Flowchart is a graphical representation of an algorithm. - CORRECT ANSWER✔✔- True


This code will generate an error(assume that numpy is installed correctly)


import numpy as np
x = np.linspace(-1,1)

y = np.sin(x) - CORRECT ANSWER✔✔- False



bool('False') has the value False. - CORRECT ANSWER✔✔- False


Consider the code below. What would this output? Type 'error' if you think an error will
occur.


def F(a):
a += 3
a=2

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

Will I be stuck with a subscription?

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

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

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