hi guys um new to coding…fresh fresh
this is what im trynna do (its a practice exercise)
im tryna set the code up such that when i run the function by inputting the number of visits, name, and age
i should get to know if its a new patient or recurring along with their name
and on the age parameter if the person is a child, adolescent, or adult
i want it to be one thing
can run them seperately and they work percect but i want them to run together and im failing hard!
i hope im making sense
By the way, by quick glance, since you already have print statements within the top two functions, you don’t have to re-print them in the last function.
if i wanted to employ input function to allow the patient to provide the viraibles themselves (age, number of visits, and name) how would i do that and still get the same output printed?
you ca prompt the user to enter any information that is required. Note, however, that any anything entered by the user are actual strings of type str. If you need numbers, you have to type cast the response to either type int or type float, depending on the response requirements.
If you want to prompt the user, for say their first name, you can do this:
name = input('Please enter your name: ') # This is of type `str`
If you want to prompt the user for their age, you can try this:
age = int(input('Please enter your age: ')) # Note the type casting to type `int`
You can include these questions in your functions. If this is the route that you will be taking, then arguments would not be required to be passed in. You will have to redefine your functions to reflect these changes.