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
gf_informatik:daten_sca:datenverarbeitung_python [2023-06-05 09:17] – [Slides & Lernziele] scagf_informatik:daten_sca:datenverarbeitung_python [2025-03-09 06:14] (aktuell) – [JSON] sca
Zeile 580: Zeile 580:
  
 # SCHREIBEN von JSON-File # SCHREIBEN von JSON-File
-with open('my_file.json', 'w') as json_file: +with open('my_file.json', 'w', encoding='utf-8') as json_file: 
-    json.dump(data, json_file, indent=4) # indent: Anz. Leerschlaege zum Einruecken+    json.dump(data, json_file, indent=4, ensure_ascii=False) # indent: Anz. Leerschlaege zum Einruecken
 </code> </code>
  
Zeile 694: Zeile 694:
 ===== Lösungen ===== ===== Lösungen =====
  
-++++Auftrag A|+<nodisp 2> 
 + 
 +++++Lösungen A|
  
 === Aufgabe A1 === === Aufgabe A1 ===
Zeile 799: Zeile 801:
 ++++ ++++
  
-++++Auftrag B|+++++Lösungen B|
  
 === Teil I === === Teil I ===
Zeile 938: Zeile 940:
     writer.writerows(data) # Write the data to the CSV file     writer.writerows(data) # Write the data to the CSV file
 </code> </code>
- 
-++++ 
- 
-++++Auftrag B (II)| 
- 
-<nodisp 2> 
  
 === Teil IV === === Teil IV ===
Zeile 1026: Zeile 1022:
     writer.writerows(data) # Write the data to the CSV file     writer.writerows(data) # Write the data to the CSV file
 </code> </code>
- 
-</nodisp> 
  
 ++++ ++++
Zeile 1033: Zeile 1027:
  
 ++++Lösungen C| ++++Lösungen C|
- 
-<nodisp 2> 
  
 === Teil I === === Teil I ===
Zeile 1135: Zeile 1127:
     txt_file.write('   * Gemeinden mit grösster identischer Anz. EW: ' + inhabitants_max_double_towns[0] + ' und ' + inhabitants_max_double_towns[1] + '\n')     txt_file.write('   * Gemeinden mit grösster identischer Anz. EW: ' + inhabitants_max_double_towns[0] + ' und ' + inhabitants_max_double_towns[1] + '\n')
 </code> </code>
- 
-</nodisp> 
  
 ++++ ++++
Zeile 1142: Zeile 1132:
  
 ++++Lösungen D| ++++Lösungen D|
- 
-<nodisp 2> 
  
 ==== Aufgaben D1 ==== ==== Aufgaben D1 ====
Zeile 1329: Zeile 1317:
 print(count) print(count)
 </code> </code>
- 
-</nodisp> 
  
 ++++ ++++
  
 +</nodisp>
  • gf_informatik/daten_sca/datenverarbeitung_python.1685956647.txt.gz
  • Zuletzt geändert: 2023-06-05 09:17
  • von sca