Программирование алгоритмов ветвления
Соотнеси код с его результатом.
Количество соединений: 4
price = 50
if price < 100:
print("price is less than 100")
price = 50
quantity = 5
if price*quantity < 500:
print("price*quantity is less than 500")
print("price = ", price)
print("quantity = ", quantity)
price = 50
quantity = 5
if price*quantity < 500:
print("price is less than 500")
print("price = ", price)
print("quantity = ", quantity)
price = 50
quantity = 5
if price*quantity < 100:
print("price is less than 500")
print("price = ", price)
print("quantity = ", quantity)
print("No if block executed.")
print("quantity = ", quantity)
^
IdentationError: unexpected indent
No if block executed.
price is less than 100
price*quantity is less
than 500
price = 50
quantity = 5
Назад
Проверить
Answers & Comments
Ответ:
1.3
2.4
3.1
4.2
Объяснение: проверено