{"batchcomplete":"","continue":{"lecontinue":"20260127083654|54","continue":"-||"},"query":{"logevents":[{"logid":64,"ns":0,"title":"Example code - Inheritance issues","pageid":59,"logpage":59,"revid":271,"params":{},"type":"create","action":"create","user":"WikiSysop","timestamp":"2026-03-19T16:07:22Z","comment":"Created page with \"The challenges in inheritance can not be demonstrated well in a powerpoint. Thus, I made this page with examples. You can copy the code in the section and add it together and run it.  First I create a slightly bigger CatClass. <pre> class CatClass:     ### Class variables     genus = \"Felis\"     species = \"Catus\"     acts = {'scratch': \"purrs\",             'scare': \"jumps high in the air\",             'feed': \"is very excited\" }      ### Instatiation     def __init__(sel...\""},{"logid":63,"ns":0,"title":"Intermediate unit test","pageid":58,"logpage":58,"revid":214,"params":{},"type":"create","action":"create","user":"WikiSysop","timestamp":"2026-03-06T14:15:39Z","comment":"Created page with \"__NOTOC__ {| width=500  style=\"font-size: 10px; float:right; margin-left: 10px; margin-top: -56px;\" |Previous: [[Beginning unit test]] |Next: [[Runtime evaluation]] |} == Required course material for the lesson == Powerpoint: [https://teaching.healthtech.dtu.dk/material/22118/22118_09-Testing.ppt Testing]<br> Online: [https://docs.pytest.org/ pytest documentation]<br> Resource: [[Example code - Unit test]]<br> Resource: Unit test - start of reverse polish notation clas...\""},{"logid":62,"ns":0,"title":"Unit test - start of reverse polish notation class","pageid":57,"logpage":57,"revid":208,"params":{},"type":"create","action":"create","user":"WikiSysop","timestamp":"2026-03-06T12:54:54Z","comment":"Created page with \"These are the two files, I made in class for unit test demo purposes.  My original class in the file: ReversePolishCalc.py <pre> class ReversePolishCalc:     def __init__(self):         self.stack = list()      def _checkstack(self, count):         if len(self.stack) < count:             raise IndexError(\"Stack does not contain enough elements to perform operaation\")          def push(self, vector):         if isinstance(vector, (int, float, str)):             vector = [...\""},{"logid":61,"ns":0,"title":"Intermediate classes","pageid":56,"logpage":56,"revid":199,"params":{},"type":"create","action":"create","user":"WikiSysop","timestamp":"2026-03-06T12:31:28Z","comment":"Created page with \"__NOTOC__ {| width=500  style=\"font-size: 10px; float:right; margin-left: 10px; margin-top: -56px;\" |Previous: [[Beginning classes]] |Next: [[Beginning Unittest]] |} == Required course material for the lesson == Powerpoint: [https://teaching.healthtech.dtu.dk/material/22118/22118_07-Classes.ppt Classes]<br> Resource: [[Example code - Classes]]<br>  == Subjects covered == Classes<br> Object Oriented Programming  == Exercises to be handed in == The exercises will be about...\""},{"logid":60,"ns":0,"title":"Example code - parsing command line options","pageid":55,"logpage":55,"revid":147,"params":{},"type":"create","action":"create","user":"WikiSysop","timestamp":"2026-02-21T10:12:47Z","comment":"Created page with \"This is one selfmade way of dealing with command line parameters for your program.  <pre> #!/usr/bin/env python3 # This program demonstrates a way to get arguments and options from command line import sys  # You should use more appropriately named variable names than me. # I just don't know what your options are. # In my example two options are just present or not, but the third requires a number to follow. # By initalising the option to None, you can later tell that you...\""},{"logid":59,"ns":0,"title":"Collaborative git","pageid":54,"logpage":54,"revid":134,"params":{},"type":"create","action":"create","user":"WikiSysop","timestamp":"2026-02-17T12:43:50Z","comment":"Created page with \"__NOTOC__ {| width=500  style=\"font-size: 10px; float:right; margin-left: 10px; margin-top: -56px;\" |Previous: [[Solo git]] |Next: [[Collaborative git]] |} == Required course material for the lesson == Powerpoint: [https://teaching.healthtech.dtu.dk/material/22118/22118_03-Git.ppt Git]<br> Optional - do you want to know more<br> Online: [https://coderefinery.github.io/git-intro/ Coderefinery's introduction to git] This is one of many git resources on the net.<br> Online:...\""},{"logid":58,"ns":0,"title":"Solo git","pageid":53,"logpage":53,"revid":117,"params":{},"type":"create","action":"create","user":"WikiSysop","timestamp":"2026-02-11T15:21:12Z","comment":"Created page with \"__NOTOC__ {| width=500  style=\"font-size: 10px; float:right; margin-left: 10px; margin-top: -56px;\" |Previous: [[Intermediate unix]] |Next: [[Collaborative git]] |} == Required course material for the lesson == Powerpoint: [https://teaching.healthtech.dtu.dk/material/22118/22118_03-Git.ppt Git]<br> <!-- Resource: [[Example code - File Reading]]<br> -->  == Subjects covered == * GitHub - short * Git - concepts  == Exercises to be handed in == '''In exercises 2-9 the job i...\""},{"logid":57,"ns":0,"title":"Last words","pageid":52,"logpage":52,"revid":104,"params":{},"type":"create","action":"create","user":"WikiSysop","timestamp":"2026-01-27T08:54:32Z","comment":"Created page with \"__NOTOC__ {| width=500  style=\"font-size: 10px; float:right; margin-left: 10px; margin-top: -56px;\" |Previous: [[Changing existing code base]] |Next: [[Programme]] |} == Required course material for the lesson == Powerpoint: [https://teaching.healthtech.dtu.dk/material/22118/22118_13-LastWords.ppt Last words]<br> <!-- Resource: [[Example code - File Reading]]<br> -->  == Subjects covered == Course summery<br> Standard libraries<br> Third party libraries<br> Optimization<...\""},{"logid":56,"ns":0,"title":"Runtime evaluation","pageid":51,"logpage":51,"revid":102,"params":{},"type":"create","action":"create","user":"WikiSysop","timestamp":"2026-01-27T08:50:06Z","comment":"Created page with \"__NOTOC__ {| width=500  style=\"font-size: 10px; float:right; margin-left: 10px; margin-top: -56px;\" |Previous: [[Intermediate unit test]] |Next: [[Changing existing code base]] |} == Required course material for the lesson == Powerpoint: [https://teaching.healthtech.dtu.dk/material/22113/Python10-Runtime.pptx Runtime evaluation of algorithms] Old ppt, not so important<br> Video: [https://panopto.dtu.dk/Panopto/Pages/Viewer.aspx?id=41edc89b-61a5-475d-84d0-af2701271b5d Run...\""},{"logid":55,"ns":0,"title":"Example code - Unit test","pageid":50,"logpage":50,"revid":101,"params":{},"type":"create","action":"create","user":"WikiSysop","timestamp":"2026-01-27T08:41:58Z","comment":"Created page with \"I decided to make some unit tests for my prime number generator, I used as an example last week, see [[Example code - Classes]] I make two files - one file containing the class ''PrimeGenerator.py'' and one file containing the tests, ''test_PrimeGenerator.py''. The files are supposed to be in the same folder. I will not show the code from last week in ''PrimeGenerator.py'', if you want to see the code, click the above link. <p>  This is my unit test file. I want to test...\""}]}}