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

제목step 05 나이계산프로그램 실습문제2018-09-17 23:16
작성자

def calcAge(age, year, futureYear):

    """(int) -> int

    

    Return the age 10 years later and in futureYear

    

    """

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

    print("How old are you?",age)

    print("Years of this year (ex: 2019) ?",year)

    

    print(name ,"is" , age , "years old.")

    print(name , "becomes" , (age + 10) , "years old after 10 years.")

    print(name , 'becomes' , (age +  futureYear - year) , 'years old in ', futureYear,'.')

    return (age + futureYear - year)


파라미터값 3개는 함수파라미터로하고, 사용자가 이름만 입력하면 예시처럼 쭉뜨는 이걸 원하는게 맞는건가요??

댓글
이전실습5 3번째문제 질문입니다.2018-09-17
다음실습문제가 이상합니다..2018-09-17