coeur.py

Created by mousnab29

Created on March 06, 2024

963 Bytes

Dessine un coeur


def main():
    stop == False
    while not stop:
        print("Choix :")
        print("OUI (a)")
        print("NON (b)")
        print("Nike T mort (s)")
        print("quitter (q)")

        choix = input("Que souhaitez-vous faire ? ")

        if choix == 'a':
            notes = input("Quelles sont vos notes (séparées par des espaces) ? ")
            notes_list = notes.split()
            moyenne = sum([int(note) for note in notes_list]) / len(notes_list)
            print("Votre moyenne est :", moyenne)

        elif choix == 'b':
            print("OK, alors fais-le toi-même !")

        elif choix == 's':
            print("Adieu cruelle monde !")
            break

        elif choix == 'q':
            print("Au revoir, à bientôt !")
            break

        else:
            print("Choix invalide !")
for key, value in répertoire.items():
        file1.write(key+":"+value+"\n")
if __name__ == "__main__":
    main()

During your visit to our site, NumWorks needs to install "cookies" or use other technologies to collect data about you in order to:

With the exception of Cookies essential to the operation of the site, NumWorks leaves you the choice: you can accept Cookies for audience measurement by clicking on the "Accept and continue" button, or refuse these Cookies by clicking on the "Continue without accepting" button or by continuing your browsing. You can update your choice at any time by clicking on the link "Manage my cookies" at the bottom of the page. For more information, please consult our cookies policy.