Предмет: Информатика, автор: vektor13xxx

составь программу для вычисления следующих параметров комнаты, используя размеры заданные на рисунке. Площадью полной поверхности называется сумма площадей всех поверхностей кирпича.
0. размер комнаты- длина 5 метров.
ширина 4 метра.
высота 3 метра.
1. Площадь пола комнаты.
2.Периметр комнаты
3.Площадь четырех стен комнаты.
4. Объём комнаты.
5. Площадь общей поверхности комнаты.
(сделать нужно на "Python"! версия-3.7.2! это обязательно! если сможете то сделайте и на "java" этим людям понравится.)​

Приложения:

Ответы

Автор ответа: daniil062
1

length, width, height = 5, 4, 3

floor = length * width

print(f"1: {floor}")

print(f"2: {(length + width) * 2}")

walls = (length * height + width * height) * 2

print(f"3: {walls}")

print(f"4: {length * width * height}")

print(f"5: {walls + 2 * floor}")

Автор ответа: mrgoldenbroerrormine
2

Python:

# 0. Размер комнаты

length = 5

width = 4

height = 3

# 1. Площадь пола комнаты

floor_area = length * width

print("Площадь пола:", floor_area, "квадратные метры")

# 2. Периметр комнаты

perimeter = 2 * (length + width)

print("Периметр:", perimeter, "метры")

# 3. Площадь четырех стен комнаты

wall_area = 2 * (length * height + width * height)

print("Площадь стены:", wall_area, "квадратные метры")

# 4. Объём комнаты

volume = length * width * height

print("Объём:", volume, "кубические метры")

# 5. Площадь общей поверхности комнаты

total_surface_area = 2 * (length * width + length * height + width * height)

print("Общая площадь поверхности:", total_surface_area, "квадратные метры")

Java:

import java.util.Scanner;

public class Room {

   public static void main(String[] args) {

       Scanner scanner = new Scanner(System.in);

       // 0. Размер комнаты

       System.out.print("Введите длину помещения (в метрах): ");

       double length = scanner.nextDouble();

       System.out.print("Введите ширину помещения (в метрах): ");

       double width = scanner.nextDouble();

       System.out.print("Введите высоту помещения (в метрах): ");

       double height = scanner.nextDouble();

       // 1. Площадь пола комнаты

       double floorArea = length * width;

       System.out.println("Площадь пола: " + floorArea + " квадратные метры");

       // 2. Периметр комнаты

       double perimeter = 2 * (length + width);

       System.out.println("Периметр: " + perimeter + " метров");

       // 3. Площадь четырех стен комнаты

       double wallArea = 2 * (length * height + width * height);

       System.out.println("Площадь стены: " + wallArea + " квадратные метры");

       // 4. Объём комнаты

       double volume = length * width * height;

       System.out.println("Объём: " + volume + " кубические метры");

       // 5. Площадь общей поверхности комнаты

       double totalSurfaceArea = 2 * (length * width + length * height + width * height);

       System.out.println("Общая площадь поверхности: " + totalSurfaceArea + " квадратные метры");

   }

}

Интересные вопросы
Предмет: Английский язык, автор: silense1
Проверьте грамматику и орфографию,если есть ошибки исправьте.
Don't be frustrated by being stuck in your career. For heaven's sakes, do something about it. Today I'm gonna share five actionable steps for you to take control of your career and have astounding success. A step one is to identify and focus on your greatest strengths. Call them superpowers. Gosh, embrace them and own them and expand them.

There's magic in doing more of what you're already good at. Now, step two is to identify specific goals and outcomes. Visualize your future roles and what it will take to succeed in those. When you start focusing on it, it starts coming to you that way. Now, step three is to assess the specific skills you're gonna need to succeed in that role.

Watch leaders that are already in those roles, people that are already succeeding in roles that you want to be in. Watch and see what they do and what they don't do. Ask yourself, what would I do if I was in their position? Remember these things cuz there are guides for you on how to do the job. Step four, this is where you can seek a mentor for help.

This is where you collectively build a strategic plan and outline the journey you're gonna take from where you are today to where you want to be. Step five is then to take calculated risks. Ask yourself, where can you be of more, most use to the company? What problems can you solve? Some people take cherry assignments and it's hard to know whether they were the suc, the reason for the success, or was it the job?

Choose the biggest problem the company has, and you solve that problem. You'll become the go-to person for the leaders in that company. Follow me for more advice like this.