SHOW:
|
|
- or go back to the newest paste.
| 1 | - | import json |
| 1 | + | def loesung(url_chall_7, url_sol_7) -> object: # Welchen Rückgabewert würde man erwarten, wenn hier nicht object angegeben wäre? |
| 2 | - | import requests |
| 2 | + | def search(listoo, k): |
| 3 | - | import time |
| 3 | + | for index1 in listoo: |
| 4 | - | |
| 4 | + | set = index1 #Wieso war es hier nötig eine neue Variable zu deklarieren? |
| 5 | - | |
| 5 | + | for index2 in listoo: # Muss hier wirklich die Liste komplett neu durchlaufen werden? Existiert überhaupt eine Lösung [a, b] wenn b < a? |
| 6 | - | |
| 6 | + | if index2 == set: # Wenn etwas zutrifft mache nichts aber wenn etwas NICHT zutrifft tue etwas? Was passiert wenn gilt das: x % 2 == 0 und a|x => 2a = x? |
| 7 | - | def loesung(url_chall_7, url_sol_7) -> object: |
| 7 | + | pass |
| 8 | - | |
| 8 | + | else: |
| 9 | - | def search(listoo, k): |
| 9 | + | if set + index2 == k: # Was passiert wenn gilt das: x % 2 == 0 und a|x => 2a = x? |
| 10 | - | for index1 in listoo: |
| 10 | + | v1 = listoo.index(set) |
| 11 | - | set = index1 |
| 11 | + | v2 = listoo.index(index2) |
| 12 | - | for index2 in listoo: |
| 12 | + | return [v1, v2] #match gefunden (Wofür speichert man die Werte erst in v1 und v2? |
| 13 | - | if index2 == set: |
| 13 | + | else: |
| 14 | - | pass |
| 14 | + | pass # Wofür ist dieses Else? |