Question: 5-1. Conditional Tests: Write a series of conditional tests. Print a statement describing each test and your prediction for the results of each test. Your

5-1. Conditional Tests: Write a series of conditional tests. Print a statement describing each test and your prediction for the results of each test. Your code should look something like this:

car = 'subaru'

print("Is car == 'subaru'? I predict True.")

print(car == 'subaru')

print(" Is car == 'audi'? I predict False.")

print(car == 'audi')

Look closely at your results, and make sure you understand why each line evaluates to True or False.

Create at least 10 tests. Have at least 5 tests evaluate to True and another 5 tests evaluate to False.

5-2. More Conditional Tests: You dont have to limit the number of tests you create to 10. If you want to try more comparisons, write more tests and add them to conditional_tests.py. Have at least one True and one False result for each of the following:

Tests for equality and inequality with strings

Tests using the lower() function

Numerical tests involving equality and inequality, greater than and less than, greater than or equal to, and less than or equal to

Tests using the and keyword and the or keyword Test whether an item is in a list

Test whether an item is not in a list if Statements

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!