Question: 1 . In this lab, you will try the logic exercises in Python. Firstly , take (copy/paste) each of these logic problems and write/type what

1. In this lab, you will try the logic exercises in Python.

Firstly, take (copy/paste) each of these logic problems and write/type what you think the answer will. In each case it will be either True or False.

Secondly, once you have the answers written down, you will start Python in IDLE Shell (no need a new .py file) and type each logic problem in to confirm your answers.

True and True

False and True

1 == 1 and 2 == 1

"test" == "test"

1 == 1 or 2 != 1

True and 1 == 1

False and 0 != 0

True or 1 == 1

"test" == "testing"

1 != 0 and 2 == 1

"test" != "testing"

"test" == 1

not (True and False)

not (1 == 1 and 0 != 1)

not (10 == 1 or 1000 == 1000)

not (1 != 10 or 3 == 4)

not ("testing" == "testing" and "Zed" == "Cool Guy")

1 == 1 and (not ("testing" == 1 or 1 == 0))

"chunky" == "bacon" and (not (3 == 4 or 3 == 3))

3 == 3 and (not ("testing" == "testing" or "Python" == "Fun"))

2. With the same .txt file from last step, copy/paste all running result with IDLE shell information.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!