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
Hitman42 [59]
3 years ago
13

Write an if-else statement that determines whether the points variable is outside the range of 9 to 51. If the variable’s value

is outside this range it should display "Invalid points." Otherwise, it should display "Valid points."
Computers and Technology
1 answer:
ivolga24 [154]3 years ago
6 0

Answer:

I am going to write the if-else statement using C++, python and JAVA

Explanation:

<h2>// C++ code:</h2>

int main() //enters body of program

{ int points;  //declare variable named points

   cout<<"enter a number"; //inputs a number from user

   cin>>points; //stores the input number in points variable

   if(points<9 || points>51)

//if condition checks if the number in points variable is in range of 9 to 51

   cout<<"invalid";

//if the number is less than 9 OR greater than 51 then it will display invalid

   else

   cout<<"valid";    }

// else number is in range of 9 to 51 and the output displayed is valid.

<h2>// JAVA code</h2>

import java.util.Scanner; //scanner is used to take the user input

public class Main{

public static void main(String[] args) {

   int points;

   Scanner sc = new Scanner(System.in);

       System.out.println("Enter a Number: "); //takes number from user

       points = sc.nextInt(); //number stored in the points variable

        sc.close();

if(points<9 | | points>51) //if condition to check the range

{System.out.println("invalid");}

//prints invalid when its out of range of 9 to 51

else

{System.out.println("valid");}}}

// prints valid if number in pointer variable is in the given range

<h2>#Python code</h2>

#takes input from user

userinput=input("enter a number")

#stores input number in points variable

points = int(userinput)

#checks if the range of input number is less than 9 or greater than 51

if points<9 or points>51:

#prints invalid if the number in pointers variable is out of range of 9 to 51

   print('invalid')

else:

   print('valid')

# prints valid if then points variable is in the range of 9 to 51

You might be interested in
DRU is a small brokerage house that enables its clients to buy and sell
Rudik [331]

The complete question rather reads;

DRU is a small brokerage house that enables its clients to buy and sell

stocks over the Internet, as well as place traditional orders by phone or Fax. DRU has just decided to install a new e-mail package. One vendor offering an SMTP-based two-tier client-server architecture. The second vendor is offering a Web-based e-mail architecture. DRU doesn't understand either one but thanks the Web-based one should be better because, in their words, "the Web is the future".

<u>(a) Briefly explain to DRU management, in layperson's terms, the difference between the two.</u>

<u>(b) Outline the pros and cons of the two alternatives and </u>

<u>(c) Recommend to DRU about which is better</u>

<u>Explanation:</u>

a) SMTP stands for Simple Mail Transfer Protocol. Thus, put simply an SMTP-based two-tier client-server architecture is a package that involves using a client-server provider like Outlook. This implies that Outlook provides the client with his own unique PO Box (server) so to speak.

While the Web-based e-mail architecture enables the DRU access to online mail platforms like G-mail with little server customisation features.

b. The Web-based e-mail architecture is good for personal email activities because of its ease of operation, however, it does not provide top security and customisation features. While an SMTP-based two-tier client-server architecture allows for unique server customisation with added security features as well be suitable for larger organisational work. Although a disadvantage is that it may cost more and quite a complex process to learn.

c) Since DRU is a growing firm the SMTP-based two-tier client-server architecture would be recommended as this would provide it will efficient customer service delivery.

6 0
3 years ago
Is an example of a relational database management system? (ORACLE ,SQL,JAVA,Python)
olganol [36]

Answer:

The correct answer for the given question is "ORACLE ".

Explanation:

ORACLE is an relational database management system oracle can store the interrelated data .Oracle database management system is used for online transaction etc .It is first company in Relational database management System.

SQL is an structural query language it is used to communicate with a database it is not relational database management system so this option is wrong.

Java and python are the programming language they are not relational database management system so this option is wrong.

So correct answer is "ORACLE "

6 0
3 years ago
Select the answer that best describes the ethical guideline followed in each scenario.
Montano1993 [528]
We need the scenario to solve this feel free to comment on this with your so scenarios and I will provide you with answers or just post another question
4 0
3 years ago
Why are the download speeds on my computer slower than usual
OLEGan [10]

Answer:

There may be other devices on your network within your household or a higher than normal amount outside of it.

Explanation:

The number of devices actively <em>using</em> your network can take up your bandwidth and reduce your download speeds. If you have devices downloading, gaming, or streaming it can cause this.

There also may be a large number of people using your internet provider at the same time, which will slow down the overall connection speed.

5 0
2 years ago
Where is the worlds biggest cookie​
rjkz [21]

I believe the cookie monster has it

3 0
3 years ago
Read 2 more answers
Other questions:
  • According to your textbook, the three major criteria against which to test documents that you locate on the Internet are authors
    8·1 answer
  • Which of the following is NOT a view which can be chosen for a presentation?
    15·1 answer
  • You want to drive traffic to a new landing page for a campaign, and want a web address that's short, easy to remember, trackable
    7·1 answer
  • Why are various creative works split up into different types under copyright law?
    9·1 answer
  • 2. 5s is a Chinese principle adapted for use in the workplace.<br>True or False​
    11·1 answer
  • If you were creating a program that would convert Fahrenheit to Celsius, which kind of variable would you want to use? a string
    7·2 answers
  • I need help solving this problem on Picoctf. The question is What happens if you have a small exponent? There is a twist though,
    7·1 answer
  • does anyone know the what the tuition fee is for UC Berkeley PER YEAR. My smooth brain can't find it ANYWHERE.
    10·2 answers
  • Is this really a American Server ???
    14·1 answer
  • We're given the training set data with the following values for variable X1:
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!