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
GuDViN [60]
4 years ago
13

In your own words, explain at least one reason why programming languages have functions.

Computers and Technology
1 answer:
Nataly [62]4 years ago
5 0
Programming languages have functions because, they are the set of operations that may be applied to objects of that particular class.
for an example I will attach a function, you just check it

brainliest pls

You might be interested in
3.6 Code Practice Edhesive. (PYTHON LANGUAGE)
Aleks [24]

i = 0

lst = ([])

while i < 6:

   lst.append(int(input("Enter a number: ")))

   print("Largest: "+str(max(lst)))

   i+= 1

This works for me. Best of luck.

5 0
3 years ago
The Speed of Sound (Java Project. Please make it easy to understand. I'm a beginner at this. I believe we are supposed to use a
Ilya [14]

Answer:

The program of this question can be given as:

Program:

//import pacakge for user input.

import java.util.Scanner;

//define class  

public class SpeedofSound              

{

  public static void main(String a[]) //define main function

  {  

      //define variable.

      String medium;                            

      double distance,time=0;

      //creating Scanner class object for input from user.

      Scanner s=new Scanner(System.in);  

      //print message.

      System.out.printf("Enter medium(air,water or steel) : ");

      medium=s.nextLine();  //taking input.

      //print message.

      System.out.printf("Enter the distance that the sound will travel : ");

      distance=s.nextDouble(); //taking input.

      switch(medium) //checking condtion between range.

      {

          case "air":

                  time=distance/1100;         //apply formula

                  break;

          case "water":

                  time=distance/4900;            //apply formula

                  break;

          case "steel":

                  time=distance/16400;            //apply formula

                  break;

          default:

                  System.out.printf("Sorry, you must enter air,water or steel"); //error for invalid input of medium

                  System.exit(0);

      }

      System.out.printf("It take "+time+" seconds"); //print final answer.

  }

}

Output:

Enter medium(air,water or steel) : air

Enter the distance that the sound will travel : 200

It take 0.18181818181818182 seconds

Explanation:

In this program first, we import packages for user input. Then we declare the class in the class we declare all the variables and then we create the scanner class object. It is used for taking input from the user. Then we use the switch statement It is used for condition. It works between the ranges. In the switch statement, we apply all the formula that is given in the question. and at the last, we print the output using printf function in java.

6 0
4 years ago
Intellectual property rights protect people’s and organization’s ideas and other intellectual assets. However, in certain cases,
Katarina [22]

Answer:

negative effect

Explanation:

its right on edg

8 0
3 years ago
Advantage of social media for today'​
Lyrx [107]

Answer:

This social media advantage helps your business in numerous ways: You get to know them better: When you know your audience better, you can deliver more valuable content to them. ... You provide better customer service: A direct connection with your audience allows you to resolve issues easier

Explanation:

(happy to help)

6 0
3 years ago
Write a program which takes a string input, converts it to lower case, then prints the same string with all vowels (a, e, i, o,
kondor19780726 [428]

import java.util.Scanner;

public class JavaApplication66 {

   

   public static void main(String[] args) {

       Scanner scan = new Scanner(System.in);

       System.out.println("Enter String:");

       String vowels = "aeiou";

       String text = scan.nextLine();

       text = text.toLowerCase();

       String newText = "";

       

       for (int i = 0; i < text.length(); i++){

           char c = text.charAt(i);

           if (vowels.indexOf(c) == -1){

               newText += c;

           }

       }

       System.out.println(newText);

   }

   

}

This works for me. Best of luck.

8 0
3 years ago
Read 2 more answers
Other questions:
  • Which of the following has the responsibility of offering instruction on intrusion detection systems and intrusion prevention sy
    11·1 answer
  • Why is the DNS service included in Windows Server 2012 R2 integrated with DHCP service?
    6·1 answer
  • A word that has a specific, predefined meaning in a programming language is called
    8·1 answer
  • For questions 1 – 3, use the following partial class definitions:
    11·1 answer
  • Which of the following is not a characteristic of a motorcycle?
    6·1 answer
  • Write a program that gets a list of integers from input, and outputs the integers in ascending order (lowest to highest). The fi
    5·1 answer
  • Which of the following behaviors does not harm a company if your employment is terminated?
    9·1 answer
  • What are the objects in object-oriented programming language?
    8·1 answer
  • Help! What is this graph and what does it represent?
    12·1 answer
  • you are sitting in a coffee shop with your laptop computer and have connected to the internet through an unrestricted wi-fi conn
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!