We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6c390f7 commit 6841f11Copy full SHA for 6841f11
05_Petle/input.py
@@ -1,2 +1,2 @@
1
-n = input("Podaj liczbę:")
2
-print(n)
+n = int(input("Podaj liczbę:"))
+print(f'Podałeś liczbę {n}')
12_Wyjatki_i_obsluga_bledow/input_error.py
@@ -0,0 +1,10 @@
+
+not_read = True
3
+while not_read:
4
+ try:
5
+ n = int(input("Podaj liczbę:"))
6
+ not_read = False
7
+ except ValueError as e:
8
+ print(e)
9
10
0 commit comments