Write a program that accepts a list of integers and split them into negatives and non-negatives. The numbers in the stack should be rearranged so that all the negatives appear on the bottom of the stack and all the non-negatives appear on the top.

Answers

Answer 1

Answer:

The program is as follows:

n = int(input("List elements: "))

mylist = []; myList2 = []

for i in range(n):

   num = int(input(": "))

   mylist.append(num)

for i in mylist:

   if i >= 0:

       myList2.append(i)

for i in mylist:

   if i < 0:

       myList2.append(i)

print(myList2)

Explanation:

This gets the number of list elements from the user

n = int(input("List elements: "))

This initializes two lists; one of input and the other for output

mylist = []; myList2 = []

This is repeated for every input

for i in range(n):

Get input from the user

   num = int(input(": "))

Append input to list

   mylist.append(num)

This iterates through the input lists

for i in mylist:

If list element is non-negative

   if i >= 0:

Append element to the output list

       myList2.append(i)

This iterates through the input lists, again

for i in mylist:

If list element is negative

   if i < 0:

Append element to the output list

       myList2.append(i)

Print output list

print(myList2)


Related Questions

Mario is giving an informative presentation about methods for analyzing big datasets. He starts with the very basics, like what a big dataset is and why researchers would want to analyze them. The problem is that his audience consists primarily of researchers who have worked with big data before, so this information isn’t useful to them. Which key issue mentioned in the textbook did Mario fail to consider?

Answers

Answer:

Audience knowledge level

Explanation:

The Key issue that Mario failed to consider when preparing for her presentation is known as Audience knowledge level.  

Because Audience knowledge level comprises educating your audience with extensive information about the topic been presented. she actually tried in doing this but she was educating/presenting to the wrong audience ( People who are more knowledgeable than her on the topic ). she should have considered presenting a topic slightly different in order to motivate the audience.

What type of program allows a user to copy or back up selected files or an entire hard disk to another storage medium?

Answers

Answer:

backup utility

Explanation:

The trackpad/touchpad on my laptop is acting unusual. When I click on something or move to an area, it jumps or moves to another area. What would be a good troubleshooting step to try and resolve this issue?

a. Use a mouse instead

b. Remove all possible contact points, and test again while ensuring only a single contact point

c. Refer caller to user guides

d. increase the brightness of the display

Answers

Answer:

My best answer would be, "b. Remove all possible contact points, and test again while ensuring only a single contact point"

This is because usually when the cursor jumps around without reason, it's caused by the user accidentally hitting the mouse touchpad on his or her laptop while typing. ... Similarly, know that just because you have an external mouse attached to your laptop, the built-in mousepad is not automatically disabled.

Brainliest?

Analyzing the role of elements in audio editing and Video
+ analyzing the role of the visual element in Video + analyzing the role of text factor
+ analyzing the role of the audio factor
+ analyzing the role of the transfer scene
+ analysing the role of the audio visual effects

Answers

Answer:

Analyzing the role of elements in audio editing and Video

+ analyzing the role of the visual element in Video + analyzing the role of text factor

+ analyzing the role of the audio factor

+ analyzing the role of the transfer scene

+ analysing the role of the audio visual effect

Is" Python programming Language" really
worth studying? If yes? Give at least 10 reasons.

Answers

1. Python is a particularly lucrative programming language

2. Python is used in machine learning & artificial intelligence, fields at the cutting-edge of tech

3. Python is simply structured and easy to learn

4. Python has a really cool best friend: data science dilemma.

5. Python is versatile in terms of platform and purpose

6. Python is growing in job market demand

7. Python dives into deep learning

8. Python creates amazing graphics

9. Python supports testing in tech and has a pretty sweet library

10. There are countless free resources available to Python newbies

what is the difference between system software and application software

Answers

Explanation:

System software is meant to manage the system resources. It serves as the platform to run application software. Application software helps perform a specific set of functions for which they have been designed. Application software is developed in a high-level language such as Java, C++, .

Explanation:

Hope it's the write answer

Skunkworks appeared to have ________ task interdependence, while the Levittown builder seemed to have ________ task interdependence. Multiple Choice comprehensive; sequential pooled; comprehensive reciprocal; pooled sequential; reciprocal pooled; reciprocal

Answers

The article upon which the question is based on:

The Skunk Works home page describes this team best: "What do the world’s first stealth aircraft, the world’s most advanced fighters, and the world’s fastest manned aircraft have in common? They were all imagined by ‘Skunks’—some of the most innovative, strategic, and visionary thinkers around." Kelly Johnson was permitted to build an experimental engineering department in 1943, and the rest is history. The small-staffed unit was organized by integrating designers with builders, working together so that ideas were buildable, with limited visitors allowed from the outside. The impressive results are many, including the U-2, the world’s first spy plane, and the SR-71 Blackbird, the world’s fastest, highest-flying aircraft.

Answer:

1. comprehensive

2. sequential

Explanation:

Skunkworks appeared to have COMPREHENSIVE task interdependence, while the Levittown builder seemed to have SEQUENTIAL task interdependence.

This is based on the idea that Skunkworks acknowledges the powers of interaction and coordination of team members and while Levittown builders work on gradual working arrangement as one input of part A becomes the input of part B, and it goes on.

Describe the system unit​

Answers

Answer:

A system unit is the part of a computer that houses the primary devices that perform operations and produce results for complex calculations

5 Write full forms of the following: CPU b. MHz с. СВТ d. CAI e. ICU f. POS a. Write suitable technical term for the following statements. The continuously working capacity of computer without loos its speed and accuracy. b. The computer terminology, in which output is determined accord to the input The computer device used in hospitals that helps to main heartbeat of the patient. Opiemak The collection of eight bits or two Nibbles. C. I byte d. ng School Level Computer Science - 6​

Answers

Answer:

CPU = Central prossing Unit

Write a class of complex numbers consisting of:
-Properties:
• Real part of type double;
• Virtual part of type double.
- Method:
• default constructor, 2-parameter constructor;
• Full setter, getter for each variable;
• the print() function prints SoPhuc as a string in the format a + bi, where a is the real part, b is the imaginary part
-Write main() function:
• Create 2 SoPhuc objects
• Use class methods to enter information for 2 objects
• Use print() method to print information of 2 objects that have been created

Answers

Answer:

hi sorry for not knowing the answer

but please follow have a great day,night, or afternoon

, , and angle x and angle y are both in the first quadrant.

Answers

Answer:

[tex]\tan(x+y) = 3.73[/tex]

Explanation:

The missing part of the question are:

[tex]\sin(x) = \frac{1}{2}[/tex]

[tex]\cos(y) = \frac{\sqrt 2}{2}[/tex]

Required

[tex]\tan(x + y)[/tex]

First, we calculate [tex]\sin(y)[/tex] and [tex]\cos(x)[/tex]

We have:

[tex]\sin^2(x) + \cos^2(x) = 1[/tex]

So:

[tex](1/2)^2 + \cos^2(x) = 1[/tex]

Collect like terms

[tex]\cos^2(x) = 1 - (1/2)^2[/tex]

[tex]\cos^2(x) = 1 - \frac{1}{4}[/tex]

Take LCM

[tex]\cos^2(x) = \frac{4-1}{4}[/tex]

[tex]\cos^2(x) = \frac{3}{4}[/tex]

Square roots of both sides

[tex]\cos(x) = \frac{\sqrt 3}{2}[/tex]

Similarly,

[tex]\sin^2(y) + \cos^2(y) = 1[/tex]

So:

[tex]\sin^2(y)+(\sqrt 2/2)^2 = 1[/tex]

[tex]\sin^2(y)+ (2/4) = 1[/tex]

[tex]\sin^2(y)+1/2 = 1[/tex]

Collect like terms

[tex]\sin^2(y) = 1 - 1/2[/tex]

Take LCM

[tex]\sin^2(y) = \frac{2 -1}{2}[/tex]

[tex]\sin^2(y) = \frac{1}{2}[/tex]

Square roots of both sides

[tex]\sin(y) = \frac{1}{\sqrt2}[/tex]

Rationalize

[tex]\sin(y) = \frac{\sqrt2}{2}[/tex]

So, we have:

[tex]\sin(x) = \frac{1}{2}[/tex]           [tex]\cos(x) = \frac{\sqrt 3}{2}[/tex]

[tex]\cos(y) = \frac{\sqrt 2}{2}[/tex]        [tex]\sin(y) = \frac{\sqrt2}{2}[/tex]

[tex]\tan(x) = \sin(x) \div \cos(x)[/tex]

[tex]\tan(x) = \frac{1}{2} \div \frac{\sqrt 3}{2}[/tex]

Rewrite as:

[tex]\tan(x) = \frac{1}{2} * \frac{2}{\sqrt 3}[/tex]

[tex]\tan(x) = \frac{1}{\sqrt 3}[/tex]

Rationalize

[tex]\tan(x) = \frac{\sqrt 3}{3}[/tex]

Similarly

[tex]\tan(y) = \sin(y) \div \cos(y)[/tex]

[tex]\tan(y) = \frac{\sqrt 2}{2} \div \frac{\sqrt 2}{2}[/tex]

[tex]\tan(y) = 1[/tex]

Lastly,

[tex]\tan(x + y)= \frac{\tan(x) + \tan(y)}{1 - \tan(x) \cdot \tan(y)}[/tex]

[tex]\tan(x + y)= \frac{\frac{\sqrt3}{3} + 1}{1 - \frac{\sqrt3}{3} \cdot 1}[/tex]

[tex]\tan(x + y)= \frac{\frac{\sqrt3}{3} + 1}{1 - \frac{\sqrt3}{3}}[/tex]

Combine fractions

[tex]\tan(x + y)= \frac{\frac{\sqrt3+3}{3}}{\frac{3 - \sqrt3}{3}}[/tex]

Cancel out 3

[tex]\tan(x + y)= \frac{\sqrt3+3}{3 - \sqrt3}[/tex]

Using a calculator

[tex]\tan(x+y) = 3.73[/tex]

Imagine that you wanted to write a program that asks the user to enter in 5 grade values. The user may or may not enter valid grades, and you want to ensure that you obtain 5 valid values from the user. Which nested loop structure would you use?
A. A "for" loop inside of a "while" loop
B. A "while" loop inside of a "for" loop
C. None of the above
D. Either a or b would work

Answers

The type of nested loop which I would use to write the program is:

B. A "while" loop inside of a "for" loop

What is a Loop?

This refers to the control flow statement which is used to iterate and lets a particular line(s) of code execute repeatedly

With this in mind, we can see that the type of nested loop which I would use to write the program is a "while" loop inside of a "for" loop because it is a conditional statement that continues to ask for the certain valid grades until it gets the right one.

Therefore, the correct answer is option B

Read more about loops here:
https://brainly.com/question/26098908

cloud offers better protection compare to on premise?​

Answers

Why is cloud better than on-premise? Dubbed better than on-premise due to its flexibility, reliability and security, cloud removes the hassle of maintaining and updating systems, allowing you to invest your time, money and resources into fulfilling your core business strategies.

The security of the cloud vs. on-premises is a key consideration in this debate. Cloud security controls have historically been considered less robust than onprem ones, but cloud computing is no longer a new technology. . A company running its own on-premises servers retains more complete control over security.

Believe it!!

Pls follow me.

Write a program to print all odd numbers between 20 and 50(Qbasic)​

Answers


Source Code:

total = 0

FOR x = 20 TO 50 STEP 2
total = total + x
NEXT x

PRINT "Total=";total

An error due to wrong input by the user

Answers

Answer:

when did it take place..

Write an algorithm to solve general formula? ​

Answers

Answer:

2+2=4

Explanation:

simple math cause of that bubye

What are the differences between sequential and random files? Which one do you think is better and why?

Answers

Answer:

Sequential is better

Explanation:

Sequential is more organized while the more easier to make but less dependable one is random.

sequential is used for things such as date of birth, or where someone was born.

you can't do that with a random file.

1. For this assignment you will print the steps for 8-bit by 8-bit multiplication.
2. Your program should read in two unsigned numbers from stdin, the first being the multiplicand and the second being the multiplier. Your program should verify that both values are within the range 0 to 255. If not, the program should print an appropriate error message and exit.
3. Your program should then initialize the simulated registers and echo the input values in decimal and also in binary.
4. Then your program should illustrate the eight steps required for multiplication using the same type of step diagrams as given in the lecture notes.
5. Finally, your program should print a check section that shows a summary of the multiplication in binary as well as in decimal. See the example below.
6. You may write your program in C, C++, or Java. If you choose to work in C, here is an example function that will allow you to represent an n-bit value within an int data type and print out the binary value in "length" bits. It uses the shift right operator and the bitwise and. (You can also choose to use unsigned int as the data type; since you are using only the lower 8 of the 32 bits in an int, there will be no apparent difference between using int and using unsigned int. However, if you choose to use char as the data type, you should use unsigned char to ensure that the compiler generates logical rather than arithmetic shifts.)
void prt_bin( int value, int length ){
int i;
for( i=(length-1); i>=0; i--){
if((value>>i)&1)
putchar('1');
else
putchar('0');
}
}
For example, if you declare acc as an int, then you could call prt_bin(acc,8) to print the 8-bit value in the accumulator.
You should format your output to exactly match the output below. 10% of the grade will be awarded for following the same format.
Sample Run is given below:
multiplicand: 33
multiplier: 55
c and acc set to 0
mq set to multiplier = 55 decimal and 00110111 binary
mdr set to multiplicand = 33 decimal and 00100001 binary
---------------------------------------------------
step 1: 0 00000000 00110111
+ 00100001 ^ add based on lsb=1
----------
0 00100001 00110111
>> shift right
0 00010000 10011011
---------------------------------------------------
step 2: 0 00010000 10011011
+ 00100001 ^ add based on lsb=1
----------
0 00110001 10011011
>> shift right
0 00011000 11001101
---------------------------------------------------
step 3: 0 00011000 11001101
+ 00100001 ^ add based on lsb=1
----------
0 00111001 11001101
>> shift right
0 00011100 11100110
---------------------------------------------------
step 4: 0 00011100 11100110
+ 00000000 ^ no add based on lsb=0
----------
0 00011100 11100110
>> shift right
0 00001110 01110011
---------------------------------------------------
step 5: 0 00001110 01110011
+ 00100001 ^ add based on lsb=1
----------
0 00101111 01110011
>> shift right
0 00010111 10111001
---------------------------------------------------
step 6: 0 00010111 10111001
+ 00100001 ^ add based on lsb=1
----------
0 00111000 10111001
>> shift right
0 00011100 01011100
---------------------------------------------------
step 7: 0 00011100 01011100
+ 00000000 ^ no add based on lsb=0
----------
0 00011100 01011100
>> shift right
0 00001110 00101110
---------------------------------------------------
step 8: 0 00001110 00101110
+ 00000000 ^ no add based on lsb=0
----------
0 00001110 00101110
>> shift right
0 00000111 00010111
---------------------------------------------------
check: binary decimal
00100001 33
x 00110111 x 55
---------------- ------
0000011100010111 1815

Answers

Answer:

Code:

#include<bits/stdc++.h>

using namespace std;  

char* prt_bin( int value, int length, char s[]){

   for(int i=(length-1); i>=0; i--){

     if((value>>i)&1) {

       s[length-1-i] = '1';  

       // putchar('1');

     }

     else {

       s[length-1-i] = '0';  

       // putchar('0');

     }

   }

   s[length] = '\0';

   return s;

}  

int main(){

     int nbits = 8, c, acc;

     char s[nbits+1];

    int multiplicand, multiplier, mq, mdr;  

   cout<<"Multiplicand: ";

   cin>>multiplicand;

   cout<<"Multiplier: ";

   cin>>multiplier;

 

    if(multiplier<0 || multiplier>255 ||multiplicand<0 || multiplicand>255){

    cout<<"Given Multiplicand or multiplier is incorrect. Exiting the program.\n";

       return 0;

   }  

   c = 0; acc = 0;

      cout<<"c and acc set to 0\n";

   mq = multiplier;

   mdr = multiplicand;

   cout<<"mq set to multiplier = "<<multiplier<<" decimal and "<<prt_bin(multiplier, nbits, s)<<" binary\n";

   cout<<"mdr set to multiplicand = "<<multiplicand<<" decimal and "<<prt_bin(multiplicand, nbits, s)<<" binary\n";

   

   printf("---------------------------------------------------\n");

    for(int i=1;i<=nbits;i++){

       printf("step %d: %d %s ",i, c, prt_bin(acc, nbits, s));

       printf("%s\n",prt_bin(mq, nbits, s));

       char lsb = s[nbits-1];  

       if(lsb=='1'){  

           printf("     + %c %s    ^add based on lsb=%c\n", c, prt_bin(mdr, nbits, s), lsb);

           printf("      ----------\n");

           acc = acc + multiplicand;

       }  

       else{

           printf("     + %c %s    ^no add based on lsb=%c\n", c, prt_bin(0, nbits, s), lsb);

           printf("      ----------\n");

       }  

       printf("      %d %s ", c, prt_bin(acc, nbits, s));

       printf("%s\n",prt_bin(mq, nbits, s));  

       printf("     >>          shift right\n");  

       mq = mq>>1;  

       if(acc%2==1){

           mq = mq+128;

       }  

       acc = acc>>1;  

       printf("      %d %s ", c, prt_bin(acc, nbits, s));

       printf("%s\n",prt_bin(mq, nbits, s));  

       printf("---------------------------------------------------\n");

   }  

   char sr[nbits*2+1];  

   printf("check:              binary   decimal\n");

   printf("                 %s        %d\n", prt_bin(multiplicand, nbits, s), multiplicand);

   printf("       x         %s  x     %d\n", prt_bin(multiplier, nbits, s), multiplier);

   printf("          ----------------    ------\n");

   printf("          %s      %d\n", prt_bin(multiplier*multiplicand, nbits*2, sr), multiplier*multiplicand);

   return 0;

}

#Write a function called find_median. find_median #should take as input a string representing a filename. #The file corresponding to that filename will be a list #of integers, one integer per line. find_median should #return the medi

Answers

Answer:

Explanation:

The following is written in Python. It takes in a file, it then reads all of the elements in the file and adds them to a list called myList. Then it sorts the list and uses the elements in that list to calculate the median. Once the median is calculated it returns it to the user. The code has been tested and the output can be seen in the image below.

def find_median(file):

   file = open(file, 'r')

   mylist = []

   for number in file:

       mylist.append(int(number))

   numOfElements = len(mylist)

   mylist.sort()

   print(mylist)

   if numOfElements % 2 == 0:

       m1 = numOfElements / 2

       m2 = (numOfElements / 2) + 1

       m1 = int(m1) - 1

       m2 = int(m2) - 1

       median = (mylist[m1] + mylist[m2]) / 2

   else:

       m = (numOfElements + 1) / 2

       m = int(m) - 1

       median = mylist[m]

   return median

print("Median: " + str(find_median('file1.txt')))

Shawn's supervisor has tasked him with determining how the company can increase the security of its Wi-Fi. Shawn plans to present several options to his supervisor and ask her to check his work. Which of the following is not a strong security method? (Select TWO.)
a. Disabling SSID
b. WPS
c. MAC filtering
d. Setting encryption

Answers

Answer:

The not strong security methods are:

a. Disabling SSID

b. WPS

Explanation:

When you disable SSID, you only make your Wi-Fi secure for the less determined attackers.  By disabling the SSID (network name), those who are less technically inclined are prevented from connecting to the network but, this will not deter a more determined and technically savvy adversary.  The best two options are MAC filtering and setting encryption.  WPS (Wi-Fi Protected Setup) enables the process of connecting to a secure wireless network from a computer or other device easier instead of making it harder.

Using simplified language and numbers, using large font type with more spacing between questions, and having students record answers directly on their tests are all examples of _____. Group of answer choices universal design analytic scoring cheating deterrents guidelines to assemble tests

Answers

Answer:

universal design

Explanation:

Using simplified language and numbers, using large font type with more spacing between questions, and having students record answers directly on their tests are all examples of universal design.

Universal Design can be regarded as design that allows the a system, set up , program or lab and others to be

accessible by many users, this design allows broad range of abilities, reading levels as well as learning styles and ages and others to have access to particular set up or program.

it gives encouragment to the development of ICTS which can be

usable as well as accessible to the widest range of people.

what is incremental development and its importance in a project

Answers

Answer:

Incremental development in software engineering is a process methodology that emphasizes the virtue of taking small steps toward the goal.

Explanation:

Rather than delaying feedback until final delivery when time and resources have already been spent, incremental development ensures that teams can use feedback to make changes early and often.

The main importance of the Incremental model is that it divides the software development into submodules and each submodule is developed by following the software development life cycle process SDLC like Analysis, Design, Code, and Test.

Answer:

 incremental development is any combination of both iterative design or iterative method and incremental build model for development

Explanation:

importance

Incremental development ensures that developers can make changes early on in the process rather than waiting until the end when the allotted time has run out and the money has been spent.

An incremental approach breaks the software development process down into small, manageable portions known as increments. Each increment builds on the previous version so that improvements are made step by step

Compute the acceleration of gravity for a given distance from the earth's center, distCenter, assigning the result to accelGravity. The expression for the acceleration of gravity is: (G * M) / (d2), where G is the gravitational constant 6.673 x 10-11, M is the mass of the earth 5.98 x 1024 (in kg) and d is the distance in meters from the earth's center (stored in variable distCenter).
#include
using namespace std;
int main() {
double G = 6.673e-11;
double M = 5.98e24;
double accelGravity;
double distCenter;
cin >> distCenter;
/* Your solution goes here */
cout << accelGravity << endl;
return 0;
}

Answers

Answer:

Replace /* Your solution goes here */ with the following expression

accelGravity = (G * M) / (distCenter *distCenter );

Explanation:

Required

Complete the code

The equivalent expression of (G * M) / (d^2) is:

(G * M) / (distCenter *distCenter );

The expression must be stored in accelGravity.

So, we have:

accelGravity = (G * M) / (distCenter *distCenter );

I have a variable and set it equal to 5. 1 then send it as an argument to a function that adds 5 to the variable passed in. Outside the function print the variable (after the function executes).
What will it print?
A. 5+1
B. 4
C. 6
D. 5

Answers

Answer:

D. 5

Explanation:

If the variables original value was 5 then the value that will be printed is 5. This is because the variable is being passed as a parameter into the function and 5 is being added to the parameter value, not the actual global variable outside. Therefore, in order for the adjusted value to be printed then that new value that is returned by the function needs to be saved in a new variable. This can be seen in the example code below.

Does the estimate of a tolerance level of 68.26% of all patient waiting times provide evidence that at least two-thirds of all patients will have to wait less than 8 minutes?

Answers

Answer:

Yes, because the upper limit is less Than 8 minutes

Explanation:

According to the empirical formula :

68.26% of data lies within 1 standard deviation from the mean;

Hence,

Mean ± 1(standard deviation)

The sample mean and sample standard deviation of the given data is :

Sample mean, xbar = Σx / n = 546 / 100 = 5.46

Sample standard deviation, s = 2.475 (Calculator)

The interval which lies within 68.26% (1 standard deviation is) ;

Lower = (5.460 - 2.475) = 2.985

Upper = (5.460 + 2.475) = 7.935

(2.985 ; 7.935)

Since the interval falls within ; (2.985 ; 7.935) whose upper level is less than 8 means patients will have to wait less Than 8 minutes.

If you lose yellow from your printer, what would happen to the picture?

Answers

Answer:

The picture would be green.

Which of the following acronyms refers to a network or host based monitoring system designed to automatically alert administrators of known or suspected unauthorized activity?
A. IDS
B. AES
C. TPM
D. EFS

Answers

Answer:

Option A (IDS) is the correct choice.

Explanation:

Whenever questionable or unusual behavior seems to be detected, another alarm is sent out by network security equipment, which would be considered as Intrusion Detection System.SOC analysts as well as occurrence responders can address the nature but instead, develop a plan or take steps that are necessary to resolve it predicated on such notifications.

All other three alternatives are not related to the given query. So the above option is correct.

A new PKI is being built at a company, but the network administrator has concerns about spikes of traffic occurring twice a day due to clients checking the status of the certificates. Which of the following should be implemented to reduce the spikes in traffic?
A. CRL
B. OCSP
C. SAN
D. OID

Answers

Answer:

Option A (CRL) is the right answer.

Explanation:

Certificates with respective expiration date canceled mostly by CA generating or providing them, then it would no longer be tolerated, is considered as CRL.CRL verification could be more profitable for a platform that routinely manages several clients, all having pronouncements from a certain CA, because its CRL could be retrieved once per day.

Other given choices are not connected to the given scenario. So Option A is the right one.

Hi ! How can you return the value of the class computeDiscountInfo to the variable savings in the main class ?

Here is my code :

import java.util.Scanner;
public class RoomCost{
public static void main (String [] args){
double price;
double discount;
double savings;

Scanner keyboard = new Scanner(System.in);
System.out.print("Enter cutoff price for discount $>> ");
price = keyboard.nextDouble();
System.out.print("Enter discount rate as a whole number >> ");
discount = keyboard.nextDouble();
displayinfo();
//insert code to set the value returned from computeDiscountInfo method to savings);
// savings =
System.out.println("Special this week on any room over " + price);

System.out.println("Discount of " + discount + " percent");

System.out.println("That's a savings of at least $" + savings);
}
public static void displayinfo(){
System.out.println("We want your stay to be memorable.");

System.out.println("We promise to make you as comfortable as possible.");

}
public static double computeDiscountInfo(double price, double discountRate)

{

double savings;

//(insert code to calculate savings as price multiplied by discount divided by 100);
savings = (price * discountRate)/100;
return savings;
}


}

Answers

Answer:

savings = computeDiscountInfo(price, discount);

Explanation:

First of all computeDiscountInfo is a function, not a class.

You can call this function and assign its return value to a variable, savings in this example.

What hardware architectures are not supported by Red Hat?

Answers

It should be Macintosh I hope this help let me know if you have any questions
Other Questions
Bret wants to take an advert out in a newspaper. The page has a length of 36cm. An advert will take 1/3 of the length of the page. Bret says the advert needs to be 11cm in length. Is Bret correct? Show your working out and state a clear answer. Only one situation exists in which I would be ready to invest in penny stocks: if the money is extra and represents a very small percentage of my entire portfolio, and I am willing to lose it completely. This is because penny stocks are shares in young firms that are still in the early stages of development. The rate of return on these stocks can be enormous, but they can also go bankrupt, causing you to lose all of your money just as quickly. As a result, they're extremely hazardous investments. Felicia wants to build a kite with the shape shown. If AC is 60 cm, how many centimeters are in the length of BD? q: prepare an assignment on traditional agriculture methods & modern agriculture method also make diagrams associated with the topics. give detailed description of both the methods compare the Victoria Terminus with the Gateway of India? solve the inequality 4x ( 4 - x ) > 7 Which statements about wind are true? how to work this fraction 4/11+5/22+3/44 What is the value of x in the equation 5x+3=4x? 2) Define volume. Explain in detail how can volume of irregular object be determined? PLZ HELP NEED THIS RN According to an independent research, a point estimate of the proportion of U.S. consumers of black tea is p = 0.76. Calculate the sample size needed to be 95% confident that the error in estimating the true value of p is less than 0.015? Use the z-value rounded to two decimal places to obtain the answer. 4072.69 How did Mao Zedong affect the political landscape of China?A) he formed alliances with Japan and Korea in an effort to spread Marxist communism.B) he overthrew the existing authoritarian leadership and created a fascist dictatorship. C) He revived traditional Chinese government based on principles of Confucianism.D) he established a rural form of communism as an alternative to Soviet Leninism. Someone please explain this to me like you would a child thank you -2 (x+5):4Pliss es para hoy Ngy k nim thnh lp ng l ngy no? HELP PLEASE!!!!Find the length of BC.53.74B.96.95C.84.79D26.05 Mrs Solomon who was sitting behind the desk, gave me a big smile punctuate the followinh Identify the terminal point for a 45 angle in a unit circle.O A (231)O B.O c.V2 72 HELP ASAP!! Image point N'(12, -6) was dilated from the pre-image point N(4, -2). What was the scale factor used?A. 1/3B. 3 c. 1/4D. 4 What is Machiavelll's view of human nature? Your answer should be at least one hundred words.