Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The question: My code: #4 #define function def logic_gate(a,b,c): #convert to boolean if a == 'FALSE': a = False if b == 'FALSE': b =

The question:

image text in transcribed

My code:

#4 #define function def logic_gate(a,b,c): #convert to boolean if a == 'FALSE': a = False if b == 'FALSE': b = False if c == 'FALSE': c = False #check logic gates if c == False or a == False or b == False: return True else: return False #get user input user_a = input('Enter A input: ') user_b = input('Enter B input: ') user_c = input('Enter C input: ') #call function print(logic_gate(user_a,user_b,user_c))

Problem: My teacher said "do not use any equals signs or ifs"

Can I please get the question in python form. Thank you

4) Write a python program that will take the user's inputs for the values of a, b, and c and produce the correct output of this logic gate. EXAMPLE: If the user inputs A= TRUE B=FALSE and C= TRUE, the output would print TRUE

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Modern Database Management

Authors: Jeff Hoffer, Ramesh Venkataraman, Heikki Topi

12th edition

133544613, 978-0133544619

More Books

Students also viewed these Databases questions