Avez-vous une question? (216) 97 656 803 hajjriadh@gmail.com
Python

Correction exercices les dates en python

Un cours complet pour maîtriser Correction exercices les dates en python.

0 chapitres 0 QCM Accès gratuit
  1. Objectifs

    • Etre capable de manipuler les dates en Python
  2. Exercice 01

    1. Énoncé
    2. Correction
      
      from tkinter import * 
      from tkinter.ttk import *
        
      from time import strftime 
        
      root = Tk() 
      root.title('Horloge') 
        
      def time(): 
          string = strftime('%H:%M:%S %p') 
          lbl.config(text = string) 
          lbl.after(1000, time) 
       
      lbl = Label(root, font = ('calibri', 40, 'bold'), 
                  foreground = 'black',
                  borderwidth=20, relief="solid") 
      lbl.pack(padx=20, pady=20,anchor = 'center')
      root.configure(bg='red')
      time() 
        
      mainloop()