Город МОСКОВСКИЙ
00:04:17

9# The Farm Problem | Scratch Coding Practices & challenging Tasks

Аватар
Техники рисования макияжа глаз
Просмотры:
40
Дата загрузки:
16.10.2023 11:48
Длительность:
00:04:17
Категория:
Технологии и интернет

Описание

In this challenge, a farmer is asking you to tell him how many legs can be counted among all his animals. The farmer breeds three species:

chickens = 2 legs
cows = 4 legs
sheep = 4 legs

The farmer has counted his animals and he gives you a subtotal for each species. You have to implement a function that returns the total number of legs of all the animals.

Examples
animals(2, 3, 5) ➞ 36
animals(1, 2, 3) ➞ 22
animals(5, 2, 8) ➞ 50

Рекомендуемые видео