Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen der Seite angezeigt.

Link zu der Vergleichsansicht

Beide Seiten, vorherige Überarbeitung Vorherige Überarbeitung
Nächste Überarbeitung
Vorherige Überarbeitung
talit:planung_fs_2026_2m [2026-05-04 09:04] scatalit:planung_fs_2026_2m [2026-06-08 11:15] (aktuell) – [Mo. 22.06.2026] sca
Zeile 85: Zeile 85:
 <WRAP><code python> <WRAP><code python>
 from datetime import datetime from datetime import datetime
-birthday = datetime.strptime("2010-4-17","%Y-%m-%d")+birthday = datetime.strptime("2010-4-17","%Y-%m-%d"% String in Datetime-Format umwandeln 
 +birthday2 = datetime(2010,4,17) % direkt eingeben 
 +print(birthday1.year) % zugreifen auf Datum 
 + 
 +birthday.replace(year=birthday.year + 1) # Datum ändern 
 + 
 +# Datum Unterschied 
 +today = datetime.now() 
 +delta = today - birthday 
 +print(delta.days) 
 </code></WRAP> </code></WRAP>
  - Füge den Klassen nun Methoden hinzu:  - Füge den Klassen nun Methoden hinzu:
Zeile 92: Zeile 102:
  
 {{ :talit:oop_school.png?400 |}} {{ :talit:oop_school.png?400 |}}
 +
 +
 +**HA:** Klassen & Vererbung fertig, Birthday im DateTime-Format
  
  
 === Mo. 11.05.2026 === === Mo. 11.05.2026 ===
  
-  * Auftrag: Game of Life wie vorgegeben mit OOP programmieren.+  * Weiter an OOP 
  
 === PFINGSTFERIEN / WHITSUN HOLIDAYS === === PFINGSTFERIEN / WHITSUN HOLIDAYS ===
 === Mo. 01.06.2026 === === Mo. 01.06.2026 ===
 +
 +Game of Life mit OOP:
 +
 +   * Erinnerung: Klassen, Objekte, Methoden
 +   * Auftrag in Gruppe: Auf Papier, Welche Klassen braucht es? Eigenschaften & Methoden?
 +   * Zusammen besprechen.
 +
 +
 === Mo. 08.06.2026 === === Mo. 08.06.2026 ===
 +
 +Weiter an OOP GoL
 +
 +**HA:** So weit wie möglich weiter coden
 +
 +++++Plan OOP GoL|
 +
 +<code python>
 +World:
 +    Properties:
 +        - cells = [list of all alive cells and dead neighbours]
 +
 +    Methods: # Game Logic
 +        - update # main method, triggers whole update procedure
 +        - update_cells # move to next generation, remove all dead cells from cells-list
 +        - count_alive_neighbours ...
 +        - ... all other logic methods
 +
 +
 +Cell:
 +    Properties:
 +        - coordinates x,y (self.coordinats = [2,7] or self.x = 2, self.y = 7)
 +        - is_alive_now = True / False
 +        - is_alive_in_next_gen = True / False
 +        - (neighbours = [list of Cells])
 +
 +    Methods: None
 +
 +(Logic:)
 +
 +View: # Responsible for visualizing world on whatever device
 +    Properties:
 +        - nx (nr cells in x direction)
 +        - ny (nr cells in y direction)
 +
 +    Methods:
 +        - display / visualize: visualizes world on my screen
 +
 +Model-View-Separation:
 +    - not a single print, or pygame command, ... in Cell & World classes
 +    - only in View-class
 +
 +</code>
 +
 +++++
 === Mo. 15.06.2026 === === Mo. 15.06.2026 ===
 +
 +GoL mit OOP fertig!
 +
 +
 === Mo. 22.06.2026 === === Mo. 22.06.2026 ===
 +
 +AUSFALL
 +
 +
  • talit/planung_fs_2026_2m.1777885479.txt.gz
  • Zuletzt geändert: 2026-05-04 09:04
  • von sca