subject

The following two algorithms are designed to find the number of integers on a list which have a value greater than 5. Algorithm I: Create a variable count and set this to zero. For each value on the list, check whether it is greater than 5. If it is, then add 1 to the value of count. When the end of the list is reached display the value of count.
Algorithm II: Create a variable count and set this to the number of items on the list. For each value on the list, check whether it is smaller than 5. If it is, then subtract 1 from the value of count. When the end of the list is reached display the value of count.
Which of the following statements correctly demonstrates that the two algorithms are NOT equivalent?

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 02:30
Write a program that takes in 3 inputs [players (int type), expected game time (double type), team (char type)] and calculates actual game time (double) based on the following conditions: if the number of players or the expected game time is less than or equal to zero, it should output wrong input if the number of players is greater than 0 and less than or equal to 6 and if they are on the â€r’ or â€r’ team, their game time will be 10% faster. and if they are on the â€b’ or â€b’ team, their game time will be 15% faster. and if they are on the â€y’ or â€y’ team, their game time will be 20% faster. and if they are on any other team, they will play 0% faster. if the number of players is greater than 6 but less than or equal to 12 and if they are on the â€r’ or â€r’ team, their game time will be 20% faster. and if they are on the â€b’ or â€b’ team, their game time will be 25% faster. and if they are on the â€y’ or â€y’ team their game time will be 30% faster. and if they are on any other team, they will play 0% faster. if the number of players is greater than 12 but less than or equal to 18 and if they are on the â€r’ or â€r’ team, their game time will be 30% faster. and if they are on the â€b’ or â€b’ team, their game time will be 35% faster. and if they are on the â€y’ or â€y’ team, their game time will
Answers: 2
question
Computers and Technology, 22.06.2019 04:00
When you collaborate or meet with a person or group online, it is called
Answers: 1
question
Computers and Technology, 24.06.2019 10:50
In 2009 to 2010, how many social network users were reported as being victims of online abuse? a. 1 in 10 b. 100% c.1 in 100 d. 50%
Answers: 2
question
Computers and Technology, 24.06.2019 12:00
Which spreadsheet operation does a look function perform?
Answers: 1
You know the right answer?
The following two algorithms are designed to find the number of integers on a list which have a valu...
Questions
question
Mathematics, 21.04.2021 01:00
question
Mathematics, 21.04.2021 01:00
question
Mathematics, 21.04.2021 01:00
question
Mathematics, 21.04.2021 01:00
Questions on the website: 13722363