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

CODEHS Python Chapter 4 Exam | Questions with Correct Answers| Verified

Rating
-
Sold
-
Pages
8
Grade
A+
Uploaded on
26-02-2025
Written in
2024/2025

CODEHS Python Chapter 4 Exam | Questions with Correct Answers| Verified

Institution
CODEHS
Course
CODEHS









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

Written for

Institution
CODEHS
Course
CODEHS

Document information

Uploaded on
February 26, 2025
Number of pages
8
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

Content preview

CODEHS Python Chapter 4 Exam | Questions with Correct Answers|
Verified
4.1.4: Do You Have a Cat? - Answer"""

This program should declare a boolean that describes whether or

not you have a cat. Then you should print out an informative

message to the user.

"""



have_car = True

print("Do you have a cat? " + str(have_car))



4.2.6: Can You Graduate? - Answer# Enter your code here

has_enough_units = True

has_met_requirements = False

can_graduate = has_enough_units and has_met_requirements

print("Can graduate? " + str(can_graduate))



4.2.7: School's Out - Answer# Enter your code here

is_weekday = False

is_holiday = True

is_weekend = True

no_school_today = is_weekend or is_holiday

not no_school_today

print("There is school today? " + str(no_school_today))



4.3.5: Rolling Dice - Answer# Enter your code here

first_die = int(input("What did you roll on your first die? "))

print(first_die)

, second_die = int(input("What did you roll on your second die? "))

print(second_die)

rolled_doubles = first_die == second_die

print("Rolled doubles: " + str(rolled_doubles))



4.3.6: All Star - Answerpoints = int(input("How many points per game do you score? "))

rebounds = int(input("How many rebounds per game do you get? "))

assists = int(input("How many assists per game do you get? "))

all_star = points >= 25 or points >= 10 and rebounds >= 10 and assists >= 10

print("Is all star? " + str(all_star))



4.4.7: Teenagers - Answer# Enter your code here

age = int(input("What is your age? "))

teenager = age >= 13 and age <= 19

if teenager:

print("Yes, you are a teenager.")

else:

print("No, you are not a teenager.")



4.4.8: Meal Planner - Answer# Enter your code here

meal = input("What meal do you want. Breakfast, lunch, or dinner? ")

if meal == "breakfast":

print("Have some pancakes")

elif meal == "lunch":

print("Have a sandwich")

elif meal == "dinner":

print("Have a steak")



4.5.4: Growing Circle - Answer# Start coding here. Don't forget to click the canvas
$10.99
Get access to the full document:

100% satisfaction guarantee
Immediately available after payment
Both online and in PDF
No strings attached

Get to know the seller
Seller avatar
Emilyvin

Get to know the seller

Seller avatar
Emilyvin Teachme2-tutor
View profile
Follow You need to be logged in order to follow users or courses
Sold
0
Member since
9 months
Number of followers
0
Documents
3
Last sold
-

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

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