Skip to content

Commit

Permalink
Initital version
Browse files Browse the repository at this point in the history
  • Loading branch information
stalj committed Jul 20, 2024
1 parent bfa9d71 commit f94cd0a
Show file tree
Hide file tree
Showing 29 changed files with 12,013 additions and 0 deletions.
Binary file not shown.
Binary file not shown.
Binary file added 01-CourseIntroduction/GitClone.pptx
Binary file not shown.
Binary file added 01-CourseIntroduction/GitPush.pptx
Binary file not shown.
Binary file added 01-CourseIntroduction/PP1-Syllabus.docx
Binary file not shown.
Binary file added 01-CourseIntroduction/Test rules.docx
Binary file not shown.
Binary file added 01-CourseIntroduction/py4e-EN-2023.pdf
Binary file not shown.
Binary file added 01-CourseIntroduction/py4e-PL-2023.pdf
Binary file not shown.
Binary file added 02-TypesAndVariables/02-TypesAndVariables.docx
Binary file not shown.
Binary file added 03-ControlStructures/03-ControlStructures.docx
Binary file not shown.
Binary file added 04-Subroutines/04-Subroutines.docx
Binary file not shown.
50 changes: 50 additions & 0 deletions 05-Test1/mock/check.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
'''
1. Place the program check.py in same the folder as your programs.
2. To check your programs, run the check.py.
3. You can find your results in the file results.txt
'''

import sys
import unittest

class Test(unittest.TestCase):
def test_p1(self):
import p1
self.assertEqual(p1.f(31),7)
self.assertEqual(p1.f(8),3)
self.assertEqual(p1.f(2),1)
self.assertEqual(p1.f(0),0)

def test_p2(self):
import p2
self.assertEqual(p2.f(5,6,7),True)
self.assertEqual(p2.f(5,7,5),False)
self.assertEqual(p2.f(5,5,7),False)
self.assertEqual(p2.f(7,5,5),False)
self.assertEqual(p2.f(7,7,7),False)

def test_p3(self):
import p3
self.assertEqual(p3.f("For Your Information"),"FYI")
self.assertEqual(p3.f("Hello Poland Krakow university"),"HPKu")

def test_p4(self):
import p4
self.assertEqual(p4.f("5290312400019022"),"52**********9022")
self.assertEqual(p4.f("1111000022227777"),"11**********7777")

def test_p5(self):
import p5
self.assertEqual(p5.f("101101"),True)
self.assertEqual(p5.f("1011201"),False)
self.assertEqual(p5.f("1010b1"),False)

def test_p6(self):
import p6
self.assertEqual(p6.f(3124,True),6)
self.assertEqual(p6.f(20576,False),12)


if __name__ == '__main__':
sys.stderr = open('results.txt', 'w', encoding="utf-8")
unittest.main(verbosity=2)
Binary file added 05-Test1/mock/mock.docx
Binary file not shown.
21 changes: 21 additions & 0 deletions 05-Test1/mock/p1.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
'''
(p1.py) The vending machine accepts
1, 2 and 5 PLN coins. Define the function
f(amount_to_pay) that returns the minimum number
of coins that can be used to pay
for the purchased product.
'''
def f(n):
coins = 0
coins += n//5
n = n % 5
coins += n//2
n = n % 2
coins += n
return coins

if __name__ == '__main__':
#check your program in this place
print(f(9))
print(f(10))
print(f(16))
17 changes: 17 additions & 0 deletions 05-Test1/mock/p2.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
'''
(p2.py) Define the function f(n1,n2,n3)
that returns True if all three numbers n1,n2,n3
are different or False otherwise.
'''
def f(n1,n2,n3):
if n1 != n2 and n2 != n3 and n1 != n3:
return True
else:
return False

if __name__ == "__main__":
#check your program in this place
print(f(1,2,3))
print(f(1,2,2))
print(f(1,1,2))
print(f(1,2,1))
Binary file added 06-Arrays/06-Arrays.docx
Binary file not shown.
Binary file added 07-FileHandling/07-FilesHandling.docx
Binary file not shown.
Binary file not shown.
101 changes: 101 additions & 0 deletions 09-Test2/mock/data.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
name,surname,gender,age,married,children,email,phone,work,salary,creditcard,expenditures,car,carcolor
Burk,Servis,Male,52,false,3,[email protected],579 737 143,Editor,6970,true,2788,Mercedes-Benz,Purple
Hermann,Bankhurst,Male,40,true,0,[email protected],819 292 179,Assistant Professor,12170,true,3651,Ford,Khaki
Cullen,Millgate,Male,39,true,6,[email protected],522 851 085,Human Resources Manager,16040,false,9624,Chevrolet,Violet
Flin,Kenelin,Male,56,false,3,[email protected],850 679 777,Nurse,7230,true,3615,Mercury,Khaki
Lucas,Truett,Male,32,true,6,[email protected],634 910 417,Senior Quality Engineer,15070,false,12056,Mitsubishi,Pink
Merill,Heskey,Male,43,true,1,[email protected],867 998 661,General Manager,7640,false,2292,Pontiac,Fuscia
Evaleen,Uttridge,Female,56,true,1,[email protected],634 127 470,Media Manager III,3050,false,2135,Dodge,Indigo
Kippar,Kinner,Male,40,true,1,[email protected],804 964 440,Geologist III,8420,false,2526,Volkswagen,Maroon
Cal,Sharratt,Male,40,true,1,[email protected],818 449 500,Health Coach IV,11910,false,10719,Lincoln,Crimson
Bartel,Cochern,Male,36,true,3,[email protected],688 837 145,Help Desk Technician,17410,true,13928,Dodge,Goldenrod
Hanna,Gyford,Female,51,false,5,[email protected],563 129 315,Automation Specialist I,6870,true,5496,Dodge,Violet
Thomasa,Clancy,Female,45,true,3,[email protected],848 812 477,Assistant Manager,13040,false,7824,Cadillac,Orange
Joseito,Benettini,Male,36,true,6,[email protected],539 402 404,Automation Specialist III,3440,true,3096,Dodge,Blue
Carr,Vanshin,Male,27,true,0,[email protected],804 857 401,Internal Auditor,9800,true,7840,Chevrolet,Indigo
Tomasine,Samuel,Female,54,true,2,[email protected],568 881 391,Speech Pathologist,2640,true,1320,Ford,Puce
Gino,De Blasiis,Male,38,true,4,[email protected],562 355 808,Internal Auditor,3990,true,798,Volkswagen,Red
Valentine,Fritchley,Female,55,true,4,[email protected],870 931 235,Accountant I,9120,false,3648,Land Rover,Aquamarine
Silvanus,O'Longain,Male,33,true,0,[email protected],563 081 802,Tax Accountant,4730,true,2365,Audi,Khaki
Jeramey,Solly,Male,21,true,0,[email protected],824 315 578,Marketing Assistant,1980,true,1584,MINI,Yellow
Stephan,Dunge,Male,20,false,6,[email protected],802 767 891,Help Desk Technician,3890,true,1945,Scion,Puce
Katusha,Grebner,Female,47,true,4,[email protected],847 394 157,Web Developer I,7580,false,6064,Dodge,Blue
Ciro,Rosenbush,Male,55,true,4,[email protected],805 491 393,Senior Developer,4800,true,3360,Acura,Goldenrod
Madelyn,Nannizzi,Female,53,false,6,[email protected],840 113 963,Assistant Manager,15890,true,6356,Dodge,Purple
Sumner,Hansbury,Male,25,false,0,[email protected],544 291 869,Senior Editor,11410,true,5705,Lexus,Green
Carlye,Scamel,Female,22,true,3,[email protected],836 193 850,Administrative Assistant II,6780,true,1356,Mitsubishi,Green
Tab,Ondricek,Male,18,false,1,[email protected],539 853 933,Administrative Assistant II,17230,true,6892,Scion,Blue
Benoite,Ethelston,Female,53,false,1,[email protected],834 948 779,Technical Writer,3010,true,1505,Pontiac,Aquamarine
Rodney,Hucke,Male,58,true,1,[email protected],578 892 703,Accounting Assistant I,6290,false,3145,Suzuki,Teal
Corene,Samuels,Female,29,false,2,[email protected],635 120 341,Assistant Manager,4430,true,1329,Mitsubishi,Indigo
Cindy,Dubble,Female,59,true,1,[email protected],861 291 786,Payment Adjustment Coordinator,11280,false,4512,Chrysler,Blue
Tessa,Crocroft,Female,23,false,3,[email protected],847 707 528,Health Coach III,9040,true,4520,Ford,Pink
Lorry,Upfold,Male,37,false,4,[email protected],668 174 428,Web Designer III,6820,false,2728,MINI,Indigo
Hammad,Stanhope,Male,59,true,3,[email protected],882 187 785,Quality Control Specialist,7780,true,3112,Isuzu,Pink
Ruttger,Norridge,Male,36,false,2,[email protected],874 958 392,Social Worker,5610,true,1122,Suzuki,Mauv
Bonnibelle,Stelfox,Female,25,false,6,[email protected],819 408 786,GIS Technical Architect,9930,true,5958,Mercedes-Benz,Turquoise
Dionysus,Gobourn,Male,36,true,0,[email protected],690 147 674,Recruiter,5810,true,4648,Ford,Blue
Yulma,Sharplin,Male,41,true,2,[email protected],540 212 731,Speech Pathologist,5710,true,3997,Mitsubishi,Orange
Etti,Antognetti,Female,22,true,2,[email protected],820 959 260,Help Desk Operator,2640,false,2376,Oldsmobile,Aquamarine
Tulley,Glanz,Male,52,false,3,[email protected],574 043 990,Technical Writer,6940,false,1388,Pontiac,Yellow
Morse,Dwelly,Male,29,true,1,[email protected],885 586 546,Speech Pathologist,6480,true,2592,Lincoln,Mauv
Gael,Henstone,Female,24,false,5,[email protected],637 031 073,Marketing Manager,5640,true,2820,Ford,Khaki
Neddie,D'Alesco,Male,19,false,4,[email protected],514 170 021,Research Nurse,12350,false,4940,Mitsubishi,Goldenrod
Lazar,Moran,Male,35,false,5,[email protected],633 742 403,Marketing Manager,9720,true,6804,Plymouth,Indigo
Harbert,Dawid,Male,31,true,5,[email protected],822 680 985,Nuclear Power Engineer,14970,false,13473,Porsche,Maroon
Selle,Cheale,Female,38,false,1,[email protected],843 349 465,Account Coordinator,9400,true,6580,Toyota,Aquamarine
Horatio,Cauthra,Male,43,true,2,[email protected],890 276 081,Environmental Tech,15390,false,13851,Porsche,Violet
Ethyl,Burlingame,Female,42,true,2,[email protected],571 332 272,Analog Circuit Design manager,15960,true,4788,Dodge,Crimson
Enrica,Heintsch,Female,23,false,2,[email protected],883 618 250,Editor,17680,true,7072,Toyota,Pink
Sinclair,Rochewell,Male,27,true,4,[email protected],830 492 111,Web Designer II,11640,true,5820,Jeep,Indigo
Licha,Brunetti,Female,44,false,3,[email protected],640 101 107,Senior Developer,5950,false,2380,Mercedes-Benz,Orange
Shelia,Ryle,Female,23,true,2,[email protected],663 296 184,Staff Scientist,10030,false,5015,Ford,Pink
Jephthah,Studeart,Male,22,false,4,[email protected],519 665 307,Staff Scientist,2260,false,1582,Subaru,Mauv
Nita,Maruszewski,Female,46,true,3,[email protected],894 522 779,Marketing Assistant,16170,true,14553,Mitsubishi,Goldenrod
Marje,Shaul,Female,60,false,4,[email protected],506 790 304,Automation Specialist III,7830,false,3132,Mazda,Mauv
Michele,Burkert,Male,57,true,6,[email protected],547 261 427,Tax Accountant,14140,false,11312,Dodge,Red
Monique,Limpkin,Female,29,false,2,[email protected],819 533 150,Staff Accountant III,2830,true,1698,Lexus,Crimson
Hewet,Gravet,Male,60,true,3,[email protected],641 408 681,Structural Analysis Engineer,2060,true,1854,Suzuki,Teal
Dewitt,Tague,Male,24,false,2,[email protected],606 101 555,General Manager,7810,true,3905,Land Rover,Khaki
Cristen,Byard,Female,25,false,5,[email protected],576 863 742,Librarian,1860,true,1488,Volvo,Red
Kile,Suermeiers,Male,28,false,3,[email protected],807 854 274,Payment Adjustment Coordinator,4320,false,3456,Mercedes-Benz,Khaki
Avictor,Benardette,Male,30,false,4,[email protected],667 621 570,Geological Engineer,3580,false,2148,Jaguar,Orange
Westbrook,Karim,Male,50,false,6,[email protected],681 504 173,Staff Scientist,16640,true,13312,Toyota,Violet
Gerome,Theml,Male,35,false,4,[email protected],802 370 317,Research Associate,13300,true,6650,Rolls-Royce,Puce
Natala,Couling,Female,46,false,3,[email protected],846 529 173,Director of Sales,9200,false,4600,Mitsubishi,Purple
Christoffer,Dunsmore,Male,23,true,0,[email protected],808 890 458,Chief Design Engineer,14110,true,4233,Mitsubishi,Puce
Vito,Frisch,Male,45,true,0,[email protected],514 558 379,Sales Associate,3770,false,3016,Volkswagen,Blue
Tessie,McCoveney,Female,51,false,0,[email protected],837 442 673,Financial Advisor,11710,true,7026,Ford,Orange
Pascale,Puckring,Male,19,false,5,[email protected],527 499 560,Physical Therapy Assistant,13760,false,2752,GMC,Mauv
Jephthah,Donativo,Male,45,false,6,[email protected],847 283 877,Database Administrator I,8270,false,1654,GMC,Mauv
Wendi,Llywarch,Female,24,false,2,[email protected],611 244 638,Human Resources Assistant III,6470,true,2588,Buick,Goldenrod
Demetrius,Cucinotta,Male,22,true,5,[email protected],872 206 410,GIS Technical Architect,1510,true,453,Jaguar,Goldenrod
Daloris,Halson,Female,58,false,2,[email protected],657 600 411,General Manager,8120,false,6496,Ford,Crimson
Daniela,Batey,Female,50,true,4,[email protected],561 024 772,Help Desk Technician,12250,false,11025,Suzuki,Turquoise
Judon,Haizelden,Male,28,true,0,[email protected],533 454 826,Social Worker,15910,false,11137,Dodge,Teal
Jamill,Obray,Male,37,false,6,[email protected],826 906 150,Environmental Specialist,3640,false,3276,Ford,Turquoise
Jone,Treece,Male,32,false,6,[email protected],617 663 646,Analog Circuit Design manager,5660,false,4528,Chevrolet,Blue
Karla,O'Sheeryne,Female,40,true,2,[email protected],881 771 480,Biostatistician III,2670,true,2403,Ford,Yellow
Cyb,Van De Cappelle,Female,18,true,5,[email protected],820 311 476,Software Consultant,9120,false,2736,Ford,Turquoise
Lorrayne,Flippen,Female,19,false,1,[email protected],823 468 710,Compensation Analyst,9200,true,3680,Mercury,Maroon
Noreen,O'Canavan,Female,52,true,0,[email protected],664 009 863,Legal Assistant,11640,false,6984,Hummer,Crimson
Pincus,Loughren,Male,27,true,2,[email protected],520 825 739,Business Systems Development Analyst,2100,false,1260,Dodge,Teal
Arlen,Grocutt,Male,38,false,6,[email protected],693 915 155,Dental Hygienist,13090,false,7854,Porsche,Puce
Cindra,Barthot,Female,27,false,1,[email protected],825 889 023,Executive Secretary,14640,false,8784,Audi,Pink
Putnem,Robley,Male,35,true,3,[email protected],516 680 385,Structural Analysis Engineer,7490,false,5243,GMC,Goldenrod
Annabell,Tansill,Female,35,false,6,[email protected],833 676 407,Software Engineer III,11320,false,5660,Toyota,Blue
Carr,Scullion,Male,52,true,6,[email protected],848 732 898,Senior Developer,3880,false,2328,Nissan,Yellow
Noam,Adamski,Male,53,true,1,[email protected],529 402 879,Speech Pathologist,13260,false,9282,Saab,Orange
Adina,Von Welden,Female,54,true,6,[email protected],807 354 244,Environmental Specialist,16160,true,4848,Nissan,Mauv
Johannes,Carlill,Male,29,true,5,[email protected],554 812 271,Environmental Specialist,16230,false,8115,Volkswagen,Puce
Rozamond,Terrill,Female,19,false,5,[email protected],823 052 153,Geological Engineer,4350,false,2610,Mercedes-Benz,Violet
Alan,Stiggles,Male,30,true,1,[email protected],858 765 046,Social Worker,17520,false,5256,Volkswagen,Teal
Alameda,Branton,Female,23,false,1,[email protected],634 518 796,VP Sales,2450,false,1715,Saturn,Purple
Denice,Guichard,Female,36,false,4,[email protected],698 065 766,Project Manager,12760,false,2552,Ford,Pink
Mic,Asker,Male,22,false,2,[email protected],889 516 511,Accountant II,13390,true,12051,Infiniti,Fuscia
Marchall,Johanssen,Male,34,false,2,[email protected],833 234 352,Payment Adjustment Coordinator,3700,false,2220,Hyundai,Orange
Kimberlee,Dedham,Female,50,true,3,[email protected],803 767 819,Media Manager II,10860,false,9774,Hyundai,Red
Caresa,Goble,Female,39,false,6,[email protected],683 834 279,Nurse Practicioner,17670,false,12369,Volvo,Teal
Elfreda,Rannells,Female,43,false,5,[email protected],551 748 237,Tax Accountant,17120,false,5136,Pontiac,Puce
Gael,Worsfield,Female,56,false,5,[email protected],829 535 533,Internal Auditor,17820,true,8910,Mercedes-Benz,Mauv
Evie,Klampt,Female,56,false,4,[email protected],846 224 379,Project Manager,11720,false,10548,Pontiac,Aquamarine
Loading

0 comments on commit f94cd0a

Please sign in to comment.