44.0k views
0 votes
To quit, a user types 'q'. To continue, a user types any other key. Which expression evaluates to true if a user should continue?key!= ′q'key==( ’ q ’) key == ’ q ’ (’key) == ’ q ’

User Bernita
by
7.8k points

1 Answer

6 votes

Answer:

The expression that evaluates to true if a user should continue is key!= 'q'. This is because it checks if the key variable is not equal to the string 'q', which means that the user did not type 'q' and wants to continue. The other expressions (key==( 'q' ), ( 'key ) == 'q') would evaluate to true only if the user had typed 'q'.

User Vivek Ayer
by
8.4k points

No related questions found