This is my freshman year in college and I had to take a python course. It hasn't been to easy with all reote classes. the goal of this program is for the user to input two agess of dogs in human years and to get back their ages and a specified response.
this is my code so far:
If anyone could help I would very much appreciate it!
this is my code so far:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
humanage = int ( input ( "please enter your dog's age in human years" ) if humanage < = 2 : dogage = humanage * 10.5 else : dogage = 21 + (humanage - 2 ) * 4 humanage2 = int ( input ( "please enter your other dog's age in human years" ) if humanage2 < = 2 : dogage2 = humanage * 10.5 else : dogage = 21 + (humanage2 - 2 ) * 4 print ( "your first dog's age in dog years is" , dogage) print ( "your second dog's age in dog years is" , dogage2) if dogage = = dogage2: print ( "friends from birth" ) elif dogage > dogage2 or dogage > 50 : print ( "senior" ) elif dogage > 35 and dogage2 > 35 : print ( "they could be president" ) elif dogage2 < 2 : print ( "it's a puppy" ) else : print ( "cats are better anyways" ) |
Larz60+ write Oct-30-2020, 02:34 AM:
Please post all code, output and errors (it it's entirety) between their respective tags. Refer to BBCode help topic on how to post. Use the "Preview Post" button to make sure the code is presented as you expect before hitting the "Post Reply/Thread" button.
Added for you this time. Please use tags in future posts.
Please post all code, output and errors (it it's entirety) between their respective tags. Refer to BBCode help topic on how to post. Use the "Preview Post" button to make sure the code is presented as you expect before hitting the "Post Reply/Thread" button.
Added for you this time. Please use tags in future posts.