Question
how could I write a function in Python that requests a range between only 0-100 for each of these questions. Anything over that and it
how could I write a function in Python that requests a range between only 0-100 for each of these questions. Anything over that and it states that you have exceeded the range and loops back to original question? I would prefer to see a for loop demonstrated or something. I'm trying to get used to them.
i.e.
bp=int(input('How many bench press reps did you perform?: ')) bs=int(input('How many back squat reps did you perform?: ')) mp=int(input('How many military press reps did you perform?: ')) dl=int(input('How many deadlifts did you perform?: '))
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started