100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.2 TrustPilot
logo-home
Exam (elaborations)

COSC python - Final Exam Review Questions and Answers

Rating
-
Sold
-
Pages
9
Grade
A+
Uploaded on
24-08-2024
Written in
2024/2025

COSC python - Final Exam Review Questions and Answers

Institution
COSC
Course
COSC









Whoops! We can’t load your doc right now. Try again or contact support.

Written for

Institution
COSC
Course
COSC

Document information

Uploaded on
August 24, 2024
Number of pages
9
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

Content preview

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

Get to know the seller

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.
millyphilip West Virginia University
View profile
Follow You need to be logged in order to follow users or courses
Sold
2812
Member since
3 year
Number of followers
1959
Documents
40838
Last sold
1 day ago
white orchid store

EXCELLENCY IN ACCADEMIC MATERIALS ie exams, study guides, testbanks ,case, case study etc

3.7

534 reviews

5
234
4
83
3
103
2
31
1
83

Recently viewed by you

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

Frequently asked questions