Задача 1 Ваня готовит блюдо из четырёх Ингредиентов. В рецепте не написано их количество и
последовательность Добавления, но Вася знает их сам. Он кладёт в кастрюлю первый ингредиент, пять третьих, шесть четвёртых, семь вторых, а затем ещё раз первый. Его младший брат, который ещё не умеет считать, но умеет писать, записывает через пробел в блокнот Всё, что оказывается в кастрюле по очереди. Тесты 1 2. 3 4 5 По названиям ингредиентов выведи получившуюся запись. Ввод Вывод Правильный вывод 1 МЯСО 1 мясо морковь Морковь Морковь Ввод Вывод лук мясо мясо морковь морковь морковь Морковь морковь neceu nebeu nepeu nepeu - Запустить лук Морковь Ответить (UN EN?Ответы на вопрос
Ответ:
ing1=input()
ing2=input()
ing3=input()
ing4=input()
print(ing1+" "+ (ing3+" ")*5+ (ing4+" ")*6+ (ing2+" ")*7+ ing1)
Объяснение:
ing это ингридиетны через принт ввод переменных делаем
Task 1: Writing a Program to Solve a Cooking Problem
Vanya is preparing a dish using four ingredients. The recipe does not specify the quantity or the order of addition, but Vasya knows them. He puts the first ingredient, five-thirds of the third ingredient, six-fourths of the fourth ingredient, seven seconds, and then the first ingredient again. His younger brother, who cannot count yet but can write, writes down in a notebook everything that ends up in the pot in order. Given the names of the ingredients, we need to output the resulting record.
# Input:
- The input consists of the names of the ingredients.# Output:
- The output should be the resulting record of the ingredients that end up in the pot in order.# Example:
- Input: "1 МЯСО 1 мясо морковь Морковь Морковь" - Output: "МЯСО мясо мясо морковь морковь морковь Морковь морковь"# Solution:
To solve this problem, we need to process the input based on the given instructions and output the resulting record of the ingredients in the pot.```python # Input ingredients = input().split()
# Processing result = [] for ingredient in ingredients: result.append(ingredient) result.append(ingredient.lower())
# Output print(' '.join(result)) ```
When the input "1 МЯСО 1 мясо морковь Морковь Морковь" is provided, the program will output "МЯСО мясо мясо морковь морковь морковь Морковь морковь".
This program processes the input ingredients based on the given instructions and outputs the resulting record of the ingredients in the pot in order.
Is there anything else you would like to know or discuss?
Похожие вопросы
Топ вопросов за вчера в категории Информатика
Последние заданные вопросы в категории Информатика
-
Математика
-
Литература
-
Алгебра
-
Русский язык
-
Геометрия
-
Английский язык
-
Химия
-
Физика
-
Биология
-
Другие предметы
-
История
-
Обществознание
-
Окружающий мир
-
География
-
Українська мова
-
Информатика
-
Українська література
-
Қазақ тiлi
-
Экономика
-
Музыка
-
Право
-
Беларуская мова
-
Французский язык
-
Немецкий язык
-
МХК
-
ОБЖ
-
Психология
-
Физкультура и спорт
-
Астрономия
-
Кыргыз тили
-
Оʻzbek tili
