Assume we have a boolean variable x. We want to make an if statement that will run if x is not True. Which of the following conditional statements would do this?

Both
if(x == False)
and
if(x != True)
will do this
  • if(x)
  • if(!x)
  • if(x == False)
  • if(x != True)
  • Both
    if(x)
    and
    if(!x)
    will do this

There are no hints for this question

Assume we have a integer variable "a". We want to make an if statement that will run if a is at least 10. Which of the following conditional statements would do this?

if(a>=10)
  • if(a>8)
  • if(a>10)
  • if(a<=10)
  • if(a<10) 
  • if(a>11)

There are no hints for this question

Assume we see an if statement that reads

if(!True)
. What would you know about this code?

The code inside this conditional would never run.
  • The code inside this conditional would always run.
  • I don't have enough information about the program to answer this question.
  • This code would cause your computer to restart.
  • if(!True)
    would produce a syntax error.
  • This code would compile, but would fail if you tried to run it.

There are no hints for this question