A community for students.
Here's the question you clicked on:
 0 viewing
happykiddo
 one year ago
Using Python:: Simplify the attached Boolean expressions. Please explain reasoning behind answers.
happykiddo
 one year ago
Using Python:: Simplify the attached Boolean expressions. Please explain reasoning behind answers.

This Question is Closed

rsmith6559
 one year ago
Best ResponseYou've already chosen the best response.0A and B can be simplified with an idiom that C (which is the language that Python is written in) uses. False is defined as 0, NULL, nil, C doesn't have a boolean type so integers are used. True is defined as not false, which in binary would be 1, but for numbers it means anything nonzero is true. C could use a complex conditional, testing both conditions and using a logical operator (and, or) in one line. b doesn't need to be declared first. D I don't know a simpler way to do that. These all would benefit from the ternary operator, but Python doesn't have that.
Ask your own question
Sign UpFind more explanations on OpenStudy
Your question is ready. Sign up for free to start getting answers.
spraguer
(Moderator)
5
→ View Detailed Profile
is replying to Can someone tell me what button the professor is hitting...
23
 Teamwork 19 Teammate
 Problem Solving 19 Hero
 Engagement 19 Mad Hatter
 You have blocked this person.
 ✔ You're a fan Checking fan status...
Thanks for being so helpful in mathematics. If you are getting quality help, make sure you spread the word about OpenStudy.