Write a program named edit_data.py that asks a person their age. Accept an int. Use a custom exception to return a message if the number entered is an int that is less than 1 or greater than 115. Create an exception that catches an error if a non int is entered.

Answers

Answer 1
An exception is an error that happens during the execution of a program. Exceptions are known to non-programmers as instances that do not conform to a general rule. The name "exception" in computer science has this meaning as well: It implies that the problem (the exception) doesn't occur frequently, i.e. the exception is the "exception to the rule". Exception handling is a construct in some programming languages to handle or deal with errors automatically. Many programming languages like C++, Objective-C, PHP, Java, Ruby, Python, and many others have built-in support for exception handling.

Error handling is generally resolved by saving the state of execution at the moment the error occurred and interrupting the normal flow of the program to execute a special function or piece of code, which is known as the exception handler. Depending on the kind of error ("division by zero", "file open error" and so on) which had occurred, the error handler can "fix" the problem and the programm can be continued afterwards with the previously saved data.
Answer 2

An error that occurs while a program is being run is an exception. Non-programmers see exceptions as examples that do not follow a general rule.

What is the programming?


In computer science, the term "exception" also has the following connotation: It signifies that the issue is an uncommon occurrence; it is the "exception to the rule." Some programming languages use the mechanism known as exception handling to deal with problems automatically. Exception handling is built into several programming languages, including C++, Objective-C, PHP, Java, Ruby, Python, and many others.

In order to manage errors, programs often save the state of execution at the time the problem occurred and interrupt their usual operation to run an exception handler, which is a particular function or section of code. Depending on the type of error that had occurred, the error handler can "correct" the issue and the application can then continue using the previously saved data.

Thus, An error that occurs while a program is being run is an exception.

For more information about programming, click here:

https://brainly.com/question/11023419

#SPJ5


Related Questions

All of the following are technical solutions to protecting user privacy except: Group of answer choices Data use policies Anonymous email Preventing client computers from accepting cookies Email encryption Anonymous surfing

Answers

Answer:

Data use policies

Explanation:

Technically data use policies are not specifically made to protect user privacy, however it also should not violate user privacy. Data use policies are required by law. They are compulsory disclosures that list the various ways in which data in the form of personal data of individuals is collected, shared or used by digital companies(companies that operate on the internet, make use of email lists, etc ) are used.

A majority of the people whose information was compromised are homeless; therefore there is no easy way to contact them in order to alert them of the security breach. How should Data-Time Inc. manage this breach in security

Answers

Incomplete question. Here's the full question:

Data-Time Inc. is a company that manages databases for a large city in Colorado. Included in these databases is information collected from the city’s homeless shelters and free clinics. Specifically, the databases contain personal information of the users of these services over the past 10 years; this includes people’s Social Security numbers and health records.

This data is highly secure and only accessible to the employees of Data-Time Inc. Employees are given a laptop when they are hired which allows them to access the database remotely. Unfortunately, one of these laptops is stolen and the security of the database is compromised.

A majority of the people whose information was compromised are homeless; therefore there is no easy way to contact them in order to alert them of the security breach. How should Data-Time Inc. manage this breach in security?

Explanation:

Since the emphasis is not on reversing the breach that has occurred, but on managing the level of security damage that could occur, it is important measures are directed towards preventing unauthorized access to sensitive information.

For example, the Media Access Control Address (MAC address) of the laptop if known could be greylisted from accessing the server that contains the sensitive information.

Given an array of n distinct integers sorted in ascending order, write a function that returns a Fixed Point in the array, if there is any Fixed Point present in array, else returns -1. Fixed Point in an array is an index i such that arr[i] is equal to i. Note that integers in array can be negative. Examples: #include using namespace std; void removeDivByFive(int *arr,int& size) { int index=0; for(int i=0;i

Answers

Answer:

The function is as follows:

int returnsFixed(int arr [],int n){

   int retVal = -1;

   for(int i = 0; i<n;i++){

       if(i == arr[i]){

           retVal = i;

           break;

       }

   }

   return retVal;

}

Explanation:

This defines the functionl it receives the array and the length of the array

int returnsFixed(int arr [],int n){

This initializes the return value to -1

   int retVal = -1;

This iterates through the array

   for(int i = 0; i<n;i++){

This checks if i equals arr[i]

       if(i == arr[i]){

If yes, the return value (i.e. the fixed point) is set to i

           retVal = i;

And the code is exited

           break;

       } This ends the if condition

   } This ends the iteration

This returns the calculated fixed point

   return retVal;

}

Choose all that Apply: Which of the following steps should be performed by the CIS for creating a part dispatch for systemboard through Tech Direct?
a) Enter the customer's contact and email address into the primary contact fields when requesting a systemboard through TechDirect
b) Logging fusion ticket to request DPK via DDL
c) Access the customer's DDL account to retrieve DPK and activate the os for the customer
d) Verify the customer email address

Answers

Answer:

The steps that should be performed by the CIS for creating a part dispatch for system board through TechDirect are:

a) Enter the customer's contact and email address into the primary contact fields when requesting a system board through TechDirect

b) Logging fusion ticket to request DPK via DDL

c) Access the customer's DDL account to retrieve DPK and activate the os for the customer

d) Verify the customer email address

Explanation:

The four steps given above must be performed in the CIS if you want to create a part dispatch for the system board through TechDirect.  TechDirect is a support system that enables one to manage all Dell technologies from a single location. After creating the part dispatch, the customer's contact and email address are entered into the primary contact fields to enable the verification of the customer's email address  through the TechDirect.

View "The database tutorial for beginners" and discuss how database management systems are different from spreadsheets. Describe one experience you have had working with data.

Answers

Answer and Explanation:

A spreadsheet is an interactive computer application for the analysis and storage of data. The database is a collection of data and accessed from the computer system. This is the main difference between spreadsheets and databases. The spreadsheet is accessed by the user and the database is accessed by the user. The database can store more data than a spreadsheet. The spreadsheet is used for tasks and used in enterprises to store the data. Spreadsheet and database are two methods and the main difference is the computer application that helps to arrange, manage and calculate the data. The database is a collection of data and organized to access easily. Spreadsheet applications were the first spreadsheet on the mainframe. Database stores and manipulates the data easily. The database maintains the data and stores the records of teachers and courses. The spreadsheet is the computer application and analyzing the data in table form. The spreadsheet is a standard feature for productive suite and based on an accounting worksheet.

In the forward chaining technique, used by the inference engine component of an expert system, the _____ condition is evaluated first.

Answers

Answer:

"if" is the right response.

Explanation:

Forward chaining is being utilized just to split the logical sequential order down as well as operate throughout every component once the preceding one is accomplished, from start to finish.Its whole algorithm begins with proven information that activates all the rules, which are fulfilled as well as makes established realities even more complete.

Calculate how much disk space (in sectors, tracks, and surfaces) will be required to
store 300,000 120-byte logical records if the disk is fixed sector with 512 bytes/
sector, with 96 sectors/track, 110 tracks per surface, and 8 usable surfaces. Ignore
any file header record(s) and track indexes, and assume that records cannot span
two sectors.

It will be great if you could explain the answer to me. :)

Answers

Answer:

see your answer in image

mark me brainlist

The amount of disk space in sectors that would be required to store 300,000 records is equal to 75,000 sectors.

Given the following data:

Number of records = 300,000.Size of each logical record = 120 byte.Number of bytes (sector) = 512.Number of sectors per track = 96.Number of tracks per surface = 110.

How to calculate the required disk space?

First of all, we would determine the number of logical records that can be held by each sector as follows:

Number of logical records per sector = 512/120

Number of logical records per sector = 4.3 ≈ 4.0.

Now, we can calculate the required disk space to store 300,000 records:

Disk space = 300,000/4

Disk space = 75,000 sectors.

For the tracks, we have:

Disk space in tracks = 75,000/96

Disk space in tracks = 781.25 ≈ 782.

Disk space in tracks = 782 tracks.

For the surfaces, we have:

Disk space in surfaces = 782/110

Disk space in surfaces = 7.10 ≈ 8.

Disk space in surfaces = 8 surfaces.

Read more on disk space here: https://brainly.com/question/26382243

Code an operation class called ArrayComputing that will ask user to enter a serials of integers with a loop until -99 is entered and after the input it will keep and display the greatest, the least, the sum and the average of the data entries (-99 is not counted as the data). And code a driver class called ArrayComputingApp to run and test the ArrayComputing class, separately.
Must use required/meaningful names for fields, variables, methods and classes.
Must use separate methods to perform each of specified tasks as described.
Must document each of your source code

Answers

Answer:

Explanation:

The following is written in Java and creates the ArrayComputing class. It uses the constructor to create the infinite loop that only breaks when the user enters a -99. After every input number it goes adding the correct values to the variables. Once it is done the user can call any of the getter methods to get the variable values as well as calculate the average.

import java.util.Scanner;

class ArrayComputingApp {

   public static void main(String[] args) {

       ArrayComputing arrayComputing = new ArrayComputing();

       System.out.println("Average: " + arrayComputing.getAverage());

       System.out.println("Greatest: " + arrayComputing.getGreatest());

       System.out.println("Least: " + arrayComputing.getLeast());

       System.out.println("Sum: " + arrayComputing.getSum());

   }

}

class ArrayComputing {

   int greatest, least, sum, average;

   int count = 0;

   Scanner in = new Scanner(System.in);

   public ArrayComputing() {

       while (true) {

           System.out.println("Enter a number or -99 to exit: ");

           int num = in.nextInt();

           if (num == -99) {

               break;

           }

           if (num > this.greatest) {

               this.greatest = num;

           }

           if (this.count == 0) {

               this.least = num;

           } else {

               if (num < this.least) {

                   this.least = num;

               }

           }

           this.sum += num;

           this.count += 1;

       }

   }

   public int getAverage() {

       this.average = sum / count;

       return this.average;

   }

   public int getGreatest() {

       return greatest;

   }

   public int getLeast() {

       return least;

   }

   public int getSum() {

       return sum;

   }

}

Select the true statement about network protocols.
A. Communication cannot take place unless the protocol is executed in the same way on all devices.
B. One function of a protocol is to decompress data when it is delivered to the receiving computer.
C. Using a protocol other than TCP/IP can result in data loss.
D. Computers that are distributed across a large geographic area need a special protocol to resolve errors.

Answers

The statement that is true about network protocols is that:

Using a protocol other than TCP/IP can result in data loss.

What are network protocols?

A network protocol is a system of principles that governs how data is delivered between devices on the same network.

Primarily, it enables linked devices to interact with one another despite variations in internal operations, architecture, or design.

The way this is done is true the use of Transmission-control protocol/Internet protocol (TCP/IP).

TCP/IP is the primary protocol or communication language of the Internet. Therefore, using a protocol other than TCP/IP can result in data loss.

Learn more about network protocol here:

https://brainly.com/question/17820678

Java !!!
A common problem in parsing computer languages and compiler implementations is determining if an input string is balanced. That is, a string can be considered balanced if for every opening element ( (, [, <, etc) there is a corresponding closing element ( ), ], >, etc).
Today, we’re interested in writing a method that will determine if a String is balanced. Write a method, isBalanced(String s) that returns true if every opening element is matched by a closing element of exactly the same type. Extra opening elements, or extra closing elements, result in an unbalanced string. For this problem, we are only interested in three sets of characters -- {, (, and [ (and their closing equivalents, }, ), and ]). Other characters, such as <, can be skipped. Extra characters (letters, numbers, other symbols) should all be skipped. Additionally, the ordering of each closing element must match the ordering of each opening element. This is illustrated by examples below.
The following examples illustrate the expected behaviour:
is Balanced ("{{mustache templates use double curly braces}}") should return true
is Balanced("{{but here we have our template wrong!}") should return false
is Balanced("{ ( ( some text ) ) }") should return true
is Balanced("{ ( ( some text ) } )") should return false (note that the ordering of the last two elements is wrong)
Write an implementation that uses one or more Stacks to solve this problem. As a client of the Stack class, you are not concerned with how it works directly, just that it does work.

Answers

Answer:

Explanation:

import java.util.*;

public class BalancedBrackets {

// function to check if brackets are balanced

static boolean isBalanced(String expr)

{

Stack<Character> stack = new Stack<Character>();

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

{

char x = expr.charAt(i);

if (x == '(' || x == '[' || x == '{')

{

// Push the element in the stack

stack.push(x);

continue;

}

if (stack.isEmpty())

return false;

char check;

switch (x) {

case ')':

check = stack.pop();

if (check == '{' || check == '[')

return false;

break;

case '}':

check = stack.pop();

if (check == '(' || check == '[')

return false;

break;

case ']':

check = stack.pop();

if (check == '(' || check == '{')

return false;

break;

}

}

// Check Empty Stack

return (stack.isEmpty());

}

public static void main(String[] args)

{

Scanner scan = new Scanner(System.in);

System.out.println("\nEnter the expression to check is balanced or not !");

String expr = scan.nextLine();

boolean output;

output = isBalanced(expr);

System.out.println(output);

if (output)

System.out.println("Balanced ");

else

System.out.println("Not Balanced ");

scan.close();

}

}

A technician is configuring the static TCP/IP settings on a client computer.
Which of the following configurations are needed for internet communications?
a. DHCP server address
b. DNS server address
c. Default gateway address
d. WINS address
e. APIPA address
f. Alternate IP address
g. IP address including a subnet mask (IPv4) or subnet prefix length (IPv6)

Answers

Answer:

The answer is below

Explanation:

Considering the situation and the available options above, the following configurations are needed for internet communications:

B. DNS server address: this matches the domain name to the IP address of a website such that browsers can bring internet resources.

C. Default gateway address: this uses the internet protocol suites and serves as a router to other networks in the absence of other route specifications that could match the destination IP address of a packet.

G. IP address including a subnet mask (IPv4) or subnet prefix length (IPv6): this is used by the internet-connected device to receive messages.

In the file BankAccount.java, build a class called BankAccount that manages checking and savings accounts. The class has three private member fields: a customer name (String), the customer's savings account balance (double), and the customer's checking account balance (double).
Implement the following Constructor and instance methods as listed below:
public BankAccount(String newName, double amt1, double amt2) - set the customer name to parameter newName, set the checking account balance to parameter amt1 and set the savings account balance to parameter amt2. (amt stands for amount)
public void setName(String newName) - set the customer name
public String getName() - return the customer name
public void setChecking(double amt) - set the checking account balance to parameter amt
public double getChecking() - return the checking account balance
public void setSavings(double amt) - set the savings account balance to parameter amt
public double getSavings() - return the savings account balance
public void depositChecking(double amt) - add parameter amt to the checking account balance (only if positive)
public void depositSavings(double amt) - add parameter amt to the savings account balance (only if positive)
public void withdrawChecking(double amt) - subtract parameter amt from the checking account balance (only if positive)
public void withdrawSavings(double amt) - subtract parameter amt from the savings account balance (only if positive)
public void transferToSavings(double amt) - subtract parameter amt from the checking account balance and add to the savings account balance (only if positive)

Answers

Answer:

Explanation:

The following code is written in Java and creates the BankAccount class with all of the requested methods, including the constructor, getter and setter methods, withdraw methods, and even the transferToSavings method. A preview can be seen in the attached image below.

class BankAccount {

   private String customerName;

   private double savingsBalance, checkingsBalance;

   public BankAccount(String newName, double amt1, double amt2) {

       this.customerName = newName;

       this.checkingsBalance = amt1;

       this.savingsBalance = amt2;

   }

   public String getCustomerName() {

       return customerName;

   }

   public void setCustomerName(String customerName) {

       this.customerName = customerName;

   }

   public double getSavingsBalance() {

       return savingsBalance;

   }

   public void setSavingsBalance(double savingsBalance) {

       this.savingsBalance = savingsBalance;

   }

   public double getCheckingsBalance() {

       return checkingsBalance;

   }

   public void setCheckingsBalance(double checkingsBalance) {

       this.checkingsBalance = checkingsBalance;

   }

   public void depositChecking(double amt) {

       if (amt > 0) {

           this.checkingsBalance += amt;

       }

   }

   public void depositSavings(double amt) {

       if (amt > 0) {

           this.savingsBalance += amt;

       }

   }

   public void withdrawChecking(double amt) {

       if (amt > 0) {

           this.checkingsBalance -= amt;

       }

   }

   public void withdrawSavings(double amt) {

       if (amt > 0) {

           this.savingsBalance -= amt;

       }

   }

   public void transferToSavings(double amt) {

       if (amt > 0 ) {

           this.checkingsBalance -= amt;

           this.savingsBalance += amt;

       }

   }

}

Answer:

public class BankAccount {

  private String customerName;

  private double savingsBalance;

  private double checkingsBalance;

  public BankAccount(String newName, double amt1, double amt2) {

     this.customerName = newName;

     this.checkingsBalance = amt1;

     this.savingsBalance = amt2;

  }

  public void setName(String newName) {

     this.customerName = customerName;

  }

 

     public String getName() {

     return customerName;

  }

  public void setChecking(double checkingsBalance) {

     this.checkingsBalance = checkingsBalance;

  }

 

  public double getChecking() {

     return checkingsBalance;

  }

  public void setSavings(double savingsBalance) {

     this.savingsBalance = savingsBalance;

  }

  public double getSavings() {

     return savingsBalance;

  }

  public void depositChecking(double amt) {

     if (amt > 0) {

        this.checkingsBalance += amt;

     }

  }

  public void depositSavings(double amt) {

      if (amt > 0) {

         this.savingsBalance += amt;

     }

  }

  public void withdrawChecking(double amt) {

     if (amt > 0) {

        this.checkingsBalance -= amt;

     }

  }

  public void withdrawSavings(double amt) {

      if (amt > 0) {

        this.savingsBalance -= amt;

     }

  }

  public void transferToSavings(double amt) {

     if (amt > 0 ) {

        this.checkingsBalance -= amt;

        this.savingsBalance += amt;

     }

  }

}

Giải thích mục đích của các thao tác open() và close().

Answers

Answer:

Which lan is it

Answer:

Đang học năm nhất trường TDT đúng k bạn :D

Explanation:

What are the LinkedIn automation tools you are using?

Answers

Answer:

Well, for me I personally use LinkedCamap to drive more LinkedIn connections, hundreds of leads, sales, and conversions automatically.

Some other LinkedIn automation tools are;

ExpandiMeet AlfredPhantombusterWeConnectLinkedIn Helper

Hope this helps!

Trace the evaluation of the following expressions, and give their resulting values. Make sure to give a value of the appropriate type (such as including a .0 at the end of a double or quotes around a String).
4 + 1 + 9 + "." + (-3 + 10) + 11 / 3
8 + 6 * -2 + 4 + "0" + (2 + 5)
1 + 1 + "8 - 2" + (8 - 2) + 1 + 1
5 + 2 + "(1 + 1)" + 4 + 2 * 3
"1" + 2 + 3 + "4" + 5 * 6 + "7" + (8 + 9)

Answers

Answer:

[tex](a)\ 14"."43[/tex]

[tex](b)\ 0"0"7[/tex]

[tex](c)\ 2"8 - 2"611[/tex]

[tex](d)\ 7"(1 + 1)"46[/tex]

[tex](e)\ "1"23"4"30"7"17[/tex]

Explanation:

Required

Evaluate each expression

The simple rules to follow are:

(1) All expressions in bracket will be evaluated based on its data type

(2) Divisions will return only integer values

(3) Integers immediately after string values will be concatenated (not added)

So, the results are as follows:

[tex](a)\ 4 + 1 + 9 + "." + (-3 + 10) + 11 / 3[/tex]

Evaluate till a string is encountered

[tex]4 + 1 + 9 = 14[/tex]

Followed by "."

Then:

[tex](-3 + 10) = 7[/tex]

[tex]11/ 3 = 3[/tex]

[tex]"." + (-3 + 10) + 11/3 = "."73[/tex] -- because expressions after string operations are concatenated.

So, we have:

[tex]4 + 1 + 9 + "." + (-3 + 10) + 11 / 3 = 14"."43[/tex]

[tex](b)\ 8 + 6 * -2 + 4 + "0" + (2 + 5)[/tex]

Evaluate till a string is encountered

[tex]8 + 6 * -2 + 4 =0[/tex]

[tex]"0" + (2 + 5) ="0"7[/tex]

So, we have:

[tex]8 + 6 * -2 + 4 + "0" + (2 + 5) = 0"0"7[/tex]

[tex](c)\ 1 + 1 + "8 - 2" + (8 - 2) + 1 + 1[/tex]

Evaluate till a string is encountered

[tex]1 + 1 = 2[/tex]

[tex]"8 - 2" + (8 - 2) + 1 + 1 = "8 - 2"611[/tex]

So, we have:

[tex]1 + 1 + "8 - 2" + (8 - 2) + 1 + 1 = 2"8 - 2"611[/tex]

[tex](d)\ 5 + 2 + "(1 + 1)" + 4 + 2 * 3[/tex]

Evaluate till a string is encountered

[tex]5 + 2 =7[/tex]

[tex]"(1 + 1)" + 4 + 2 * 3 = "(1 + 1)"46[/tex] --- multiply 2 and 3, then concatenate

So, we have:

[tex]5 + 2 + "(1 + 1)" + 4 + 2 * 3= 7"(1 + 1)"46[/tex]

[tex](e)\ "1" + 2 + 3 + "4" + 5 * 6 + "7" + (8 + 9)[/tex]

Since a string starts the expression, the whole expression will be concatenated except the multiplication and the expressions in bracket.

So, we have:

[tex]"1" + 2 + 3 + "4" + 5 * 6 + "7" + (8 + 9) = "1"23"4"30"7"17[/tex]

Cardinality ratios often dictate the detailed design of a database. The cardinality ratio depends on the real-world meaning of the entity types involved and is defined by the specific application. For the binary relationships below, suggest cardinality ratios based on the common-sense meaning of the entity types. Clearly state any assumptions you make.
Entity 1 Cardinality Ratio Entity 2
1. Student SocialSecurityCard
2. Student Teacher
3. ClassRoom Wall
4. Country CurrentPresident
5. Course TextBook
6. Item (that can
be found in an
order) Order
7. Student Class
8. Class Instructor
9. Instructor Office
10. E-bay Auction item E-bay bid

Answers

Solution :

ENTITY 1               CARDINALITY RATIO                                     ENTITY 2

1. Student                        1 to many                                     Social security card

                      A student may have more than one          

                     social security card (legally with the

                      same unique social security number),

                     and every social security number belongs

                   to a unique.

2. Student                   Many to Many                                    Teacher

                    Generally students are taught by many

                    teachers and a teacher teaches many students.

3.ClassRoom               Many to Many                                   Wall

                      Do not forget that the wall is usually

                      shared by adjacent rooms.

4. Country                 1 to 1                                             Current President

                       Assuming a normal country under normal

                       circumstances having one president at a

                      time.

5. Course               Many to Many                               TextBook

                        A course may have many textbooks and

                       text book may be prescribed for different

                      courses.

6. Item                             Many to Many                           Order

                        Assuming the same item can appear

                         in different orders.

7. Student                       Many to Many                          Class

                        One student may take several classes.

                        Every class usually has several students.

8. Class                                 Many to 1                             Instructor

                       Assuming that every class has a unique

                        instructor. In case instructors were allowed

                        to team teach, this will be many-many.

9. Instructor                  1 to 1                                             Office

                       Assuming every instructor has only one

                      office and it is not shared. In case of offices

                     shared by 2 instructors, the relationship

                    will be 2-1. Conversely, if any instructor has a joint

                    appointment and offices in both departments,

                    then the relationship will be 1-2. In a very general

                  case, it may be many-many.

10. E-bay Auction item             1-Many                           E-bay bid

                        1 item has many bids and a bid is unique

                        to an item.

Your network has four Hyper-V hosts, which are running three domain controllers and about 10 member servers. Three of the member servers named HR1, HR2, and HR3 are running on a Windows Server 2012 R2 Hyper-V host; the others are running on Windows Server 2016 Hyper-V hosts. All VMs are running Windows Server 2016. You are currently running an enterprise human resources application on the HR1, HR2, and HR3 servers. You are considering upgrading this application to a new version that was recently released. Before you proceed with the upgrade, you set up a test environment consisting of a Windows Server 2016 Hyper-V host and three VMs. You haven't been using checkpoints on any of your VMs, but you want to start doing so as an extra form of disaster recovery in the event of VM corruption or errors introduced by updates. On your test environment, you want to use checkpoints while you are testing the new application. What type of checkpoints should you use throughout your live network and test network? Explain.

Answers

Answer:

Explanation:

What does 32mb SVGA do

Answers

Answer:

hope it helps PLZ MARK ME BRAINLIEST,,!

Explanation:

They stabilize your grpahic image.

LAB: Count multiples (EO)
Complete a program that creates an object of the Count class, takes three integers as input: low, high, and x, and then calls the countMultiples() method. The countMultiples() method then returns the number of multiples of x between low and high inclusively.
Ex: If the input is:
1 10 2
countMutiples() returns and the program output is:
5
Hint: Use the % operator to determine if a number is a multiple of x. Use a for loop to test each number between low and high.
Note: Your program must define the method:
public int countMultiples(int low, int high, int x)
Count.java
1 import java.util.Scanner;
2
3 public class Count {
4
5 public int countMultiples(int low, int high, int x) {
6 /* Type your code here. */
7
8 }
9
10 public static void main(String[] args) {
11 Scanner scnr = new Scanner(System.in);
12 /* Type your code here. */
13 }
14)
15

Answers

Following are the Java Program to the given question:

import java.util.Scanner; //import package for user-input

public class Count  //defining a class Count  

{

   public static int countMultiples(int low,int high,int x)//defining a method countMultiples that takes three integer parameters

   {  

       int c=0,i; //defining integer variables that hold value

       for(i=low;i<=high;i++)//defining loop that iterates value between low and high  

       {  

           if(i%x==0)//defining if block that uses % operator to check value

           {

               c+=1; //incrementing c value

           }

       }

       return c; //return c value

   }

   public static void main(String[] args)//main method  

   {  

       int l,h,x;//defining integer variable

       Scanner scnr=new Scanner(System.in); //creating scanner class object  

       l=scnr.nextInt(); //input value

       h=scnr.nextInt();//input value

       x=scnr.nextInt();//input value

       System.out.println(countMultiples(l,h,x)); //calling method and print its value

   }

}

Output:

Please find the attached file.

Program Explanation:

Import package.Defining a class "Count", and inside the class two method "countMultiples and main method" is declared.In the "countMultiples" method three integer parameter that are "low, high, and x".Inside this method a for loop is declared that uses the parameter value and use conditional statement with the % operator and check and return its values.Inside the main method three integer variable is declared that uses the scanner class to input the value and pass to the method and print its calculated value.  

Learn more:

brainly.com/question/16106262

Write an application that finds the smallest of several integers. Assume that the first value read specifies the number of values to input from the user. C

Answers

Answer:

Following are the code to the given question:

#include<stdio.h>//include header file  

int main() //defining a main method

{  

   int a[100],k,x,s; //defining integer variable and an array  

   printf("Input the number of element want to insert array: ");  //print message

   scanf("%d",&x);  //input value

   printf("Enter array value: \n"); //print message  

   for(k = 0; k<x; k++)  //defining a loop that inputs values

   {  

       scanf("%d",&a[k]);  //use array to input value

   }  

   s = a[0]; //holding first array value in array

   for(k=0;k<x;k++)  //use for loop

   {  

       if(a[k]<s)  //use if block to check the smallest array value

       {  

         s=a[k];//holding smallest array value

       }  

   }  

   printf("smallest number= %d",s);//print smallest value

}  

Output:

Please find the attached file.

Explanation:

In this code an array and another integer variable "a[100], i,n, and s" is is declared, in which the array and n for input the value from the user-end.

In the next step, an "s" variable is declared that inputs the first array element value in s and use a loop to check the smallest array element and prints its value.

Type the correct answer in the box. Use numerals instead of words. If necessary, use / for the fraction bar.
PH
var num2 = 32;
var num1 = 12;
var rem=num2 % numi;
while(rem > 0)
{
num2 = num1;
num1 = rem;
rem = num2 % num1;
}
document.write(num1);
The output of the document.write statement at the end of this block is

Answers

Answer:

4

Explanation:

Given

The attached code segment

Required

The output

The first and second lines initialize num2 to 32 and num1 to 12, respectively.

Next, the remainder is calculated on line 3

[tex]rem = 32\%12[/tex]

[tex]rem = 8[/tex]

Then the while loop is repeated as long as rem > 0.

At first, we have:

[tex]num2 = 32[/tex]

[tex]num1 = 12[/tex]

[tex]rem = 8[/tex]

The first iteration gives:

[tex]num2 = 12[/tex]

[tex]num1 = 8[/tex]

[tex]rem = 12\%8 = 4[/tex]

Is 4 > 0? Yes; The loop is executed again.

This gives:

[tex]num2 = 8[/tex]

[tex]num1 = 4[/tex]

[tex]rem = 8\%4=0[/tex]

Is 0 > 0? No; The loop is executed

The last statement prints the last value of num1;

In the last loop, we have:

[tex]num1 = 4[/tex]

Hence, the output is 4

Answer:

Below is correct, the answer is 4.

Explanation:

PLATO

Write a Java code statement for each of following:
a) To declare TWO (2) decimal numbers, and ONE (1) whole number.​

Answers

Answer:

double decimal1, decimal2;

int whole;

Explanation:

Required

Declare 2 decimals and 1 int.

The syntax to declare a variable is:

data-type variable-name;

To declare decimal, we simply make use of double or float data types.

So, we have:

double decimal1, decimal2; ----> for the decimal variables

And

int whole; ---- for the whole number

The computer that is used in scientific research is ........​

Answers

Answer:

supercomputers are the computer that is used in scientific research.

Answer:

super computer is the right answer

Why is OS important in every data processing system?
Please Answer Fast! ​

Answers

Answer:

Functions of an operating system. An operating system provides three essential capabilities: It offers a UI through a CLI or GUI; it launches and manages the application execution; and it identifies and exposes system hardware resources to those applications -- typically, through a standardized API.

Explanation:

9.17 LAB: Acronyms An acronym is a word formed from the initial letters of words in a set phrase. Write a program whose input is a phrase and whose output is an acronym of the input. If a word begins with a lower case letter, don't include that letter in the acronym. Assume there will be at least one upper case letter in the input.

Answers

Answer:

Hence the code is given as follows,

import java.util.Scanner;

public class LabProgram {

   public static String createAcronym(String userPhrase){

       String result = "";

       String splits[] = userPhrase.split(" ");

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

           if(splits[i].charAt(0)>='A' && splits[i].charAt(0)<='Z')

               result += splits[i].charAt(0);

       }

       return result;

   }

   public static void main(String[] args) {

       Scanner scan = new Scanner(System.in);

       String s = scan.nextLine();

       System.out.println(createAcronym(s));

   }

}

what type of slab and beam used in construction of space neddle​

Answers

Answer:

Pyramidal Space Frame Glamorizes Swimming Pool 15. News Briefs 16 ... to use every pound of steel with no sacrifice in safety or ... form of steel trusses in an inverted coni- ... be embedded in the concrete slab when.

Explanation:

I HOPE THIS HELPS

You've arrived on site to a WAN installation where you will be performing maintenance operations. You have been told the WAN protocol in use allows multiple Layer 3 protocols and uses routers that use labels in the frame headers to make routing decisions. What WAN technology is in use

Answers

Answer:

The answer is "MPLS".

Explanation:

The MPLS stands for Multiprotocol Label Switching. This packet switching method facilitates the generation of easier personal backbones using a less physical channel, which sends information from one source to its destination with labels rather than IP addresses. Many of these WAN services are sold through huge companies. It is also a technology for data transfer that boosts speed and regulates network traffic flow. The information is directed with this technology via a label rather than needing complicated surveys at every stop in a route cache.

Which devices are managed through device management?

Device management is the process of managing
________devices.

Answers

Answer:

organization

Explanation:

The answer is organization I am thinking.

The next few questions will be based on interpretations of a topographic map from East Brownsville, TX. To answer these questions you will have to access the topographic map of East Brownsville attached below:
What stage of fluvial landscape development is shown across the region displayed here?
a. Youthful
b. Mature
c. Old age

Answers

Answer:

a. Youthful

Explanation:

The river gets its water from youth stage fluvial water. The river meanders from side to side. East Brownsville will be less stable in international boundary in terms of physical position on the landscape because its base level drops.

Modeling and simulation can enhance the Systems Engineering process by:__________.
a. Helping IPT members to understand the interrelationship of components without physically changing the system.
b. Providing designs that will consistently exceed functional capabilities.
c. Quickly providing physical solutions to meet functional capabilities.
d. Eliminating technical risk before production begins.

Answers

C the Quiclyprovideinf
Other Questions
Johan published a monthly poetry magazine. In March he printed 1400 copies of magazine. In April he increased his print run by 15% Decide whether the sentence is grammatically CORRECT or INCORRECT as written.Te gusta viajas con tu familia?correctincorrect g If the sequence of bases in the DNA coding strand were CCG AGT, the sequence of amino acids in the polypeptide chain would be _ A project manager has just assigned a team that comes from many countries, including Brazil, Japan, the United States, and Britain. What is her BEST tool for success? Which system of equations below has no solution Factitious disorder is different from somatic symptom disorder in that: Group of answer choices people with factitious disorder falsely report symptoms that they do not have in order to get attention from others. somatic symptom disorders are more dramatic than factitious disorders. people with factitious disorder report bodily preoccupation while those with somatic symptom disorder report symptom amplifications. people with somatic symptom disorder pretend to have symptoms and intentionally induce physical symptoms for any type of gain. A solid wooden block in the shape of a rectangular prism has a length, width and height In a species of Asclepias (milkweeds) there are two alleles of a gene involved in the synthesis of cardenolides. One allele results in normal synthesis of these molecules, while the other allele prevents synthesis from occurring. Individuals who are heterozygous for this gene produce intermediate amounts of cardenolides. In a population of Asclepias where both alleles of the cardenolide synthesis allele are present the following phenotypes were observed: Normal cardenolide concentration: 241 Intermediate cardenolide concentration: 720 No cardenolides: 39What are the expected phenotypic frequencies in this population?A.Normal: 0.36; Intermediate: 0.62; No cardenolides: 0.02B. Normal: 0.36; Intermediate: 0.48; No cardenolides: 0.16C. Normal: 0.24; Intermediate: 0.48; No cardenolides: 0.04D. Normal: 0.50; Intermediate: 0.48; No cardenolides: 0.02E. Normal: 0.24; Intermediate: 0.72; No cardenolides: 0.04 convert the following quantities [tex]25m {}^{2} \: into \: cm {}^{2} [/tex] ora started watching a movie at 2:45 p.m. She watched the movie for hours before stopping the movie for hours to eat dinner. After dinner, Nora finished watching the remaining hours of the movie. At what time did the movie end? What was not a factor that led to the Great Depression? A. Increases in the tax rate for corporations B. Excessive speculation in the stock market C. Too much buying with credit D. Banks were uninsured Which property was used to simplify the expression?30+9+4- 40+distributive propertycommutative propertyassociative propertyinverse property HELP SMB PLEASE!!! Evaluate the expression -4 ( n - 6) + m when n = -5 and m = 2? Show your steps How dreary to be somebody!How public, like a frogTo tell your name the livelong dayTo an admiring bog!Which statement best explains the central idea of this stanza? Dallas Products is a division of a major corporation. The following data are for the most recent year of operations: Sales $ 37,880,000 Net operating income $ 3,508,960 Average operating assets $ 9,400,000 The company's minimum required rate of return 14 % The division's margin used to compute ROI is closest to: Piaget's nursemaid told his family that she saved his life from an attempted kidnapping. Piaget believed the nursemaid and later recalled details of the event, even though it never actually took place. Piaget's ability to recall an event that never took place is demonstrative of: Why biology is important for the welfare of human beings?Give reasons In what city was the League ofNations located?A. SacramentoB. New YorkC. San FranciscoD. Atlanta Read the sentence from Barrio Boy by Ernesto Galarza.People talked to one another on the street in low tones; only drunks and muchachitos mal educados raised their voices, or the arrieros when they shouted to their donkeys.Which words best signal that "muchachitos mal educados" has a negative connotation?A. People talkedB. on the streetC. raised their voicesD. their donkeys Countess Corp. is expected to pay an annual dividend of $4.81 on its common stock in one year. The current stock price is $75.67 per share. The company announced that it will increase its dividend by 3.80 percent annually. What is the company's cost of equity