1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Anuncie Aqui
    Anuncie aqui você Também: fdantas@4each.com.br

[Python] How do I fix my Python program

Discussão em 'Python' iniciado por Stack, Setembro 4, 2025.

  1. Stack

    Stack Membro Participativo

    import datetime

    import time
    import locale

    now = datetime.datetime.now()

    locale.setlocale(locale.LC_ALL, 'nl_NL')

    geboortejaar = input("Wanneer ben je geboren? (jaar)")

    leeftijd = 2017 - int(geboortejaar)

    maand = int(input("En in welke maand? (getal)"))

    dag = int(input("En op welke dag? (getal)"))

    Weekdag = time.strftime("%d").upper()

    Maand = time.strftime("%m").upper()

    if maand >= Maand and dag >= Weekdag:
    print("Je bent dan " + str(leeftijd - 1) + " jaar oud en leeft al ongeveer " + str((leeftijd - 1) * 365) + " dagen!" )
    else:
    print("Je bent dan " + str(leeftijd) + " jaar oud en leeft al ongeveer " + str(leeftijd * 365) + " dagen!")


    I live in the Netherlands and I wanted to make a Program that tells you how old you are without having to change some things everyday but by taking calendar info. Can someone help me fix this?

    Continue reading...

Compartilhe esta Página