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
Licemer1 [7]
2 years ago
7

// In this exercise, you will be given a variable, it will be called: value

Computers and Technology
1 answer:
rjkz [21]2 years ago
8 0

Answer:

import java.util.Scanner;

public class Solution {

   public static void main(String args[]) {      

     Scanner scan = new Scanner(System.in);

     System.out.println("Enter your value");

     int value = scan.nextInt();      

     greaterThanFive(value);

   }  

   public static void greaterThanFive(int userInput){

       System.out.println(userInput > 5);

   }

}

Explanation:

The first line import the Scanner which is use to enable to accept user input.

The class is defined as Solution in the next line. The main method is declared in the next line which signify the beginning of the program.

Then, a scanner object is declared called scan in the next line. Then a prompt is display to the user to input a value. The user input is stored in the variable value. The value is then passed to the method greaterThanFive.

The method greaterThanFive is declared and have just one parameter, the userInput. Inside the method, we output if the userInput is greater than 5 using the logical operator (>).

You might be interested in
Digital learning can help students who enjoy
mr Goodwill [35]

Answer:

flexibility and independence

Explanation:

6 0
2 years ago
Have you ever watched Full House? Who is your favorite character and why? EXPLAIN AND ILL GIVE BRAINLIEST!
liubo4ka [24]

Answer:

havent watched it and thanks for this

Explanation:

7 0
2 years ago
When a switch is closed, completing an lr series circuit, the time needed for the current to reach one half its maximum value is
uysha [10]
The answer is <span>0.693 .  </span><span>When a switch is closed, completing an LR series circuit, the time needed for the current to reach one half its maximum value is 0.693   

</span>e^(-t/T) = 0.5 
<span>-t/T = ln(0.5) = -0.693 </span>
7 0
2 years ago
Three PCs are on an Ethernet LAN, connected by a hub. Describe how the Ethernet protocol deals with collisions in this situation
sdas [7]

Answer:

All the ports in a hub are in the same collision domain and a hub sends frames from one host to all other hosts in the network. This makes it prone to collision and poor network throughput. Just like a network switch, it uses the CSMA/CD protocol to detect collision in its network.

A network switch reduces its collision domain to just a port and sends frames from one host to another using its mac table as a route. This makes the network very efficient with high throughput. It also uses the CSMA/CD protocol to detect collision

Explanation:

Switches and hubs are used in networking to connect computer devices in a network. A hub is an obsolete device networking that broadcast a frame to all other ports or host in the network except for the send host port. This increases the rate of collision as all the ports in a hub share the same collision domain. A switch is an efficient frame switching device in a network, which uses its MAC table to decide and find a destination host.

CSMA/CD is a collision detection protocol used in a network to detect and prevent a collision. With this protocol, a host is able to listen, wait, send and resend frames to prevent a collision.

3 0
3 years ago
Write a function (named n_pointed_star) to make the turtle draw an n-pointed star. The function should return nothing, and accep
Andreyy89

Answer:

import sys

import turtle

import random

def n_pointed_star(total_points):

if total_points <= 4:

 raise ValueError('Not enough total_points')

area = 150

for coprime in range(total_points//2, 1, -1):

 if greatest_common_divisor(total_points, coprime) == 1:

  start = turtle.position()

  for _ in range(total_points):

   turtle.forward(area)

   turtle.left(360.0 / total_points * coprime)

  turtle.setposition(start)

  return

def greatest_common_divisor(a, b):

while b != 0:

 a, b = b, a % b

return a

   

turtle.reset()

n_pointed_star(5)

Explanation:

  • Inside the n_pointed_star function, check whether the total no. of points are less than or equal to 4 and then throw an exception.
  • Loop through the total_points variable and check whether the result  from greatest_common_divisor is equal to 1 or not and then set the starting position of turtle and move it.
  • Create the greatest_common_divisor which takes two parameters a and b to find the GCD.
  • Finally reset the turtle and call the n_pointed_star function.
8 0
3 years ago
Other questions:
  • Kevin wants an application that will help him create a website as well as publish it. What application can he use?
    9·1 answer
  • Steven is in a meeting and he is sharing a graph on his monitor with fifty other people. So that the others do not need to crowd
    9·1 answer
  • When did internet came to existence?
    12·1 answer
  • Consider the classes below, declared in the same file: class A { int a; public A() { ​ a = 7; } } class B extends A { int b; pub
    6·1 answer
  • They begin beating it with a hose to find out what it really means. How does the figurative language in this excerpt reveal Coll
    9·2 answers
  • Programmers insert documentation called facts into the program code.? <br> a. True <br> b. False
    9·1 answer
  • You need to install an operating system on a computer that will be sharing files for the company employees. You estimate there w
    9·1 answer
  • You are installing several servers that will be used as web servers to reach customers over the Internet. Where should you place
    14·1 answer
  • To ensure that comments identify the initials of the person making changes, you would need to _____.
    5·2 answers
  • WHY DO YOU DElete EVERY QUESTIONS THAT IS ASKED! Im a freaking guy, yes and i wont followers for my channel so leave me alone!
    7·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!