Ask Question
31 January, 06:35

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 ("/nIs car = = 'audi'? I predict False.") print (car = = 'audi')

+5
Answers (1)
  1. 31 January, 10:11
    0
    1)

    this:name='virat'

    print ("Is name = = 'virat'? I predict True.")

    print (car = = 'virat')

    print ("/nIs name = = 'Baber'? I predict False.")

    print (name = = 'Baber')

    2)

    this:Address='London'

    print ("Is address = = 'London'? I predict True.")

    print (address = = 'London')

    print ("/nIs address = = 'Surrey'? I predict False.")

    print (address = = 'Surrey')

    3)

    this:Gender='male'

    print ("Is Gender = = 'Female'? I predict True.")

    print (Gender = = 'Female')

    print ("/nIs Gender = = 'male'? I predict False.")

    print (Gender = = 'male')

    4)

    this:Serial Number='23'

    print ("Is Serial Number = = '24'? I predict True.")

    print (Serial Number = = '24')

    print ("/nIs Serial Number = = '23'? I predict False.")

    print (Serial Number = = '23')

    Explanation:

    Conditions 1st and 2nd test for name and Address

    Both conditions are true. Hence, true values are returned

    Conditions 3rd and 4th tests for gender and Serial Number

    Both conditions are false. Hence, false values are returned.
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “Conditional Tests: Write a series of conditional tests. Print a statement describing each test and your prediction for the results of each ...” in 📙 Computers & Technology if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers