| @ -0,0 +1,70 @@ | |||||
| { | |||||
| // Use IntelliSense to learn about possible attributes. | |||||
| // Hover to view descriptions of existing attributes. | |||||
| // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | |||||
| "version": "0.2.0", | |||||
| "configurations": [ | |||||
| { | |||||
| "name": "Python: Current File (Integrated Terminal)", | |||||
| "type": "python", | |||||
| "request": "launch", | |||||
| "program": "${file}", | |||||
| "console": "integratedTerminal" | |||||
| }, | |||||
| { | |||||
| "name": "Python: Remote Attach", | |||||
| "type": "python", | |||||
| "request": "attach", | |||||
| "port": 5678, | |||||
| "host": "localhost", | |||||
| "pathMappings": [ | |||||
| { | |||||
| "localRoot": "${workspaceFolder}", | |||||
| "remoteRoot": "." | |||||
| } | |||||
| ] | |||||
| }, | |||||
| { | |||||
| "name": "Python: Module", | |||||
| "type": "python", | |||||
| "request": "launch", | |||||
| "module": "enter-your-module-name-here", | |||||
| "console": "integratedTerminal" | |||||
| }, | |||||
| { | |||||
| "name": "Python: Django", | |||||
| "type": "python", | |||||
| "request": "launch", | |||||
| "program": "${workspaceFolder}/manage.py", | |||||
| "console": "integratedTerminal", | |||||
| "args": [ | |||||
| "runserver", | |||||
| "--noreload", | |||||
| "--nothreading" | |||||
| ], | |||||
| "django": true | |||||
| }, | |||||
| { | |||||
| "name": "Python: Flask", | |||||
| "type": "python", | |||||
| "request": "launch", | |||||
| "module": "flask", | |||||
| "env": { | |||||
| "FLASK_APP": "app.py" | |||||
| }, | |||||
| "args": [ | |||||
| "run", | |||||
| "--no-debugger", | |||||
| "--no-reload" | |||||
| ], | |||||
| "jinja": true | |||||
| }, | |||||
| { | |||||
| "name": "Python: Current File (External Terminal)", | |||||
| "type": "python", | |||||
| "request": "launch", | |||||
| "program": "${file}", | |||||
| "console": "externalTerminal" | |||||
| } | |||||
| ] | |||||
| } | |||||
| @ -0,0 +1,12 @@ | |||||
| { | |||||
| // See https://go.microsoft.com/fwlink/?LinkId=733558 | |||||
| // for the documentation about the tasks.json format | |||||
| "version": "2.0.0", | |||||
| "tasks": [ | |||||
| { | |||||
| "label": "echo", | |||||
| "type": "shell", | |||||
| "command": "python3 ~/python/Expressions.py" | |||||
| } | |||||
| ] | |||||
| } | |||||
| @ -0,0 +1,6 @@ | |||||
| print(5, type(5)) | |||||
| print(5.0, type(5.0)) | |||||
| print(5 % 2, type(5 % 2)) | |||||
| print(5 > 1, type(5 > 1)) | |||||
| print('5', type('5')) | |||||
| print(5 * 2, type(5*2)) | |||||
| @ -0,0 +1,9 @@ | |||||
| w1 = "Supercalifragilisticexpialidocious" | |||||
| w2 = "Antidisestablishmentarianism" | |||||
| w3 = "Honorificabilitudinitatibus" | |||||
| composers = ['Berlioz', 'Borodin', 'Brian', 'Bartok', 'Bellini', 'Buxtehude', 'Bernstein'] | |||||
| composers.sort() | |||||
| print(len(w1)) | |||||
| print("ice" in w1) | |||||
| print(w2 > w3) | |||||
| print(composers[0]) | |||||
| @ -0,0 +1,8 @@ | |||||
| import statistics | |||||
| a = 6 | |||||
| b = 7 | |||||
| c = statistics.mean([a,b]) | |||||
| voornaam = "marcel" | |||||
| tussenvoegsel = "" | |||||
| achternaam = "haazen" | |||||
| mijnnaam = (voornaam + " " + tussenvoegsel + "" + achternaam) | |||||
| @ -0,0 +1,14 @@ | |||||
| import statistics | |||||
| a = 6 | |||||
| b = 7 | |||||
| c = statistics.mean([a,b]) | |||||
| voornaam = "marcel" | |||||
| tussenvoegsel = " " | |||||
| achternaam = "haazen" | |||||
| mijnnaam = (voornaam + " " + tussenvoegsel + "" + achternaam) | |||||
| if(75 > a) and (75 < b): | |||||
| print(False) | |||||
| print(len(mijnnaam) == sum([len(voornaam),len(tussenvoegsel),len(achternaam)])) | |||||
| print(len(mijnnaam) == len(tussenvoegsel)) | |||||
| print(len(mijnnaam) == 5 * len(tussenvoegsel)) | |||||
| print(tussenvoegsel in achternaam) | |||||
| @ -0,0 +1,6 @@ | |||||
| favorieten = ['nano'] | |||||
| print(favorieten) | |||||
| favorieten.append('manila') | |||||
| print(favorieten) | |||||
| favorieten[1]="reol" | |||||
| print(favorieten) | |||||
| @ -0,0 +1,5 @@ | |||||
| a = [-1,4,6,12,15,-6,22] | |||||
| tmp = sorted(a) | |||||
| min = tmp[0] | |||||
| max = tmp[-1] | |||||
| print("bereik", max - min) | |||||
| @ -0,0 +1,4 @@ | |||||
| from collections import Counter | |||||
| letters = ['A', 'C', 'B', 'B', 'C', 'A', 'C', 'C', 'B'] | |||||
| totaal = Counter(letters) | |||||
| print(totaal) | |||||