Skip to content

Instantly share code, notes, and snippets.

@altherlex
Created June 6, 2022 22:43
Show Gist options
  • Save altherlex/d81aa2581cb3ef5ab59ed5a0634a5778 to your computer and use it in GitHub Desktop.
Save altherlex/d81aa2581cb3ef5ab59ed5a0634a5778 to your computer and use it in GitHub Desktop.
First step in Python
from datetime import date
nome=input('Qual é o seu nome? ')
print(f"Olá, {nome}! Prazer em te conhecer!")
dia=input('Qual é o dia do seu nascimento? ')
mes=input('Qual o mês? ')
ano=input('E o ano? ')
int_ano = int(ano)
current_year = date.today().year
age = current_year - int_ano
print(f"Então você tem {age} anos!")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment