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
xenn [34]
3 years ago
5

A restaurant recorded the ages of customers on two separate days. You are going to write a program to compare the number of cust

omers in their twenties (ages 20 to 29). What is the missing line of code to count the number of customers in their twenties? customerAges = [13, 3, 11, 24, 35, 25, 15, 18, 1] count20s = 0 if 20 <= item <= 29: count20s = count20s + 1
Computers and Technology
1 answer:
nikklg [1K]3 years ago
4 0

Answer:

You will need to implement a for loop ( I am assuming this is java)

Explanation:

int count20s = 0;

for(int x =0; x< customerAges.length;x++){

if(20 <= customerAges[x] && customerAges[x] <= 29){

     count20s++;

}

You might be interested in
Which of these is not one of the main parts of an email?
pav-90 [236]
The header is not a main part of the email. 
3 0
2 years ago
Read 2 more answers
What data type or you use to represent true or false values?
vfiekz [6]
The Boolean type is used to represent true or false values
3 0
2 years ago
Differences between barcode reader and character recognition devices​
spin [16.1K]

<u><em>Differences between barcode reader and character recognition devices​:</em></u>

Barcode Reader or Barcode Scanner:  

  • Barcode Scanner scans the data by brightening the barcodes usingSensor
  • The analog signal is then converted into digital signal by Converter.
  • The Decoder calculates the converted data and sends valid data to the computer.  

Character Recognition Devices (OCR):

  • OCR scans the physical document and converts them into two-coloured format.
  • The darker and lighter area are identified as characters and blanks respectively.
  • The common methods used are: Pattern Recognition and Feature Detection.

3 0
3 years ago
Read 2 more answers
Why might a variable used for output have to be of a different type then a variable used for input?​
telo118 [61]

Answer:

You may use a different variable type for input in order to process the data appropriately and may use a different variable type to accommodate your program.

Explanation:

Your input may have to be different then output varying on what data you are processing.

For example, just like the last question you asked about calculating the area of the rectangle, your input MUST be converted to a different a numerical data type (i.e int or float) in order to do the math.

Based on your last question, if we didn't convert your input into a string your results wouldn't add the numbers together but only concatenate them. If I typed 3 & 5 as length & width, I would get 35 instead of 15.

Now another example is using functions (or methods whatever you want to call them), your input can be one thing and outputs another.

Let's say I want a function to tell me if I am smart. The way I want it to determine if its smart is by inputting my GPA into it, which is a numerical value. So the function would look something like this:

<u>Code (Python)</u>

def IsSmart(gpa):

  if (gpa >= 4):

       return True

  else

       return False

As you can see I am inputting a numerical value and it is outputting a boolean value. I can use this in a if else chain to spit out an output to the user.

7 0
3 years ago
PLEASE HELP!
ss7ja [257]

Explanation:

Case-sensitivity is inherently faster to parse (albeit only slightly) since it can compare character sequences directly without having to figure out which characters are equivalent to each other. It allows the implementer of a class/library to control how casing is used in the code.

3 0
2 years ago
Other questions:
  • Tracy has a file that contains a list of actors and the movies in which they acted. She wants to know the top 3 ranked actors fr
    10·1 answer
  • SI TENGO: ¿R = 255, G0 =, B = 0, QUE COLOR OBTENGO?
    14·1 answer
  • What may happen if a large number of computer users are attempting to access a web site at the same time that you are
    9·2 answers
  • Which of the following attacks seeks to introduce erroneous or malicious entries into a server's hostname-to-IP address cache or
    5·1 answer
  • Match the limits of the user with an appropriate design response. 1. severe arthritis, unable to type or use a mouse on a reliab
    11·1 answer
  • The site is not allowing me to purchase the subscription. Please help?
    12·1 answer
  • According to the government, employees have a right to understand the risks associated with the materials they work with.
    15·1 answer
  • Which expression is equivalent to 3x + 3x + 3x?<br><br> From Performance Matters
    11·2 answers
  • Code: ckg-jbqp-hki<br>only girls join❤️​
    11·2 answers
  • You are starting a small web hosting business and
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!