Программирование алгоритмов ветвления

Соотнеси код с его результатом.

Количество соединений: 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

Назад

Проверить


Please enter comments
Please enter your name.
Please enter the correct email address.
You must agree before submitting.

Answers & Comments


Copyright © 2024 SCHOLAR.TIPS - All rights reserved.