М
Молодежь
К
Компьютеры-и-электроника
Д
Дом-и-сад
С
Стиль-и-уход-за-собой
П
Праздники-и-традиции
Т
Транспорт
П
Путешествия
С
Семейная-жизнь
Ф
Философия-и-религия
Б
Без категории
М
Мир-работы
Х
Хобби-и-рукоделие
И
Искусство-и-развлечения
В
Взаимоотношения
З
Здоровье
К
Кулинария-и-гостеприимство
Ф
Финансы-и-бизнес
П
Питомцы-и-животные
О
Образование
О
Образование-и-коммуникации
lizabatyshkina
lizabatyshkina
24.08.2022 21:50 •  Информатика

Задачи по Python.
с задачками :с ​


Задачи по Python. с задачками :с ​

👇
Ответ:

6) ln = float(input())

print(((ln / 2 / 3.14) ** 2) * 3.14)

7) x, y = int(input()), int(input())

print (x + y)

8) r = float(input())

print((r ** 2) * 3.14)

9) print((2 * 2 + 6 * 6)**0.5)

10) print((2 ** 6) + 13)

11) x, y = float(input()), float(input())

x, y = max(x, y), min(x, y)

print(x, y)

12) a, b = int(input()), int(input())

res  = [str(j) for j in range(a, b + 1)]

print(' '.join(res))

13) m. n = float(input()), float(input())

if max(m, n) == m: print("первый " + str(m))

else: print("второй " + str(n))

14) tb = {'1':'шуруп', '2':'гайка', '3':'вин', '4':'гвоздь', '5':'болт'}

print(tb[input()])

15)tb = {'1':'плохо', '2':'неудовлетворительно', '3':'удовлетворительно', '4':'хорошо', '5':'отлично'}

print(tb[input()])

16) for goose in range(33): print('goose - ' + str(goose), 'кроликов - ' + str((64 - ((goose) * 2)) // 4))

17)tb = [5000, 1000, 500, 100, 50, 10]

s = int(input())

for j in tb: print(str(s // j) + " по " + str(j)); s %= j

18) x = float(input())

if x <= 7: print(-3 * x + 9)

else: print(1 / (x - 7))

19) points = [0, 0, 0]

tb = {0:'Иванов', 1:'Петров', 2:'Сидоров'}

for round in range(3): points[0] += int(input()); points[1] += int(input()); points[2] += int(input())

print(tb[points.index(max(points))])

20) tb = {1:'+', 2:'-', 3:'*', 4:'/'}

x, y = float(input()), float(input())

operation = int(input())

print(eval(str(x) + tb[operation] + str(y)))

4,5(94 оценок)
Открыть все ответы
Ответ:
arinashabalina1
arinashabalina1
24.08.2022
#include <iostream>
#include <array>
#include <numeric>
using namespace std;

const size_t N = 10;

int main()
{
    size_t sum = 0;
    array<int, N> a = { 1, 5, 9, 6, 3, 0, 1, 4, -2, 4 };
    cout << "Count: ";
    cout << accumulate(a.cbegin(), a.cend(), 0, [&sum](size_t count, const int
                                                                                                                num) {
                                                    if (num > 1 && num < 5) {
                                                        ++count;
                                                        sum += num;
                                                    }
                                                    return count;
                                                });
    cout << " Sum: " << sum << endl;
}
4,8(2 оценок)
Ответ:
Женёк2006457
Женёк2006457
24.08.2022
#include <iostream>
#include <array>
#include <numeric>
using namespace std;

const size_t N = 10;

int main()
{
    size_t sum = 0;
    array<int, N> a = { 1, 5, 9, 6, 3, 0, 1, 4, -2, 4 };
    cout << "Count: ";
    cout << accumulate(a.cbegin(), a.cend(), 0, [&sum](size_t count, const int
num) {
                                                    if (num > 1 && num < 5) {
                                                        ++count;
                                                        sum += num;
                                                    }
                                                    return count;
                                                });
    cout << " Sum: " << sum << endl;
}
4,4(96 оценок)
Это интересно:
Новые ответы от MOGZ: Информатика
logo
Вход Регистрация
Что ты хочешь узнать?
Спроси Mozg
Открыть лучший ответ