![]() ![]() Print(d_age, "is a negative number or zero. ![]() Print("The given dog age",str(d_age),"is",round(human_age,2),"in human years") Print("The given dog age",str(d_age),"is",str(human_age),"in human years") Print("The given dog age",str(d_age),"is", str(human_age), "in human years") Epigenetics is the study of how the way an animal lives changes the animals DNA. In 2020, the researchers from the University of California San Diego (UCSD) developed a method for converting a dogs age to its human age is based on what is called epigenetics. Then, for the third and subsequent years of the. Labrador Retrievers have a lifespan of 12 years. The following solution helped me def calculator(): The calculator uses these multipliers for the first two years of a dog's life: 12.5 for small dogs. If anyone struggling with indention error or "Synta圎rror: unexpected character after line continuation character" from print("\n \t 'The given dog age", age, "is", d_age, "human years." I'm just trying to do with what I learned. NOTE: I saw that there already is question about this, but I'm doing in a different way.ĮDIT: I just didn't do it with dictionaires, because it wasn't yet introduced in the course. Print("\n \t \'The given dog age", age, "is", d_age, "human years.'")Īnd I'm not understanding why d_age < 0 is not working and I'm not getting why it appears as an error "calculator() is not defined". # Otherwise, calculate dog's age in human years Print("Age can not be a negative number", age) # If user enters negative number, print message I'm doing a function that converts the age of a dog to human years, but I'm getting some mistakes and I am not getting through them. It as been a long time without programming.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |