From 249c2c8a7bfd1ccec495efb8c4017bc05db32509 Mon Sep 17 00:00:00 2001 From: Ichthyostega Date: Fri, 19 May 2023 20:17:18 +0200 Subject: [PATCH] Experimente mit Python --- sosci2word/demo.py | 2 +- sosci2word/hello.py | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 sosci2word/hello.py diff --git a/sosci2word/demo.py b/sosci2word/demo.py index 0b5b977..cfedb5b 100755 --- a/sosci2word/demo.py +++ b/sosci2word/demo.py @@ -21,6 +21,7 @@ document.add_paragraph( document.add_paragraph( 'first item in ordered list', style='List Number' ) +document.add_page_break() document.add_picture('Ichthyo-Pp.png', width=Inches(3)) @@ -41,6 +42,5 @@ for qty, id, desc in records: row_cells[1].text = id row_cells[2].text = desc -document.add_page_break() document.save('demo.docx') diff --git a/sosci2word/hello.py b/sosci2word/hello.py new file mode 100644 index 0000000..9aa6315 --- /dev/null +++ b/sosci2word/hello.py @@ -0,0 +1,13 @@ +def funny(parameter): + print("Funny!") + print("mein X ist "+str(parameter)) + + +for x in range(0,9): + if x > 5: + funny(x) + else: + funny(x*10) + + +funny(34)