Answered step by step
Verified Expert Solution
Question
1 Approved Answer
def nandTable(): print('+{}+'.format('-' * 33)) print('|{:^33}|'.format('NAND truth table')) print('+{}+'.format('-' * 33)) a, b = 'F', 'F' print('| A = {}, B = {} | A
def nandTable(): print('+{}+'.format('-' * 33)) print('|{:^33}|'.format('NAND truth table')) print('+{}+'.format('-' * 33)) a, b = 'F', 'F' print('| A = {}, B = {} | A NAND B = {:<5} |'.format(a, b, str(not (a == 'T' and b == 'T')))) a, b = 'F', 'T' print('| A = {}, B = {} | A NAND B = {:<5} |'.format(a, b, str(not (a == 'T' and b == 'T')))) a, b = 'T', 'F' print('| A = {}, B = {} | A NAND B = {:<5} |'.format(a, b, str(not (a == 'T' and b == 'T')))) a, b = 'T', 'T' print('| A = {}, B = {} | A NAND B = {:<5} |'.format(a, b, str(not (a == 'T' and b == 'T')))) print('-' * 35) nandTable()
explain every single step and function of this code
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access with AI-Powered Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started