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

Дан программный код. 1 2 3 4 5 6 import math ch=int(input()) if ch>=0: |y=0.5*math.sqrt(math.fabs (ch)) elif ch​

Приложения:

mathgenius: 0. Кстати, писать постоянно обращаться к функции через имя модуля из которого она взята не практично. Легче один раз написать: from math import sqrt, fabs . Тогда можно обращаться к функции просто по имени: sqrt(x), abs(x). Неясно зачем некоторые так код оформляют.
karolachug08: Ну, я не знаю. Это просто урок на онлайн мектеп

Ответы

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

Ответ:

ответ: 0

Объяснение:


karolachug08: Спасибо
Vanello1908: поставь пж лучший ответ
Автор ответа: IERHON
1
Ответ:
Ответ ноль
Объяснение:
import math # импортируем модуль математики
ch=int(input) # ch это ноль
if ch >= 0: # ch равно нулю
y=0.5*math.sqrt(math.fabs(ch)) # половина корня нуля это корень ноль = 0
elif ch<0: y=math.fabs(ch+1) # это один но эта чать кода не будет вызываться
print(y) # вывести число что посчитали, это ноль

также ошибка, надо
elif ch<0:
y=math.fabs(ch+1)

mathgenius: c elif вовсе не ошибка. Такая форма записи допустима. Более того, можно так делать просто с if, но это удобно, когда строчка в теле условие ровно 1 и короткая.
IERHON: :~$ nano test.py
if True:
pass
else: print("a")

exit()
:~$ python3 test.py
:~$ rm test.py

а ну да. работает
IERHON: не знал
Интересные вопросы
Предмет: Английский язык, автор: sandroamiridze1
ОЧЕНЬ СРОЧНО !!!!!!!!!!!!!!!!!!!!!
1)Match the words in columns A and B and then use the collocations in their right forms to complete the sentences below.

A
1) achieved
2) benefit
3) captured
4) contribute
5) establish
6) record
7) tame
B
a) earthquake shocks
b) my interest
c) wild horses
d) a decorations committee
e) to your magazine
f) fame
g) the farmers’ crops

1. Marie and Pierre Curie ________________________ as scientists.
2. Rain will ________________________ as the soil is dry and the plants need water.
3. The film’s strange title ________________________ and I decided to watch it on Saturday.
4. It’s an honour to be invited to ________________________. I certainly accept the invitation.
5. The school authorities decided to ________________________ to prepare the gym for the school dance.
6. The recently bought seismograph can ________________________ even at such a distance.
7. They ________________________ at the ranch.
2)
Use the function words from the box and complete the sentences.
at on out up

1. Jim dropped his pen and bent to pick it _________.
2. Bullies often pick _________ younger children.
3. Try to eat your dinner, Jane. You’ve just been picking _________ it.
4. I don’t know where my children have picked _________ those rude words.
5. Albert was really shocked and picked _________ his words with difficulty.
6. I’ll pick you _________ at your place at 5.
3)Use a, the or the zero article before the noun man.
1. The ability of _____ man to talk is due to the way in which the larynx is made.
2. Larry was _____ handsome man in his early fifties.
3. I won’t see Dr Jackson again. I don’t like _____ man.
4. _____ modern man is responsible for a lot of disastrous events.
5. Lewis Clark, _____ tall thin man of about 30, entered the building at 8 o’clock.
ОЧЕНЬ СРОЧНО !!!!!!!!!!!!!!!!!!!!!