Ask Question
29 July, 00:51

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. 29 July, 01:31
    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?
Find 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 and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers