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

PYTHON exam(questions with 100% correct answers)(13)

Rating
-
Sold
-
Pages
13
Grade
A+
Uploaded on
17-10-2024
Written in
2024/2025

PYTHON exam(questions with 100% correct answers)(13)

Institution
PYTHON
Course
PYTHON









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

Written for

Institution
PYTHON
Course
PYTHON

Document information

Uploaded on
October 17, 2024
Number of pages
13
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

Content preview

PYTHON exam(questions with 100%
correct answers)(13)

The following code represents a ________________ if structure.



if a >= 1:

if a == 1: - correct answer ✔✔nested



Which line of code sets the value of the variable take_home to 500?

take_home == 1500 / (1 + 2)

take_home = 250 * + 2

take_home = 250 * (5 % 3)

take_home = 250 * 5 - 3 - correct answer ✔✔take_home = 250 * (5 % 3)



Given the code

message = "Your percentage score of "

percentage = "95.6"

letter_grade = "% is an A grade."



What is the correct code to display the following result?

Your percentage score of 95.6% is an A grade. - correct answer ✔✔print(message + percentage +
letter_grade)



Given the following parallel lists, which piece of code will print out each student and their major?



students = ["Jimmy", "Ravi", "Lauren"]

majors = ["Accounting", "Finance", "ISA"] - correct answer ✔✔for i,student in enumerate(students):

print(student + ", Major: " + majors[i])

, What will be displayed by the following code?

age = 18

score = 550

income = 60000

if age >= 20 or (score > 600 and income > 50000):

print("approved")

elif age > 18 and age < 20:

print("approved with condition")

else:

print("not approved") - correct answer ✔✔not approved



The while keyword takes a condition just like which other keyword? - correct answer ✔✔if



Which of the following is a valid variable name in Python?:



1st place

None of these answers

1st_place

and - correct answer ✔✔None of these answers



What is printed by the following program?



my_total = 0

do_not_stop = True

while do_not_stop == True:

my_total += 5

if my_total > 10:

do_not_stop = False

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.
StuviaExamHub Havard School
View profile
Follow You need to be logged in order to follow users or courses
Sold
458
Member since
3 year
Number of followers
355
Documents
16965
Last sold
4 days ago
EXAM HUB (LATEST UPDATE)

QUALITY WORK OF ALL KIND OF QUIZ or EXAM WITH GUARANTEE OF AN A+ latest updates Im an expert on major courses especially; psychology,Nursing, Human resource Management &amp; Project writing. Assisting students with quality work is my first priority. I ensure scholarly standards in my documents . I assure a GOOD GRADE if you will use my work. Feel free to purchase n recommend others for 100% pass EXAMS!

3.7

85 reviews

5
39
4
10
3
17
2
6
1
13

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