We can use the common programming language features described in in the previous block of exercises to give a simple programming solution to Exercises 3.11–3.12. Assume that {p1, . . . , pn} are all Boolean variables in Python—that is, their values are all 0 or 1. Write a Python conditional expressing the condition that . . .
1 . . . at least 3 of {p1, . . . , pn} are true.
2 . . . at least n − 1 of {p1, . . . , pn} are true.
Exercises 3.11–3.12
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here