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

Написать программу для ввода значения величины X целого типа, присваивания величине Y действительного типа значения 2.5 , вычисления значения величины Z=X/Y и вывода значения величины Z. Протестировать программу для X=5, X=0, X=-8.75

на языке питон

Ответы

Автор ответа: badnsnus
0

Ответ:

для x = 5, z = 2.0

для х  = 0, z = 0.0

для х = -8.75, программа выдает ошибку, так как х должен быть целым числом

Решение:

x = int(input())

y = 2.5

z = x / y

print(z)

Похожие вопросы
Предмет: Английский язык, автор: вннера
Предмет: Українська мова, автор: вадимврлд
Предмет: Английский язык, автор: Zazaaaa
Нужна помощь с английским (решение, а не перевод)
1. Give the plural of the following-nouns: leaf, mouse, sheep, piano, child, country, goose, lady, man, tooth, woman, gooseberry, crisis, medium, deer, knowledge, fish, dish, news, wife, hero, glass, wolf
2. Read the following nouns first in the singular and then in the plural:
1. bag, dog, bird, verb, pan, hen, spoon, noun, room, ring, thing, evening, song, girl, apple, table, article;
2. tree, pie, cow, fly, lady, baby, teacher, letter, mirror, berry, play, toy, city;
3. cake, snake, fork, map, lamp, hat, clock, rat, coat, goat, skirt, shirt, plant, jacket, object, attribute;
4. shelf, leaf, knife, wife, roof, chief, handkerchief;
5. bus, class, glass, dress, piece, slice, horse, house, rose, nose, blouse, box, fox, match, bench, bridge, cage, cottage, bush;
6. man, woman, child, foot, tooth, goose, mouse, ox, fish, trout, fruit, swine, mouse, louse, deer, sheep;
7. phenomenon, crisis, stimulus, formula, axis, thesis, criterion.

3. Give the plural form of the words underlined. Pattern: I met a man at the meeting last night. I met some men at the meeting last night.
1. I saw (a mouse) running across the floor.
2. The baby got a new (tooth).
3. I need (a match).
4. He cooked (a potato) for dinner.

5. The professor is reading( a thesis₽.

6. I visited (a city) in the Ukraine.

7. She photographed (a leaf).

8. I caught (a fish₽.

9. I saw (a sheep) in the farmyard.

10. She talked to (a child).

11. The children hid behind (the bush).

12. In science class we studied about (a species) of fish.

13. When I was in the park yesterday, I saw (a goose).

14. When we spoke in the cave, we heard (an echo).

15. He packed (a box).

16. Every day I read in the newspaper about (a new crisis) in the world.

17. The wagon is being pulled by (an ox).

18. I told the children a fable about (a wolf) and (a fox₽.

19. We read a story about (an Indian chief).

20. At the meeting last night, we were listening to (a speech).

21. In science class, we studied (a phenomenon) of nature.