Question: 1.We check that the line is empty using a comparison to an empty string. What happens if there is a blank line but after that
1.We check that the line is empty using a comparison to an empty string. What happens if there is a blank line but after that there is another line with a number?
Why does this same error not occur even though we end up getting an emptry string as the last instance of line?
2. Do we always need to have user interaction in a while loop? Is it possible to update conditions without having the user do it?
3. Is there an advantage to using the "while True:" loop instead of the "while x<0:" loop? Are they suited to the same tasks?
4. Based on our Boolean algebra table, how does * relate to our operators? How does 1 relate to our Boolean state?
5. Write a condition check for A being positive and B being not-positive
Rewrite your expression using Not for at least one piece
Rewrite using Boolean algebra symbols instead of and
Try it out on the shell. Does it work?
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
