Worksheetspython_L1+2
Total questions: 20
Worksheet time: 11mins
if is_sky_blue (a) True:
print("It is daytime.")
Który blok kodu jest poprawny?
if is_sky_blue == True:
print("It is daytime.")
else:
print("It is night")
if is_sky_blue = True:
print("It is daytime.")
else:
print("It is night")
if is_sky_blue = True:
print("It is daytime.")
elif:
print("It is night")
if is_sky_blue == True:
print("It is daytime.")
elif:
print("It is night")
*
dzielenie
mnożenie
dzielenie nez reszty
stopień
a = "True"
string
bool
float
a = True
string
bool
float
//
dzielenie bez reszty
reszta z dzielenia
dzielenie
%
reszta z dzielenia
dzielenie bez reszty
mnożenie
/
dzielenie
dzielenie bez reszty
reszta z dzielenia
**
mnożenie
stopień
reszta z dzielenia
a = "1"
string
int
float
bool
a = 1
string
int
float
bool
a = 1.0
string
int
bool
float
a = "1.0"
float
int
string
bool
która wersja jest poprawna?
if a > b:
print("a({a}) > b({b})")
elif a = b:
print(f"a = b ({a})")
else:
print(f"b({b}) > a({a})")
if a > b:
print(f"a({a}) > b({b})")
elif a == b:
print(f"a = b ({a})")
else:
print(f"b({b}) > a({a})")
if a > b:
print("a({a}) > b({b})")
elif a == b:
print(f"a = b ({a})")
else:
print(f"b({b}) > a({a})")
if a > b:
print(f"a({a}) > b({b})")
elif a = b:
print(f"a = b ({a})")
else:
print(f"b({b}) > a({a})")
!=
różne od
równe
większe
WYNIK KODU
is_sky_green = False
print(not is_sky_green)
True
False
is_sky_green = False
print(is_sky_green)
True
False
if a > b and a > c:
print(f"{a} is the biggest number we have.")
elif b > a and b > c:
print(f"{b} is the biggest number we have.")
else:
print(f"{c} is the biggest number we have.")
POPRAWNY KOD
NIEPOPRAWNY KOD
if a > b and a > c:
print(f"{a} is the biggest number we have.")
else b > a and b > c:
print(f"{b} is the biggest number we have.")
else:
print(f"{c} is the biggest number we have.")
POPRAWNY KOD
NIEPOPRAWNY KOD
if a > b and a > c:
print("{a} is the biggest number we have.")
elif b > a and b > c:
print("{b} is the biggest number we have.")
else:
print("{c} is the biggest number we have.")
POPRAWNY KOD
NIEPOPRAWNY KOD
