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
lbvjy [14]
4 years ago
14

The intended purpose of the following module is to determine whether the value parameter is within a specified range. The module

will not work, however. Find the problem. Module checkRange(Integer value, Integer lower, Integer upper) If value < lower AND value > upper Then Display "The value is outside the range." Else Display "The value is within the range." End If End Module Programming Exercises. Please find the problem with the Module. Thank you.
Computers and Technology
1 answer:
BARSIC [14]4 years ago
7 0

The program does not consists of any syntax error but the module contains error in logic especially while placing the condition inside if statement.

Here we are actually planning to check whether the number passed in the “value” variable is within the given lower and upper range which is passed in second and third parameter.

Solution 1:

if value<=lower AND value>=upper Then

Display “The given number is outside the specified range.”

else

Display “The given number is within the specified range.”

End if

Alternate solution:

So for that the condition needs to be value>=lower and value <=lower. so  

if value > lower AND value <upper Then

Display “The given number is within the specified range.”

else  

Display “The given number is within the specified range.”

You might be interested in
How do you make a 'does not equal' symbol on the computer? you know the equal sign with a line through it..?
Novay_Z [31]
In computer programming, most language use '=' only to assign a value (some use :=). Usually "==" is to compare equality. And "!=" is used for not equal. I checked UTF8 encoding and there's no equal with a line through it character.
5 0
3 years ago
What function would be used if you want to compare all other rows with the first row?
tester [92]

Answer:

B

Explanation:

the person at the very top said so :)

6 0
3 years ago
Online education provides _____.
galina1969 [7]

Answer:

Online Education provides greater accessibility for some students.

Explanation:

Online Education does not provide equality for all students, because the same issues that apply in the classrooms apply here. Greater accessibility for some students, because for those with access with the technology required it saves these students a long commute to school. Not everyone can be educated this way, some people just can't learn via this option. There is also isn't unlimited access to education, some things just can't be done digitally.

4 0
3 years ago
A palindrome is a string that reads the same from left to right and from right to left. Design an algorithm to find the minimum
stepladder [879]

Answer:

Explanation:

The following code is written in Python. It is a recursive function that tests the first and last character of the word and keeps checking to see if each change would create the palindrome. Finally, printing out the minimum number needed to create the palindrome.

import sys

def numOfSwitches(word, start, end):

   if (start > end):

       return sys.maxsize

   if (start == end):

       return 0

   if (start == end - 1):

       if (word[start] == word[end]):

           return 0

       else:

           return 1

   if (word[start] == word[end]):

       return numOfSwitches(word, start + 1, end - 1)

   else:

       return (min(numOfSwitches(word, start, end - 1),

                   numOfSwitches(word, start + 1, end)) + 1)

word = input("Enter a Word: ")

start = 0

end = len(word)-1

print("Number of switches required for palindrome: " + str(numOfSwitches(word, start, end)))

3 0
3 years ago
Is the process of modifying something to make it fit certain criteria.
alexandr402 [8]

Answer:

Design Process

8 0
3 years ago
Other questions:
  • Write the printitem() method for the base class. sample output for below program: last name: smith first and last name: bill jon
    6·2 answers
  • The number of bits used to store color information about each pixel is called ____.
    13·1 answer
  • Which document lists the planned dates for performing tasks and meeting goals identified in the project plan?
    15·1 answer
  • What should you keep in mind when typing a message on the Internet?use as many A.acronyms as it saves space
    7·1 answer
  • Which of the following is NOT a design choice when using the ER model?
    5·1 answer
  • What does the word "e-business" mean?
    11·2 answers
  • Create a simple self-checkout system. Prompt for the prices and quantities of three items. Calculate the subtotal of the items.
    15·1 answer
  • The first thing you should select if you're using an Address Block or Greeting Line is
    11·1 answer
  • Of the measures of feasibility in the accompanying figure, ____ considers points such as "Does the proposed platform have suffic
    8·1 answer
  • String objects are modified with string slices true or false
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!