A Java programmer has developed a GUI with several different fields for inputting values and indicating choices via buttons, all using JavaFX. To manage the user experience, the programmer wishes to have the field of input automatically advance to the next input field or button after an entry is made. To do this, the programmer should use the

Answers

Answer 1

Answer:

EventHandler

Explanation:

In order to do this the programmer needs to use the EventHandler class. This class allows the computer to listen for certain user actions such as pressing a button. Using this on a button would then allow the programmer to specify what they want to happen when the user clicks the button or performs a certain action. For example, in this scenario, the programmer would program an EventHandler so that when the button is clicked it saves the input to a variable and changes the input field to the next option.


Related Questions

Hello all i need help on my next task on Procedural Programming, ive tried to understand many times but i keep getting misled, im a beginner.

Objective
Name: Dot product
Description:
Write a procedure, called dot_product which calculates in the variable ps, the dot(scalar) product of v1 and v2 (v1 and v2 are vectors of IR)
Write an algorithm which determines, for n pairs of given vectors, whether two vectors of given IR are orthogonal, by calling the procedure defined in the previous question. The dot product of two orthogonal vectors is zero.
Modify the previous algorithm if you use a dot_product function instead of a procedure.

Instructions:
Use array for presenting the vector.
Use nested loop (a loop inside another)
Use different types of passing parameters

Answers

Answer:

https://opentextbc.ca/calculusv3openstax/chapter/the-dot-product/

Explanation:

hope its hlp you to understand to find the answer

The `dot_product` is defined as a function, and it returns the dot product value instead of storing it in a variable.

How did we realize this dot product?

Let's break down the task into various steps and work on them one by one.

1. Implementing the dot_product procedure: To calculate the dot product of two vectors, you need to multiply the corresponding elements of the vectors and sum them up. Here's an example implementation of the dot_product procedure in a procedural programming language:

procedure dot_product(v1, v2):

n = length(v1) # Assuming both vectors have the same length

ps = 0 # Initialize the dot product variable to zero

for i = 1 to n:

ps = ps + v1[i] * v2[i] # Multiply corresponding elements and add to the dot product variable

return ps

In this procedure, `v1` and `v2` are the input vectors, and `ps` is the dot product result.

2. Checking if vectors are orthogonal: Now, let's write an algorithm to determine whether two vectors are orthogonal by calling the `dot_product` procedure. We'll use a nested loop to iterate over pairs of vectors.

algorithm check_orthogonal_vectors(vectors):

n = length(vectors) # Number of vector pairs

for i = 1 to n:

v1 = vectors[i][1] # First vector in the pair

v2 = vectors[i][2] # Second vector in the pair

ps = dot_product(v1, v2) # Call the dot_product procedure

if ps == 0:

output "The vectors", v1, "and", v2, "are orthogonal."

else:

output "The vectors", v1, "and", v2, "are not orthogonal."

In this algorithm, `vectors` is an array containing pairs of vectors. Each pair should be a 2D array where the first element represents the first vector and the second element represents the second vector.

Modifying the algorithm using a dot_product function: If you want to use a function instead of a procedure for calculating the dot product, here's how you can modify the previous algorithm:

function dot_product(v1, v2):

n = length(v1) # Assuming both vectors have the same length

ps = 0 # Initialize the dot product variable to zero

for i = 1 to n:

ps = ps + v1[i] * v2[i] # Multiply corresponding elements and add to the dot product variable

return ps

algorithm check_orthogonal_vectors(vectors):

n = length(vectors) # Number of vector pairs

for i = 1 to n:

v1 = vectors[i][1] # First vector in the pair

v2 = vectors[i][2] # Second vector in the pair

ps = dot_product(v1, v2) # Call the dot_product function

if ps == 0:

output "The vectors", v1, "and", v2, "are orthogonal."

else:

output "The vectors", v1, "and", v2, "are not orthogonal."

In this modified version, the `dot_product` is defined as a function, and it returns the dot product value instead of storing it in a variable.

learn more about dot product: https://brainly.com/question/30751487

#SPJ2

consider a memory system with a memory access time of 150 ns and a cache access time of 20ns. If the effective access time is 20% greater than the cache access time, what is the hit ratio H g

Answers

Answer:

H = 0.7333333

Explanation:

Given that:

The memory access time ([tex]T_m[/tex]) = 150 ns

The cache access time [tex](T_c)[/tex] = 20 ns

Effective access time [tex](T_e)[/tex]  = 20% > [tex](T_c)[/tex]

Then, it implies that:

= [tex](T_c)[/tex] + 20% of

=[tex](T_c)[/tex](1+20%)

=[tex](T_c)[/tex](1+ 0.2)

= 20ns × 1.2

= 24ns

To determine the hit ratio H;

Using the formula:

[tex]T_e = T_c \times H+(1-H) \times (T_c + T_m) \\ \\ T_e = HT_c + T_c + T_m -HT_c -HT_m \\ \\ T_e = T_c +T_m - HT_m \\ \\ T_c -T_e = T_m (H-1) \\ \\ H-1 = \dfrac{T_c -T_e}{T_m} \\ \\ H = 1+ (\dfrac{T_c -T_e}{T_m})--- (1)[/tex]

Replacing the values; we have:

[tex]T_c - T_e = 20ns - 24 ns \\ \\ T_c - T_e = -4 ns \\ \\ \dfrac{T_c - T_e }{T_m} = \dfrac{-4 ns}{150} \\ \\ \dfrac{T_c - T_e }{T_m} = -0.02666667[/tex]

From (1)

[tex]H = 1+ (-0.2666667) \\ \\ H = 1 - 0.2666667 \\ \\ \mathbf{H = 0.7333333}[/tex]

In python, Create a conditional expression that evaluates to string "negative" if user_val is less than 0, and "non-negative" otherwise.

Answers

I am assuming that user_val is an inputted variable and a whole number (int)...

user_val = int(input("Enter a number: "))

if user_val < 0:

   print("negative")

else:

   print("non-negative")

tell me the most scariest website you know and i'll give you brainlest

Answers

Answer:

it's not a website but on insta there's an account that freezes people's phone when you click on their story.

Explanation:

Write a recursive function that has an argument that is an array of characters and two arguments that are bounds on array indexes. The function should reverse the order of those entries in the array whose indexes are between the two bounds. For example, if the array is a[0]

Answers

Answer:

The function is as follows:

void revArray(char arr[], unsigned int low, unsigned int high)  {  

      if (low >= high){

        return;  }

  swap(arr[low], arr[high]);  

  revArray(arr, low + 1, high - 1);  }

Explanation:

This declares the function. It receives a char array and the lower and upper bounds to be reversed

void revArray(char arr[], unsigned int low, unsigned int high)  {  

This is the base case of the recursion (lower bound greater than or equal to the upper bound).

      if (low >= high){

        return;  }

This swaps alternate array elements

  swap(arr[low], arr[high]);  

This calls the function for another swap operation

  revArray(arr, low + 1, high - 1);  }

Write a method called lexLargest that takes a string object argument containing some text. Your method should return the lexicographical largest word in the String object (that is, the one that would appear latest in the dictionary).

Answers

Answer:

public static String lexLargest(String text){

       //split the text based on whitespace into individual strings

       //store in an array called words

       String[] words = text.split("\\s");

       

       //create and initialize a temporary variable

       int temp = 0;

       

       //loop through the words array and start comparing

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

           

           //By ignoring case,

           //check if a word at the given index i,

           //is lexicographically greater than the one specified by

           //the temp variable.

          if(words[i].compareToIgnoreCase(words[temp]) > 0){

               

               //if it is, change the value of the temp variable to the index i

              temp = i;

           }    

       }

       

       //return the word given by the index specified in the temp

               // variable

       return words[temp];

    }

Sample Output:

If the text is "This is my name again", output will be This

If the text is "My test", output will be test

Explanation:

The code above has been written in Java. It contains comments explaining the code. Sample outputs have also been given.

However, it is worth to note the method that does the actual computation for the lexicographical arrangement. The method is compareToIgnoreCase().

This method, ignoring their cases, compares two strings.

It returns 0 if the first string and the second string are equal.

It returns a positive number if the first string is greater than the second string.

It returns a negative number if the first string is less than the second string.

Second Largest, Second Smallest Write a program second.cpp that takes in a sequence of integers, and prints the second largest number and the second smallest number. Note that in the case of repeated numbers, we really mean the second largest and smallest out of the distinct numbers (as seen in the examples below). You may only use the headers: and . Please have the output formatted exactly like the following examples: (the red is user input) Enter integers (Q to quit): 1 2 1 8 8 9 Q Second largest: 8 Second smallest: 2 Enter integers (Q to quit): -7 -101 0 -2 17 Q Second largest: 0 Second smallest: -7

Answers

Answer:

The program in C++ is as follows:

#include <vector>

#include <iostream>

using namespace std;

int main(){

   vector <int> my_num;

   string sentinel;

   int n = 0;

   cout<<"Enter integers (Q to quit): ";

   cin>>sentinel;

   while(sentinel != "Q"){

       my_num.push_back(stoi(sentinel));

       n++;

       cin>>sentinel;    }

      int n1, n2;

      n1 = my_num.at(0);      n2 = my_num.at(1);

      if(my_num.at(0)<my_num.at(1)){     n1 = my_num.at(1);  n2 = my_num.at(0);   }

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

          if (my_num.at(i) > n1) {

              n2 = n1;

              n1 = my_num.at(i);     }

           else if (my_num.at(i) > n2 && my_num.at(i) != n1) {

               n2 = my_num.at(i);     }  }

       cout<<"Second Largest: "<<n2<<endl;

       n1 = my_num.at(1);       n2 = my_num.at(0);

       if(my_num.at(0)<my_num.at(1)){ n1 = my_num.at(0);  n2 = my_num.at(1);   }

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

           if(n1>my_num.at(i)) {  

               n2 = n1;

               n1 = my_num.at(i);            }

           else if(my_num.at(i) < n2){

               n2 = my_num.at(i);     }  }

 cout<<"Second Smallest: "<<n2;

 return 0;

}

Explanation:

See attachment for explanation

Question #4
Math Formula
What will you see on the next line?
>>>int(3.9)

Answers

Answer:

3

Explanation:

The correct answer is 3. The int() function truncates the decimal part.

-Edge 2022

list and describe each of the activities of technology

Answers

Answer:

network has led to exposure of dirty things to young ones.

air transport has led to losing of lives

PLEASE I NEED HELP, WILL MARK BRAINLYEST!!! 50 POINTS!!!
Select the correct answer.
Production teams share a script between them, and the script is a collaborative effort. Which action is important to keep its character intact?
A.
develop the structure of the screenplay
B.
mention the details of the genres and the subgenres
C.
develop the hook
D.
create a sales pitch

Answers

Answer: Develop the structure of the screenplay

Explanation:

The screenplay helps the team find the character of the film and develop it.

Answer: B.

mention the details of the genres and the subgenres

Explanation:

Right on test

At Greenwood ATCT, arrival information need NOT be forwarded while FDIO is operational unless the sequence of aircraft changes and/or the __________.

Answers

The available options are:

A. Arrival time differs by more than 3 minutes

B. Aircraft is issued an approach other than the tower specified

C. Verbal coordination has not been yet accomplished

Answer:

Aircraft is issued an approach other than the tower specified

Explanation:

Considering the situation described in the question, and according to Instrument Flight Rules (IFR), Approach Clearance Procedures, when at Greenwood Air Traffic Control Tower (ACTC), arrival information need not be forwarded while Flight Data Input-Output (FDIO) operational unless the sequence of aircraft changes and the "Aircraft is issued an approach other than the tower specified."

What will be the output of the following JavaScript code? functioncomparison() { int number=10; if(number= = ="10") return true; else return false; } Single choice. (0.5 Points) True false runtime error compilation error

Answers

Answer:

(b) false

Explanation:

Given

The above code

Required

The expected output

First, variable number is declared as integer and then initialized with 10

Next, the === compares the integer 10 with string "10"

10 and "10" are different type and === will return true if the compared values and/or variables are of the same type.

Since 10 and "10" are different, the expected output is false

The output of the following JavaScript code is false.

Let's write the code appropriately,

functioncomparison() {

int number = 10;

if (number= = ="10")

return true;

else

return false;

}

A function  functioncomparison() is declared.

Then the integer number is assigned as 10.

The conditional "if" says if the string 10 is equals to the integer number 10.

The triple equals signs(===)check for the type and the actual value.

The string "10" and integer 10 are not the same type. "10" is a string and 10 is an integer.

Therefore, the output of the code will be false.

learn more about JavaScript conditional here:  https://brainly.com/question/17115445?referrer=searchResults

How have technology and social media changed reading?
O A. Physical books can only be read on the web.
B. Now reading is a conversation of give and take.
O C. People no longer have to read anything at all.
D. Reading often takes much longer to undergo.

Answers

Answer:

B?

Explanation:

I'm super sorry if I get this wrong for you but after thinking so much I probably think it would be B

Answer:

the guy above is right it is B

Explanation:

because 2+2=4

hello! can someone write a c++ program for this problem

Problema 2018.3.2 - Cheated dice
Costica is on vacation and his parents sent him to the country. There he gets terribly bored and looking through his grandfather's closet, he came across a bag full of dice. Having no one to play dice with, but it seemed to him that some of the dice were heavier than the others, Costica chose a dice and started to test it by throwing it with him and noting how many times each face fell. He then tries to figure out whether the dice are rolled or not, considering that the difference between the maximum number of appearances of one face and the minimum number of occurrences (of any other face) should not exceed 10% of the total number of throws.
Requirement
Given a number N of dice rolls and then N natural numbers in the range [1: 6] representing the numbers obtained on the rolls, determine whether the dice is tricked according to the above condition.
Input data
From the input (stdin stream) on the first line reads the natural number N, representing the number of rolls. On the following N lines there is a natural number in the range [1: 6] representing the numbers obtained on throws.
Output data
At the output (stdout stream) a single number will be displayed, 0 or 1, 0 if the dice are normal, and 1 if it is cheated.
ATTENTION to the requirement of the problem: the results must be displayed EXACTLY in the way indicated! In other words, nothing will be displayed on the standard output stream in addition to the problem requirement; as a result of the automatic evaluation, any additional character displayed, or a display different from the one indicated, will lead to an erroneous result and therefore to the qualification "Rejected".
Restrictions and clarifications
1. 10 ≤ N ≤ 100
2. Caution: Depending on the programming language chosen, the file containing the code must have one of the extensions .c, .cpp, .java, or .m. The web editor will not automatically add these extensions and their absence makes it impossible to compile the program!
3. Attention: The source file must be named by the candidate as: . where name is the last name of the candidate and the extension (ext) is the one chosen according to the previous point. Beware of Java language restrictions on class name and file name!
Input data

10
6
6
6
6
6
6
6
6
6
6
Output data
1

Roll the dice 10 times, all 10 rolls produce the number 6. Because the difference between the maximum number of rolls (10) and the minimum number of rolls (0) is strictly greater than 10% of the total number of rolls (10% of 10 is 1), we conclude that the dice are oiled.

Input data
10
1
4
2
5
4
6
2
1
3
3
Output data
0

Throw the dice 10 times and get: 1 twice, 2 twice, 3 twice, 4 twice, 5 and 6 at a time. Because the difference between the maximum number of appearances (two) and the minimum number of occurrences (one) is less than or equal to 10% of the total number of throws (10% of 10 is 1), we conclude that the dice are not deceived.

Answers

Answer:

f0ll0w me on insta gram Id:Anshi threddy_06 (no gap between I and t)

A network-based attack where one attacking machine overwhelms a target with traffic is a(n) _______ attack.

Answers

HELLO!

Answer:

''Denial of Service'' also known as ''DoS''

Explanation:

It's ''Denial of service'' this is because it means an attack that mean to be shutting down a machine or network. So, ''Denial of Service'' best fits in this sentence.

What will the declaration below do to its target?

animation-direction: reverse;
The animation steps will play backward.
The animation steps will play forward, then backward.
The animation steps will play forward.
The animation steps will play backward, then forward.

Answers

The animation steps will play forward then backward

Linda wants to change the color of the SmartArt that she has used in her spreadsheet. To do so, she clicks on the shape in the SmartArt graphic. She then clicks on the arrow next to Shape Fill under Drawing Tools, on the Format tab, in the Shape Styles group. Linda then selects an option from the menu that appears, and under the Colors Dialog box and Standard, she chooses the color she wants the SmartArt to be and clicks OK. What can the option that she selected from the menu under Shape Fill be

Answers

Answer: Theme colors

Explanation:

Based on the directions, Linda most probably went to the "Theme colors" option as shown in the attachment below. Theme colors enables one to change the color of their smart shape.

It is located in the "Format tab" which is under "Drawing tools" in the more recent Excel versions. Under the format tab it is located in the Shape Styles group as shown below.

For what specific purpose is the TM9400 P25 Mobile designed? What is the benefit of having a mobile communications device that allows for multiple modes of operation? What features make this mobile device durable enough for use in the field? In your opinion, what feature(s) of the P25 Mobile makes it ideal for police work?

Answers

Answer:

The specific purpose for the design of the TM9400 P25 Mobile is its use for efficient communication with other emergency-handling jurisdictions, especially in challenging environments.

When a law enforcement officer requires a dedicated mobile network for communication in emergency situations, the TM9400 P25 Mobile comes handy.  It enables the officer to communicate under multiple operational modes from remote locations.

Encryption, together with its high quality audio and rugged build, ensures the durability of the TM9400 P25 Mobile.

The ability to communicate from many places, embedded into its interoperability, allows different law enforcement jurisdictions to seamlessly exchange intelligence.  It also has remote network management features, which enhance its spectral efficiency and effectiveness.

Explanation:

The TM9400 P25 Mobile is a high-performance, flexible, and robust radio specially designed for emergency situations. It is widely used by law enforcement officers to communicate with others from remote locations.

Things are created to meet a purpose.  The Tait TM9400 is known to be a very high-performing, flexible and robust mobile. It was set up for use in difficult environments while helping to give high quality audio and brilliant operation to the first responders all over the world.

The purpose of TM9400 P25 mobile designed is Challenging environment for effective communication use along with other emergency-handling cases.

It is often used by law enforcement officer because of  emergency situation as it comes in handy.  It helps the officer to communicate under a lot of operational modes from remote areas.

Learn more about Phones from

https://brainly.com/question/917245

write a program to enter 30 integer numbers into an array and display​

Answers

Answer:

i764

Explanation:

Answer:

Explanation:

Python:

numberlist = []

for i in range(0, 29):

   a = input("Enter a number: ")

   numberlist[i] = a

print(*meh, sep = "\n")

In our discussion of Linear-Time Sorting, we talked about an algorithm called radix sort, which does successive iterations of another algorithm called counting sort, with each of those iterations focused on one digit (e.g., sorting by the last digit and ignoring all the others, sorting by the second-to-last digit and ignoring all the others, or whatever). Suppose that you replaced counting sort, at each step, with a hypothetical algorithm that was faster than counting sort but was not stable. If you did, would you expect radix sort to still come up with a correct result

Answers

Answer:

Explanation:

Suppose we use some other sorting technique as the subroutine for radix sort to sort the digit, it will be unstable. The final outcome will not be accurate and correct. This is due to the fact that Unstable sort does not retain the order for equal components, thus whatever sorting was done before for lower significant bits might be screwed up by the next significant bit at that level that possesses the same value.

Consider the following scenario:

[431, 135, 132]

⇒ [431,132,135] (The least significant bit is used in the first step of sorting.)

⇒ [132, 431, 135] (Because the sorting algorithm was not reliable, the second level of sorting screwed up the preceding sorting.)

As a result, we will never receive an accurate and coorect outcome in this scenario.

Select the correct answer.
What is the advantage of using transparencies?
O A. They support better image quality than online presentations.
O B. They are helpful when creating non-linear presentations.
OC. They allow the presenter to jot down points on the slide.
OD. They are better suited to creating handouts.
Reset
Next

Answers

Answer:

They are better suited to creating handouts

To launch the mail merge help dialog box, what option should you select using the Microsoft word office assistant?​

Answers

Answer:

Complete setup.

Explanation:

Microsoft Word refers to a word processing software application or program developed by Microsoft Inc. to enable its users type, format and save text-based documents.

A Mail Merge is a Microsoft Word feature that avails end users the ability to import data from other Microsoft applications such as Microsoft Access and Excel. Thus, an end user can use Mail Merge to create multiple documents (personalized letters and e-mails) for each entry in the list at once and send to all individuals in a database query or table.

Hence, Mail Merge is a Microsoft Word feature that avails users the ability to insert fields from a Microsoft Access database into multiple copies of a Word document.

Some of the options available in the Write & Insert Fields group of Mail Merge are;

I. Highlight Merge Fields.

II. Address Block.

III. Greeting Line.

Generally, when a user wants to launch the Mail Merge help dialog box, the option he or she should select using the Microsoft word office assistant is complete setup.

Additionally, the sequential steps of what occurs during the mail merge process are;

1. You should create the main document

2. Next, you connect to a data source

3. You should highlight or specify which records to include in the mail.

4. You should insert merge fields.

5. Lastly, preview, print, or email the document.

What does the top-level domain in a URL indicate?
A. the organization or company that owns the website
B. the organization or company that operates the website
C. the protocol used to access the website D. the type of website the URL points to

Answers

Answer:

b i think

Explanation:

A top-level domain (TLD) is the last segment of the domain name. The TLD is the letters immediately following the final dot in an Internet address. A TLD identifies something about the website associated with it, such as its purpose, the organization that owns it or the geographical area where it originates.

Answer:

The answer is D. The type of website the URL points to.

Explanation:

I got it right on the Edmentum test.

Two essential privacy concerns are _____.

cybercrime and government authorization

political freedom and religious freedom

protecting criminals’ personal emails

knowing how personal data are collected and used

please answer asap as well as the others i posted

Answers

Answer:

knowing how personal data are collected and used.

Explanation:

A database management system (DBMS) can be defined as a collection of software applications that typically enables computer users to effectively and efficiently create, store, modify, retrieve, centralize and manage data or informations in a database. Thus, it allows computer users to efficiently retrieve and manage their data with an appropriate level of security.

Generally, a database management system (DBMS) acts as an intermediary between the physical data files stored on a computer system and any software application or program.

Data theft can be defined as a cyber attack which typically involves an unauthorized access to a user's data with the sole intention to use for fraudulent purposes or illegal operations. There are several methods used by cyber criminals or hackers to obtain user data and these includes DDOS attack, SQL injection, man in the middle, phishing, etc.

Basically, the two (2) essential privacy concerns in the field of cybersecurity are knowing how personal data are collected and essentially how they're used by the beneficiaries or end users.

This ultimately implies that, the medium (channel) and methods through which personal data are collected or obtained plays a huge role in determining how secured or unsecured a user's data are. Also, the manner in which a person's personal data is used should be well defined.

In BSD socket API,which call is used for transmitting data in the connectionless mode?

Answers

Answer:

UDP is the answer

Explanation:

UDP enables best-effort connectionless transfer to individual block of information, while TCP enables reliable transfer of a stream of bytes. That's two modes of services available through the circuit interface, connection-oriented and connection-less.

How many comparators are required for an m-way set associative cache to locate a block that has n words

Answers

Answer:

Explanation:

mmmmmmmmmmmmmmmmmmmm jkmmmmm kjkjjkjkjk

In which situation is coauthoring of presentations primarily utilized?

A) A reviewer must be able to make changes to a presentation after an author creates it.

B) Multiple authors must be able to simultaneously make changes to a presentation.

C) Multiple reviewers have to be able to view one another's changes after they are made.

D) One author and one reviewer work on a presentation at different times.

Answers

Answer:

C) Multiple reviewers have to be able to view one another's changes after they are made.

Explanation:

Write a program to find the sum and product of all elements of an array of size 10. Take input from user.

Answers

Answer:

mark me brainleist

Explanation:

#include<iostream>

using namespace std;

int main ()

{

   int arr[10], n, i, sum = 0, pro = 1;

   cout << "Enter the size of the array : ";

   cin >> n;

   cout << "\nEnter the elements of the array : ";

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

   cin >> arr[i];

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

   {

       sum += arr[i];

       pro *= arr[i];

   }

   cout << "\nSum of array elements : " << sum;

   cout << "\nProduct of array elements : " << pro;

   return 0;

}

g 4-6 you've been given the network 200.5.0.0 /24 and need to subnet it using vlsm as follows: bldg 1 30 hosts bldg 2 10 hosts bldg 3 10 hosts bldg 4 4 hosts what will be the network address for bldg 3

Answers

Answer:

The answer is  "200.5.0.0 32/28".

Explanation:

The requirement of the Bldg is =30.

The number of the host bits which is needed = 5

Therefore the subnet mask will be =/27

for bldg 3 netmask could be= /28

and when the /28 after that the last octet will be= 00100000.

00100000 converting value into a decimal value that is = 32.

therefore the correct value is 200.5.0.32 /28.

Write a program called nearest_multiple.py that asks the user to input a number (here I will call it num) and a strictly positive integer (here I will call it mult) and prints as output the closest integer to num that is a multiple of mult

Answers

Answer:

The program is as follows:

num = float(input("Enter a decimal (float): "))

mult = int(input("Enter a positive whole (int): "))

small = (num // mult) * mult

big = small + mult

print(num,"rounded to the nearest multiple of ",mult,"is",end=" ")

print(big if num - small > big - num else small)

Explanation:

This gets input for num

num = float(input("Enter a decimal (float): "))

This gets input for mult

mult = int(input("Enter a positive whole (int): "))

This calculates the smaller multiple

small = (num // mult) * mult

This calculates the larger multiple

big = small + mult

This prints the output header

print(num,"rounded to the nearest multiple of ",mult,"is",end=" ")

This prints small if small is closer to num, else it prints big

print(big if num - small > big - num else small)

Other Questions
FIND EACH ANGLE MEASURE.FIGURES ARE NOT DRAWN TO SCALE. a.Which of the following statements is FALSE?All of the Comanche and Kiowa tribes signed the Medicine Lodge Creek Treaty.b. The U.S. government and settlers often misunderstood and mistreated Native Americans.C. The Treaty of Medicine Lodge Creek was signed in Kansas in 1867.d. Railroad construction after the Civil War influenced people to move westward in Texas.Please select the best answer from the choices providedABD An injunction that requires a defendant to take an action or set of actions isan) injunctionA. permanentB. prohibitoryC. mandatory D. interim What is the radius?Find the length of the radius of the circle with an equation of(x + 3)2 + (y-7)2 = 289. A student wants to know how many 1 cm cubes will fit into a 10cm by 8 cm 12 cm box.What measure is the student trying to calculate?A. Surface areaB. HeightC. Perimeter D. Volume It takes 1/4 of an hour to mow 1/5 of his yard. How much of the yard can he mow per hour Ive been stuck on this can I get help. Which life forms comprises most of an article land animals? A--Polar bears and brown bears. B-huskies and wolves. C-caribou and moose. D--tiny insects and spider like miles please help!!!!!please help me. did queen elizabeth kill her own daughter PLSSSSS HELP. DONT TRANSLATE, I REALLY NEED HELP NO LINKS PLS Please help correct answering get 20 points (physical science btw ) A roller coaster goes down a slope with a starting speed of 5 m/s then 6seconds later at the bottom of the slope the roller coaster is moving at aspeed of 27 m/s. What is the acceleration of the roller coaster? **Round to1 decimal place** a sqaure pieace of platic has sides that are 3 centimeter long. what is the platic pieace of teh area? answers A rectangular box has a height of 6yd length of 8 yards and width of 12yards Whats the volume? what are food nutrients??? SIMPLE ANSWERS ONLY! don't write me some long history of france or something PLEASE just give me a SIMPLE explanation on food nutrients! thx Why is James Madison known as the "Father of the Constitution"? A) He was the president of the Constitutional Convention. B) His plan formed the framework of the United States Constitution. C) He was the oldest delegate to the Constitutional Convention. When shading an object in a drawing, which type of line would be best to use?A.thinB.cross hatchedC.dottedD.curved Name one common base that is NOT harmful to the body when ingested AND a product, or way, in which it is used. How many grams of chlorine are required in order to consume 100g of sodium chloride? Choose A B C or DState if the triangles in each pair are similar. If so, state how youknow they are similarA) similar; SAS similarityC) not similarB) similar; SSS similarityD) similar, AA similarity