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
balandron [24]
3 years ago
5

Create a Divisible application that displays a random integer between 1 and 100 and displays appropriate messages stating whethe

r the integer is even or odd, if the integer is divisible by 2, and if the integer is divisible by 3 when the Generate Number button is clicked. The application interface should look similar to:
Computers and Technology
1 answer:
mrs_skeptik [129]3 years ago
3 0

Answer:

function myFunction() {

 myNumber = Math.floor(Math.random() * 100) + 1 ;

 var values = ["Number is even", "Number is odd"] ;

 var stringNum = " ";

 if (myNumber % 2 === 0){

     stringNum += values[0];

 } else {

     stringNum += values[1];

 document.getElementById("demo").innerHTML = stringNum;

}

Explanation:

The javascript source code is used by the browser to make the web application interactive, making a clickable event for the button to generate an H1 header for the web page.

The myFunction is assigned to an onclick event of a html button tag to display if a random number between 1 and 100 is even or odd.

You might be interested in
Which best describes a VPN?
aleksandr82 [10.1K]

A private connection through a private network

8 0
3 years ago
Read 2 more answers
Write a function called is_present that takes in two parameters: an integer and a list of integers (NOTE that the first paramete
Agata [3.3K]

Answer:

The function in python is as follows

def is_present(num,list):

    stat = False

    if num in list:

         stat = True

       

    return bool(stat)

Explanation:

This defines the function

def is_present(num,list):

This initializes a boolean variable to false

    stat = False

If the integer number is present in the list

    if num in list:

This boolean variable is updated to true

         stat = True

This returns true or false        

    return bool(stat)

7 0
3 years ago
Referring to the BST and BSTNode classes for binary search trees as done in class: Determine the result of executing root. whate
Rzqust [24]

Answer:

Try to add allthe numbers up

Explanation:

3 0
3 years ago
The first step in planning effective writing is to consider the _____
Amiraneli [1.4K]

Its the purpose, not the audience the other idiot that answered the question is mad wrong

8 0
4 years ago
If you have an application that is not responding and you want to force it to shut down, whichsystem utility can you use?
Romashka [77]
You can use D. Task Manager
3 0
3 years ago
Other questions:
  • What is being measured using kbps, mbps, and gbps?
    7·1 answer
  • You may declare an unlimited number of variables in a statement as long as the variables are ____.
    14·1 answer
  • The ____ allows a core to communicate with other cpu components, such as the memory controller and other cores
    14·1 answer
  • The entire presentation can be seen at a time in __________
    5·1 answer
  • Import simplegui
    10·1 answer
  • Please hurry
    15·2 answers
  • Hewo want to talk! #bored<br>Will randomly mark brainlest
    12·1 answer
  • Abby has received a request for a data set of actual data for testing a new app that is being developed. She does not want the s
    13·1 answer
  • Write a loop that reads positive integers from console input, printing out those values that are even, separating them with spac
    15·1 answer
  • In a database, what term is used to describe a group of fields that are all associated with and accessed using single primary ke
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!