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

На фото є умова задачі. Потрібно розробити програму у Python, при розв'язуванні якої буде видавати "True" або "False".
Тема: алгебра логіки

Приложения:

Ответы

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

Ответ:

def f(x, y, z):

return x*y + y*z + x*z >= 2

for x in [0, 1]:

for y in [0, 1]:

for z in [0, 1]:

print(f"{x} {y} {z}:", f(x, y, z))

Результатом роботи програми буде список усіх можливих комбінацій значень x, y, z та їх значення функції f(x, y, z) для кожної комбінації. Вивід у консоль буде виглядати так:

0 0 0: False

0 0 1: False

0 1 0: False

0 1 1: True

1 0 0: False

1 0 1: True

1 1 0: False

1 1 1: True

Таким чином, ми можемо побачити, що для значень аргументів x=0, y=1, z=1, функція f(x, y, z) поверне значення True, а для всіх інших комбінацій - False.

Похожие вопросы
Предмет: Алгебра, автор: legendachmo
Предмет: Английский язык, автор: dariazastava2007
ПОМОГИТЕ СРОЧНООООО!!!!!
Grammar

С Choose the correct item.

1 Is there /enough/ salt in your soup?
A too B much C enough

2 There /is too much/ cereal in the bowl.
A too many B too much C any

3 Do you spend much money on … out?
A go B going C to go

4 The meat dish is … spicy. I don’t like it much.
A too B so C enough

5 Unfortunately, I forgot … the window and now it is raining!
A close B closing C to close

6 Let’s stop … lunch in this restaurant.
A have B having C to have

7 Are there … potatoes left in the fridge?
A some B any C no

8 There is … juice in the glass.
A some B any C a

9 There … not much sugar in the sugar basin.
A are B is C any

10 Have ever been to … Canada?
A a B the C -

11 … is that woman over there?
A what B who C which

12 Can you see … man in blue at the entrance of the hotel?
A a B the C -

13 Somebody is calling. I … pick up the phone.
A shall B will C may

14 London is a nice city … you can see a lot of sights.
A what B who C where

15 If I …, I would like to have a holiday now.
A could B can C would

16 If I were you, I … recommend to accept his invitation.
A would B will C did

17 If he … supper he wouldn’t have been hungry.
A had had B had C has had

18 Our neighbours … next week.
A are moving B will move C are going to move

19 When … you … him tomorrow?
A will … see B are … seeing C do … come

20 When … you … home last night?
A did come B did went C had come
Предмет: Биология, автор: woodpeop