Ask coding questions

← Back to all posts
how do i figure out my dogs age
goop0711 (2)

name=(input("what is your dogs name: "))
if name == "Oscar":
print("now we have that info what is your dogs birth year?:")
print("wrong answer try again!")
if number < 2020:
print("that is immposible enter a new number:")
print("so your dog is")

eldolle (1)

year=(input("now we have that info what is your dogs birth year?:"))
print(2019 - year)

TimothyAnderso1 (112)

Aight so:

year = input('Dogs birth year:')
print('your dogs age is:', year)

using a comma after text, allows you to insert variables into print functions like so:

variable = "Hello!"

Test: Hello!

abdulalam (4)

ask him/her using google translate