Arrafi9

Website

Arrafi9 arrafi9.com est une plateforme éducative marocaine dédiée aux élèves et enseignants du niveau collégial.

Nous proposons des cours structurés, des séries d'exercices corrigés, des devoirs, des vidéos pour faciliter l'apprentissage

 # Informatique - Tronc commun : # Python - Les interfaces graphiquesimport tkinter as tk # Fonction appelée lors du cli...
24/03/2026

# Informatique - Tronc commun :
# Python - Les interfaces graphiques

import tkinter as tk

# Fonction appelée lors du clic sur le bouton
def verifier_age():
try:
age = int(entry_age.get())
if age < 18:
label_resultat.config(text=f"Salut {entry_nom.get()}, vous êtes mineur")
else:
label_resultat.config(text=f"Salut {entry_nom.get()}, vous êtes majeur")
except:
label_resultat.config(text="Veuillez saisir un âge valide")

# Création de la fenêtre
fenetre = tk.Tk()
fenetre.title("Formulaire")
fenetre.geometry("300x150")

# Ajustement des colonnes
fenetre.columnconfigure(0, minsize=30)
fenetre.columnconfigure(1, minsize=250)

# Champ Nom
tk.Label(fenetre, text="Nom :").grid(row=0, column=0)
entry_nom = tk.Entry(fenetre, width=30)
entry_nom.grid(row=0, column=1)

# Champ Âge
tk.Label(fenetre, text="Âge :").grid(row=1, column=0)
entry_age = tk.Entry(fenetre, width=30)
entry_age.grid(row=1, column=1)

# Champ Email
tk.Label(fenetre, text="Email :").grid(row=2, column=0)
entry_email = tk.Entry(fenetre, width=30)
entry_email.grid(row=2, column=1)

# Bouton Valider (gris)
btn_valider = tk.Button(fenetre, text="Valider", bg=" ", command=verifier_age, width=25)
btn_valider.grid(row=3, column=1, columnspan=2, pady=10)

# Label pour afficher le résultat
label_resultat = tk.Label(fenetre, text="")
label_resultat.grid(row=4, column=1, columnspan=2)

# Lancer la fenêtre
fenetre.mainloop()

Informatique - Tronc commun (J'applique de la page 101) : import tkinter as tkfrom tkinter import messageboxdef calculer...
17/02/2026

Informatique - Tronc commun (J'applique de la page 101) :

import tkinter as tk
from tkinter import messagebox
def calculer_moyenne():
try:
note1 = float(entry_note1.get())
note2 = float(entry_note2.get())
note3 = float(entry_note3.get())
examen = float(entry_examen.get())
if (0

Informatique - Tronc commun :Coding - Python (Exemple de fenêtre).Veuillez visiter la plateforme arrafi9.com pour une fo...
10/02/2026

Informatique - Tronc commun :
Coding - Python (Exemple de fenêtre).
Veuillez visiter la plateforme arrafi9.com pour une formation complète du langage Python. 👇👇👇
www.arrafi9.com/formations.php
゚

10/02/2026

arrafi9.com est une plateforme éducative marocaine dédiée aux élèves et enseignants du niveau collégial. Nous proposons des cours structurés, des séries d'exercices corrigés, des devoirs, des vidéos pour faciliter l'apprentissage et des ressources pédagogiques. 👇👇👇
www.arrafi9.com
゚

Address

Maroc – Région De Meknès
Meknes
50050

Alerts

Be the first to know and let us send you an email when Arrafi9 posts news and promotions. Your email address will not be used for any other purpose, and you can unsubscribe at any time.

Shortcuts

Share