nolandh3640 nolandh3640
  • 22-06-2021
  • Computers and Technology
contestada

To quit, a user types 'q'. To continue, a user types any other key. Which expression evaluates to true if a user should continue

Respuesta :

sandlee09
sandlee09 sandlee09
  • 25-06-2021

Answer:

!(key == 'q')

Explanation:

Based on the description, the coded expression that would equate to this would be

!(key == 'q')

This piece of code basically states that "if key pressed is not equal to q", this is because the ! symbol represents "not" in programming. Meaning that whatever value the comparison outputs, it is swapped for the opposite. In this case, the user would press anything other than 'q' to continue, this would make the expression output False, but the ! operator makes it output True instead.

Answer Link

Otras preguntas

Which star do you think is the densest: Antares, Spica, or polares? Explain
.Factor 20x2 + 68x - 160
The statement, “I don’t know, and I don’t care what I’m supposed to do with my life” is what stage of identity? A. identity foreclosure C. identity diffusion B.
What are the characteristics of the graph of the inequality x < 4.5? The ray will move to the left. It will use a closed circle. It will use an open circle.
plzzzzzz help meeeee​
Please answer the question in the picture below
Explain how feedback control is used to adjust robotic movements.
What is 5.521 rounded to the nearest whole number?
Which is a vector? Displacement Distance Speed None
2) The management company of a popular, but unstable, rapper is worried about their investment in his up-coming world tour, so they purchase a 1-year $1 million