1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
amid [387]
3 years ago
13

Write an expression that will cause the following code to print "I am a teenager" if the value of userAge is less than 20. Zyboo

ks won't let me edit any other line, and UserAge > 20 was marked wrong. It won't accept the ≥ symbol either.

Computers and Technology
1 answer:
VikaD [51]3 years ago
6 0

Answer:

Replace

if userAge > 20

with

userAge > 19

Explanation:

if userAge > 20  checks if age is 21, 22, 23, 24........

The else condition which prints "I am a teenager" checks if age is 20, 19, 18....

Notice that 20 is inclusive of the else condition; this shouldn't be because for userAge to be less than 20, 20 isn't inclusive

To solve this,

Replace if userAge > 20 with userAge > 19

So that, the else

The else condition which prints "I am a teenager" checks if age is 19, 18, 17, 16....

You might be interested in
________ results when leisure time and available tools allow us to engage in creative acts.
natta225 [31]
Cognitive surplus results when leisure time and available tools allow us to engage in creative acts. It is a term that was introduced by Clay Shirky which pertains to the synthesis of the excess of people's energy, time and creativity leading to productivity sharing and creation.
4 0
3 years ago
Which is a connectionless protocol in the transport layer? What are the small chunks of data called?
xeze [42]

Answer:

User Datagram Protocol (UDP) , transport-layer segment.

Explanation:

The User Datagram Protocol is popularly known as UDP. It is defined as the communication protocol which is used across the internet for any time sensitive transmission like the DNS lookup or the video playback.

The UDP provides a unreliable and connectionless service to a invoking application.

The transport layers on sending side converts the application $\text{layer }$ messages which it $\text{receives}$ from the $\text{sending application process}$ into a transport layer segment called as the transport layer segments. This is achieved by breaking down the application messages into a smaller chunks and then adding the transport layer header into each chunk so as to create a transport layer segment.

6 0
3 years ago
Read 2 more answers
To format a picture to look like a sketch or a painting you can add a(an)
Arisa [49]

Answer:

C(reflection effect)

Explanation:

reflection effect

8 0
2 years ago
What is the instruction phase of the central processing unit​
belka [17]

Answer:

The instruction cycle (also known as the fetch–decode–execute cycle, or simply the fetch-execute cycle) is the cycle that the central processing unit (CPU) follows from boot-up until the computer has shut down in order to process instructions.

7 0
2 years ago
Long distances are usually measured in kilometers.<br> T or F?
timama [110]
Depending where you are in the world it is true and false
7 0
3 years ago
Other questions:
  • What is the recommended solution to configure this automated behavior? UC has a requirement that an opportunity should have a fi
    8·1 answer
  • How does LinkedIn differ from other popular social media platforms? What are the similarities?
    6·1 answer
  • You’ve been stuck in bumper-to-bumper traffic for nearly an hour on a hot summer day. The temperature warning light has just com
    7·1 answer
  • Every brand of computer has its own binary language, called
    14·1 answer
  • When you save a file for the first time, you must ____.
    15·2 answers
  • To open a Google Doc in another software application, the user must first download it. True or false?
    12·2 answers
  • What is the missing line of code?
    7·1 answer
  • Learning Management Systems (LMS) allow students to interact with each other, but NOT their teachers.
    10·2 answers
  • Why is it important to think about the programming language to use?
    6·1 answer
  • write a function that given an integer n returns the smallest integer greater than n the sume of whose digits is twice as big th
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!