• 1
    Input and Output Data
    • Tasks
  • 2
    Conditions
    • Tasks
  • 3
    For Loop
    • Tasks
  • 4
    Strings
    • Tasks
  • 5
    While Loop
    • Tasks
  • 6
    Lists
    • Tasks
  • 7
    Two-Dimensional Arrays
    • Tasks
  • 8
    Dictionaries
    • Tasks
  • 9
    Sets
    • Tasks
  • 10
    Functions and Recursion
    • Tasks
  • к

Занятие 7. Two -dimensional arrays

Difficulty level:

Task«Ordering food»

You work in the restaurant automation system. Your task & ndash; Write a program that processes customer orders. The program should accept the number of chosen dishes from the client from the client, calculate the total cost of order, cooking time and use a discount, if necessary.
rn
the restaurant menu:
rn
1) pasta - 250 rubles - 150 rubles - 150 rubles - 150 rubles - 150 rubles - 150 rubles - 150 rubles - 150 rubles minutes rn
2) pizza-500 rubles-20 minutes rn
3) salad -150 rubles -10 minutes
rn
4) 4) SUV 200 rubles - 15 minutes
rn
5) dessert - 300 rubles - 5 minutes
rn
conditions:
rn
the client can order from 1 to 5 dishes.
rn
rn
e the time of waiting time for the preparation of all selected dishes.

Input format

First, the number of dishes that the client want to order (an integer is from 1 to 5). Then a sequence of numbers of dishes selected by the client (integers from 1 to 5), separated by spaces
, is introduced.

Output format

the program should derive three lines:
rn
the total cost of the order (taking into account the discount, if any).
rn
The waiting time in minutes.
rn
message" the order cannot be executed "if the order amount is less than 1000 rubles

Example

Input

3
1 2 3

Output

900.0
45
The order cannot be executed

Hint

There will be no clue here, decide for yourself!

main.py
Test 1
Test 2
Test 3
Test 4
Test 5
Test 6
Test 7
Test 8
Test 9
Test 10
Developer’s solution

🎉 Congratulations! 🎉

You did an excellent job with the task! It was a challenging problem, but you found the correct solution. You are one step closer to mastering programming! Keep up the good work, because every stage you pass makes you even stronger.

AD

Advertisement

red-snake blue-snake green-snake

Running your code...

Помощник ИИ

Привет! Я твой помощник по программированию. Задавай любые вопросы по Python, я могу рассказать о функциях, методах, обьяснить то, что тебе не понятно, а так же о текущей задаче!