Question: Basketball The if , no else pattern from our teaching, is useful for when you want to do something when the condition is true, but

Basketball
The if, no else pattern from our teaching, is useful for when you want to do something when the condition is true, but do nothing when it's false.
You do not need an else, you just do nothing when the condition is false.
Write a Python program to determine someone's basketball shooting percentage.
Ask the user for the number of shots attempted and the number of shots made.
Notice that we have a style guide naming pattern for "number of ..." variables. Use it.
If a user has a shooting percentage of 50% or higher, then print an encouraging message, as in the sample output below.
Expected Output:
Number of shots attempted: 15
Number of shots made: 3
Your shooting percentage is 20.0%
 Basketball The if, no else pattern from our teaching, is useful

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!