#python #anaconda #jupyter-notebook #visual-code #html #css #javascript #http

제목nonetype 질문2024-03-24 15:59
작성자

def calcAge(currentAge,currentYear,futureYear):

    futureAge=currentAge+futureYear-currentYear

    return futureAge


inputName=input("Hello, what's your name?") 

inputAge=int(input("How old are you?"))

inputThisYear=int(input("Years of this year?"))


futureAge=print(calcAge(inputAge,inputThisYear,2098))


질문1. 여기서 futureAge 가 40,30 이런 것들로 나오는데 왜 int(futureAge) 가 안되나요?? 

질문2. 

print(calcAge(inputAge,inputThisYear,2098))하면 숫자가 나오는데  

print(inputName,"becomes",print(calcAge(inputAge,inputThisYear,2098)),"years old in 2098.") 

이러면 Jane becomes none years old in 2098 이 나오는데 왜 그러죠??

댓글