Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Essentials of Database Management

Authors: Jeffrey A. Hoffer, Heikki Topi, Ramesh Venkataraman

1st edition

133405680, 9780133547702 , 978-0133405682

More Books

Students also viewed these Databases questions