|
16 | 16 | " elif (speler == 'steen' and computer == 'schaar') or \\\n", |
17 | 17 | " (speler == 'papier' and computer == 'steen') or \\\n", |
18 | 18 | " (speler == 'schaar' and computer == 'papier'):\n", |
19 | | - " print('Punt voor jou!')\n", |
| 19 | + " print(\"Punt voor jou!\")\n", |
20 | 20 | " return 1\n", |
21 | 21 | " else:\n", |
22 | | - " print('Punt voor de computer!')\n", |
| 22 | + " print(\"Punt voor de computer!\")\n", |
23 | 23 | " return 2\n", |
24 | 24 | "\n", |
25 | 25 | "def speelSpel():\n", |
26 | 26 | " score_speler = 0\n", |
27 | 27 | " score_computer = 0\n", |
28 | 28 | "\n", |
29 | 29 | " for teller in range(0, 5):\n", |
30 | | - " keuze = input('Steen, papier, schaar? ').lower()\n", |
| 30 | + " keuze = input(\"Steen, papier, schaar? \").lower()\n", |
31 | 31 | "\n", |
32 | 32 | " computerkeuze = random.randint(1, 3)\n", |
33 | 33 | " if computerkeuze == 1:\n", |
|
37 | 37 | " else:\n", |
38 | 38 | " computer = 'schaar'\n", |
39 | 39 | "\n", |
40 | | - " print(f'Computer kiest: {computer}')\n", |
| 40 | + " print(f\"Computer kiest: {computer}\")\n", |
41 | 41 | "\n", |
42 | 42 | " resultaat = bepaal_winnaar(keuze, computer)\n", |
43 | 43 | "\n", |
|
48 | 48 | "\n", |
49 | 49 | " print(f\"Stand: {score_speler} - {score_computer}\")\n", |
50 | 50 | "\n", |
51 | | - " print('--- EINDSTAND ---')\n", |
| 51 | + " print(\"--- EINDSTAND ---\")\n", |
52 | 52 | " if score_speler > score_computer:\n", |
53 | | - " print('Jij bent de winnaar!')\n", |
| 53 | + " print(\"Jij bent de winnaar!\")\n", |
54 | 54 | " elif score_speler < score_computer:\n", |
55 | | - " print('De computer heeft gewonnen.')\n", |
| 55 | + " print(\"De computer heeft gewonnen.\")\n", |
56 | 56 | " else:\n", |
57 | | - " print('Het is gelijkspel!')\n", |
| 57 | + " print(\"Het is gelijkspel!\")\n", |
58 | 58 | "\n", |
59 | 59 | "speelSpel()\n", |
60 | 60 | "```\n", |
61 | 61 | "</details>\n" |
62 | 62 | ] |
63 | 63 | } |
64 | 64 |
|
| 65 | + |
0 commit comments