100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
COSC python - Final Exam Review Questions and Answers $11.99   Add to cart

Exam (elaborations)

COSC python - Final Exam Review Questions and Answers

 6 views  0 purchase
  • Course
  • COSC
  • Institution
  • COSC

COSC python - Final Exam Review Questions and Answers

Preview 2 out of 9  pages

  • August 24, 2024
  • 9
  • 2024/2025
  • Exam (elaborations)
  • Questions & answers
  • COSC
  • COSC
avatar-seller
millyphilip
COSC python - Final Exam Review
Questions and Answers
How many MB is 1GB? - Answer -1000MB

_______ phase of the SDLC process involves close interaction between the users and
developers. - Answer -Requirements Analysis

What is the computer's native language? - Answer -Machine Language

What is the IDE used for python? - Answer -Python IDLE

What is the result of the following expression?
10 - 5 % 2 + 3 // 2 * 2? - Answer -11

Given testAvg = 95.5 and letterGrade = 'A', the following print statement will result in an
error. How will you fix it?
print(testAvg + '/' + letterGrade) - Answer -print(str(testAvg) + '/' + letterGrade)

What is the output of the following code?
print(int(53.231) * ) - Answer -53

Assume gpa = 4.0 and major = "cosc". What is the output of the following statement?
print(gpa >= 3.5 and major.upper() == "cosc") - Answer -False

What is the missing input() statement in the following code that computes the degrees in
fahrenheit when degrees in celsius is input?
FREEZE = 32
FILL_IN_THE_MISSING_INPUT_STATEMENT
fahrenheit = (celsius * 1.8) + FREEZE
print("The degrees in Fahrenheit =", fahrenheit) - Answer -celsius = float(input("Enter
the value of degrees in Celsius: "))

What is the output of the following code?
y=0
if y > 3:
y=y+1
print("y is", y) - Answer -y is 0

What is the output of the following code?
if 4 // 2 >= 0:

, print(4 // 2)
if 4 % 2:
print(4 % 2)
else:
print(1) - Answer -2
0

What is the output of the following code?
if 4 // 2 >= 0:
print(4 // 2)
elif 4 % 2:
print(4 % 2)
else:
print(1) - Answer -2

What is the output of the following code?
grade = 75
if grade >= 80:
print("very good")
elif grade < 60:
print("not good")
else:
print("passed, but can do better") - Answer -passed, but can do better

Which line in the following program will cause an error?
1 num = 7
2 if num < 0 or > 100:
3 print("Out of range")
4 else:
5 print("Within range") - Answer -Line 2 (should be if num < 0 or num > 100:)

Given age = 18, convert the following conditional expression to appropriate selection
statement?
print("Eligible to vote!" if age >= 18 else "Not Eligible to vote!") - Answer -if age >= 18:
print("Eligible to vote!")
else:
print("Not Eligible to vote!")

What is the output of the following code?
x, y = None, 36
x = 100 if y > 50 else 200
print("x =", x, "y =", y) - Answer -x = 200 y = 36

What is the value of answer when x = 12, y = 3, z = 5?
answer = "Good" if x > y or x < z and y > z or z == y else "Bad"
print(answer) - Answer -Good

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

Will I be stuck with a subscription?

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

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

73091 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.99
  • (0)
  Add to cart