Return True if and are both True, ONLY Using 'not' and 'or'. This means you CANNOT use operators like ==, bool(), and *, +, etc.

Programming with Microsoft Visual Basic 2017
8th Edition
ISBN:9781337102124
Author:Diane Zak
Publisher:Diane Zak
Chapter4: The Selection Structure
Section: Chapter Questions
Problem 5MQ9
icon
Related questions
Question
You may only use 'not' and 'or' to solve this along with parentheses
Edef my_and (a: bool, b: bool) -> bool:
1
22
Return True if <a> and <b> are both True, ONLY Using 'not' and 'or'.
23
This means you CANNOT use operators like ==, bool(), and *, +, etc.
24
>>> my_and (True, False)
25
False
26
>>> my_and(True, True)
27
True
28
Transcribed Image Text:Edef my_and (a: bool, b: bool) -> bool: 1 22 Return True if <a> and <b> are both True, ONLY Using 'not' and 'or'. 23 This means you CANNOT use operators like ==, bool(), and *, +, etc. 24 >>> my_and (True, False) 25 False 26 >>> my_and(True, True) 27 True 28
Expert Solution
steps

Step by step

Solved in 4 steps with 2 images

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT