6.
total_cost = 0
answer = 1
i = 0
while answer:
i += 1
price = float(input("Введите цену товара\n"))
if price > 1500:
total_cost += price - price * 0.08
else:
total_cost += price
if price < 0:
answer = 0
print("Общая стоимость:", total_cost)
7.
first = 1
second = 1
i = 1
user_number = int(input("Введи натуральное число\n"))
print(1)
while first < user_number:
sum = first + second
first = second
second = sum
if sum > user_number:
break
print(sum)
6.
total_cost = 0
answer = 1
i = 0
while answer:
i += 1
price = float(input("Введите цену товара\n"))
if price > 1500:
total_cost += price - price * 0.08
else:
total_cost += price
if price < 0:
answer = 0
print("Общая стоимость:", total_cost)
7.
first = 1
second = 1
i = 1
user_number = int(input("Введи натуральное число\n"))
print(1)
while first < user_number:
sum = first + second
first = second
second = sum
i += 1
if sum > user_number:
break
print(sum)