teaching:progappchim:game_of_life_conway-2012

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Prochaine révision
Révision précédente
teaching:progappchim:game_of_life_conway-2012 [2012/11/30 12:31] – créée villersdteaching:progappchim:game_of_life_conway-2012 [2021/03/09 11:29] (Version actuelle) villersd
Ligne 1: Ligne 1:
 ====== Jeu de la vie de Conway ====== ====== Jeu de la vie de Conway ======
 +<note tip>Référence plus récente pour un autre travail : [[http://glowingpython.blogspot.be/2015/10/game-of-life-with-python.html|Game of Life with Python]]
 +</note>
  
-<sxh python; title : Conway_Game_of_Life_2D-JK-2012.py>+<code python Conway_Game_of_Life_2D-JK-2012.py>
 #!/usr/bin/env python  #!/usr/bin/env python 
 # -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
Ligne 17: Ligne 19:
     Iain Haslam, June 2005.     Iain Haslam, June 2005.
 """  """ 
-from Tkinter import *+from tkinter import *
 import time import time
  
Ligne 93: Ligne 95:
             for Cell in row:             for Cell in row:
                 Cell.stepToNextState()                 Cell.stepToNextState()
-        print self.calc()+        print(self.calc())
                  
     def clear(self):     def clear(self):
Ligne 175: Ligne 177:
  
     root.mainloop()     root.mainloop()
-</sxh>+</code>
  
 ===== Références ===== ===== Références =====
  • teaching/progappchim/game_of_life_conway-2012.1354275097.txt.gz
  • Dernière modification : 2012/11/30 12:31
  • de villersd