dzien_02 - init
This commit is contained in:
19
dzien_02/Readme.md
Normal file
19
dzien_02/Readme.md
Normal file
@@ -0,0 +1,19 @@
|
||||
## Plan pracy na dziś:
|
||||
|
||||
- więcej o wcięciach
|
||||
- pętle:
|
||||
- for (iteracyjna)
|
||||
- while (warunkowa)
|
||||
- Instrukcje warunkowe
|
||||
- if / elif
|
||||
- if / if
|
||||
- definicje funkcji
|
||||
|
||||
- Tutaj mniej więcej przerwa obiadowa
|
||||
|
||||
- funkcje, definicje, parametry
|
||||
- zasięg zmiennych
|
||||
- zmienne mutable i immutable
|
||||
|
||||
- więcej importowaniu, wstęp do virtualenv
|
||||
|
||||
34
dzien_02/r1_07.py
Normal file
34
dzien_02/r1_07.py
Normal file
@@ -0,0 +1,34 @@
|
||||
# program r1_07.py
|
||||
# Przykłady dla instrukcji warunkowych
|
||||
|
||||
test_object = 23
|
||||
if test_object < 20:
|
||||
print("Niska wartość")
|
||||
elif test_object < 30:
|
||||
print("Mniej niż 30")
|
||||
elif test_object < 40:
|
||||
print("Mniej niż 40")
|
||||
else:
|
||||
print("Żaden z powyższych.")
|
||||
|
||||
test_object = 43
|
||||
if test_object < 20:
|
||||
print("Niska wartość")
|
||||
elif test_object < 30:
|
||||
print("Mniej niż 30")
|
||||
elif test_object < 40:
|
||||
print("Mniej niż 40")
|
||||
else:
|
||||
print("Żaden z powyższych.")
|
||||
|
||||
test_object = "Adam"
|
||||
if test_object == "Adam":
|
||||
print("Mamy test_object o wartości Adam")
|
||||
else:
|
||||
print(f"Inna wartość => {test_object}.")
|
||||
|
||||
test_object = "adam"
|
||||
if test_object == "Adam":
|
||||
print("Mamy test_object o wartości Adam")
|
||||
else:
|
||||
print(f"Inna wartość => {test_object}.")
|
||||
20
dzien_02/r1_08.py
Normal file
20
dzien_02/r1_08.py
Normal file
@@ -0,0 +1,20 @@
|
||||
# program r1_08.py
|
||||
# Przykłady dla instrukcji warunkowych
|
||||
|
||||
test_object = 23
|
||||
print(f"test dla wartości = {test_object}")
|
||||
if test_object < 20:
|
||||
print("Niska wartość")
|
||||
if test_object < 30:
|
||||
print("Mniej niż 30")
|
||||
if test_object < 40:
|
||||
print("Mniej niż 40")
|
||||
|
||||
test_object = 43
|
||||
print(f"test dla wartości = {test_object}")
|
||||
if test_object < 20:
|
||||
print("Niska wartość")
|
||||
if test_object < 30:
|
||||
print("Mniej niż 30")
|
||||
if test_object < 40:
|
||||
print("Mniej niż 40")
|
||||
Reference in New Issue
Block a user