The four smallest numbers (40 points) Write an ANNA assembly program (smallest_four.ac) that finds the four smallest numbers entered by the user. Initially, the program continually asks the user to enter numbers. As soon as a negative value is entered, compute which numbers are the top four (smallest) numbers. For instance, if the user entered 2, 6, 7, 6, 5, 7, 6, 17, 15 -1; the program should print 2, 5, 6, 6 (the four smallest numbers in the sequence). If the user enters a negative number at the beginning, print 0. If the user enters four or fewer numbers, print all the numbers as output.
Notes:
• The goal of this problem is to exercise storing, retrieving, and scanning the numbers stored in memory. Therefore, a solution where you keep track of the smallest four numbers in registers as the numbers are entered is not acceptable. Such a solution will receive a maximum of 15 points for this problem.
• Do not keep track of everything in the input loop. You will need to store all numbers entered by the user in memory.
• Store all numbers entered into a growing array. • Note that The array should be the last item in your data section so it can grow as large as necessary.
• You may assume there is enough memory to hold all numbers entered by the user.

Answers

Answer 1

Answer:

the answer is -25

Explanation:


Related Questions

mins_by_phone(phone): calculate and return the number of call minutes associated with the given phone line in this plan based on

Answers

Answer:

def mins_by_phone(phone):

   if phone in self.phones:

       min_sum = 0

       for call in calls:

           min_sum += call

           return min_sum

   else:

       return 0

Explanation:

The mins_by_phone function above is the Phone class method. It checks for the presence of the argument value in the self.phones instance variable, which is a list and  sums up and returns the call minutes in the call list.

A user creates a GPO. What do you need to do for that user to manage his or her GPO that he or she created?

Answers

Answer: Nothing should be done.

Explanation:

Group Policy helps in the provision of a centralized management of operating systems, and applications. It should be noted that a group policy object (GPO) is simply referred to as the configurations involving the group policy.

Nothing should be done to manage the GPO created. When the permission to create a GPO has been given to someone, it means that they can also manage the GPO therefore, nothing needs to be done anymore.

Write in Java:
Given a long integer representing a 10-digit phone number, output the area code, prefix, and line number using the format (800) 555-1212.

Ex: If the input is:
8005551212

the output is:
(800) 555-1212

Hint: Use % to get the desired rightmost digits. Ex: The rightmost 2 digits of 572 is gotten by 572 % 100, which is 72.

Hint: Use / to shift right by the desired amount. Ex: Shifting 572 right by 2 digits is done by 572 / 100, which yields 5. (Recall integer division discards the fraction).

For simplicity, assume any part starts with a non-zero digit. So 0119998888 is not allowed.

LabProgram.java:

import java.util.Scanner;

public class LabProgram {
public static void main(String[] args) {
Scanner scnr = new Scanner(System.in);
long phoneNumber;
// Add more variables as needed

phoneNumber = scnr.nextLong();

/* Type your code here. */
}
}

Answers

import java.util.Scanner;

public class LabProgram {

public static void main(String[] args) {

   Scanner scnr = new Scanner(System.in);

   long phoneNumber;

   phoneNumber = scnr.nextLong();

   long areaCode =  phoneNumber/10000000;

   long prefix = (phoneNumber/10000)%1000;

   long lineNumber = phoneNumber%10000;

   System.out.println("("+areaCode+")"+prefix+"-"+lineNumber);

}

}

I hope this helps!

do you think the governmentshould allocate moremoney to HIV/AIDS orphans​

Answers

Answer:

Abstract

Objective Through a descriptive study, we determined the factors that influence the decision-making process for allocating funds to HIV/AIDS prevention and treatment programmes, and the extent to which formal decision tools are used in the municipality of KwaDukuza, South Africa.

Methods We conducted 35 key informant interviews in KwaDukuza. The interview questions addressed specific resource allocation issues while allowing respondents to speak openly about the complexities of the HIV/AIDS resource allocation process.

Write the function which takes an arbitrary real number p , and returns true if the numeber is equals to some power of 2, i.e. p=2n for some n . Your task is to implement a recursive function power_of_2 withount using loops and library functions.

Answers

def power_of_2(p):

   if p == 2:

       return True

   elif p < 2:

       return False

   return power_of_2(p/2)

print(power_of_2(32))

The function keeps dividing the number by 2 until it is equal to 2 or the number ends up being less than 2. If at some point the number is equal to 2, it is a power of 2 otherwise it's not a power of 2.

When you pass a double variable to a method, the method receives ______.a) a copy of the memory addressb) the reference of the variablec) the length of the variabled) a copy of the variablee) the binary memory address

Answers

Answer:

The answer is "Option d".

Explanation:

In this question the choice d, that is "a copy of the variable" is correct because the method takes a reference value or a copy of the variable in its parameter, the example of this question can be defined as follows:

void me2(double x)//defining a method me2 with a double parameter

{

//method body

 }

double x = 35.655;//defining a double variable x

me2(x);//calling a method with passing the copy of th e variable

Looking at the response vehicles (pictured above), explain two options you have in order to abide by the Move Over law,

Answers

Answer: two options I have in order to abide by the move over law is to either move over or slow down. You must move over a lane away from stationary emergency vehicles if it is safe to do so. If it is not safe to do so then the driver must proceed with due caution, with a safe speed for road conditions.Until the driver has passed the emergency vehicle.

Explanation:Let me know if this helped! (:

Answer:

two possible options in order to abide by the move over law would be to either move over to a different lane (one lane away or more) or slow down.

Explanation:

in the middle of the iteration, how should a team handle requirement changes from the customer

Answers

Answer:

Team may take up the changes in flight after discussing the overall impact with the Product owner

Explanation:

In the middle of the iteration, one of the best ways a team should handle requirement changes from the customer is to take up the changes in flight after discussing the overall impact with the Product owner.

This will make the customer well aware of the advantages and disadvantages that come with changes in the requirement, such that, the customer will be surprised about the final outcome of the iteration.

a document contains a list of items that appear in no particular order. what is the best way to format the list

Answers

Answer:

bulleted list

Explanation:

Bulleted list is the best way to format the list. As a document contains a list of items that appear in no particular order.

What is meant by Bulleted list?

A bullet list is simply a list of items with dotted dots separating each item and a heading at the top. These lists are flexible and may be used for whatever you need them for, from something as informal as an agenda to something as serious as a business strategy for your place of business.

A bullet list is used when making a list of two or more items, where the order of the items is not important. A retailer may display a list of items you want to buy in the form of a bullet list, for example.

Use a number list if you're composing a list of actions or instructions when the order is important.

Thus, it is Bulleted list.

For more details about Bulleted list, click here:

https://brainly.com/question/17359798

#SPJ2

You are troubleshooting an issue where a PC can reach some hosts on the Internet (using either DNS name or IP address), while several other hosts on the Internet are not reachable. From the PC you can Ping all devices on your local subnet. What is most likely causing the problem?

Answers

The options are missing from the question,below are the options to choose from;

A) incorrect (or missing) routes in a routers routing table

B) incorrect DNS configuration on the PC

C) incorrect default gateway configuration on the PC

D) duplicate IP addresses on your LAN

Answer: The correct answer to the question is option A

INCORRECT (OR MISSING) ROUTES IN A ROUTERS ROUTING TABLE.

Explanation: When it is possible for a PC to ping some devices but not actually all,we can then make an assumption that either it has a wrong subnet that is configured or the router from the path to the remote device actually has an incorrect or a missing routes to the device.

How can we tell the computer what to put on the web page, and how to organize it?​

Answers

Answer:

[tex]\boxed {\boxed {\sf Code}}[/tex]

Explanation:

Humans communicate with computers through code.

For web pages, HTML (HyperText Markup Language) is used.

A person writes the code to tell a computer what to display and how to structure the displayed information. You can create webpages with any information, add pictures, links, headings, paragraphs, change fonts, and more, all through the use of code.

Input an int between 0 and 100 and print the numbers between it and 100, including the number itself and the number 100. If the number is less than or equal to 0, or greater than or equal to 100 print "error". Print 20 numbers per line.
Language: Java

Answers

import java.util.Scanner;

public class JavaApplication42 {

   public static void main(String[] args) {

       Scanner scan = new Scanner(System.in);

       int count = 0;

       System.out.println("Enter an integer between 0 and 100");

       int num = scan.nextInt();

       if (num <= 0 || num >= 100){

           System.out.println("error");

       }

       else{

           while(num <= 100){

               if (count == 20){

                   System.out.println("");

                   count = 0;

               }

               else{

                   System.out.print(num+" ");

                   count++;

                   num++;

               }

           }

       }

   }

   

}

I hope this helps!

The pentagonal number is an illustration of loops.

Loops are used to perform repetitive operations

The program in Java where comments are used to explain each line is as follows:

import java.util.*;

public class Main {

   public static void main(String[] args) {

       //This creates a Scanner object

       Scanner input = new Scanner(System.in);

       //This gets input for num

       int num = input.nextInt();

       //This prints error is num is out of range

       if(num <=0 || num >= 100){

           System.out.print("Error");

       }

       else{

       //This initializes counter to 0

       int count = 0;

       //This iterates through num

       for (int i = num; i <= 100; i++) {

           //This prints the current number

           System.out.print((i)+"\t");

           //This increments the counter by 1

           count++;

           //If the counter is 10

           if(count == 10){

               //This prints a new line

               System.out.println();

               //This sets the counter to 0

               count = 0;

}

}

}    

}

}

Read more about loops at:

https://brainly.com/question/19344465

The page-replacement policy means that pages are not placed to make more space. A. True B. False

Answers

Answer:

B. False

Explanation:

A page-replacement policy can be defined as a set of algorithm that instructs the operating systems on what memory page is to be swapped, paged out or written to disk in order to allocate more memory as they're required by various active processes during virtual memory management.

Some of the algorithms or techniques used by the operating system for page-replacement policy are;

1. Last In First Out (LIFO).

2. First In First Out (FIFO).

3. Least Recently Used (LRU).

4. Least Frequently Used (LFU).

5. Optimal (OPT or MIN).

Hence, the page-replacement policy means that pages are placed to make more space and to minimize the total number of page that would be missing.

The answer to this question is false.

This is due to the fact that the page-replacement policy helps to decide the pages of memory that needs to be paged out or swapped out.

This becomes necessary at a time when it is necessary for the allocation of a memory page.

It helps the operating system to know the memory space that can be moved out in order to know what space can be made available for the current page.

Read more on https://brainly.in/question/7169703

Write a program that computes the minimum, maximum, average, median and standard deviation of the population over time for a borough (entered by the user). Your program should assume that the NYC historical population data file, nycHistPop.csv is in the same directory.

Answers

Answer:

import pandas as pd

df = pd.read_csv('nycHistPop_csv', skiprows=5)

NY_region = list(df.columns[1: -1])

select_region = input("Enter region: ")_capitalize()

if select_region in NY_region:

   pass

else:

   raise("Region must be in New york")

def pop(location):

   # or used describe() to replace all like: print(df[location]_describe())

   print(df[location]_min())

   print(df[location]_max())

   print(df[location]_mean())

   print(df[location]_median())

   print(df[location]_td())

pop(select_region)

Explanation:

Pandas is a python packet that combines the power of numpy and matplotlib used for data manipulation. It is good for working with tables that are converted to dataframes.

The nycHistPop_csv file is read to the code to a dataframe called "df", then the user input and the function "pop" is used to automatically generate the statistics of a given region.

What are the three categories of managerial decisions?

Answers

                                Top 3 levels of management

Strategic Production Planning

Technology decision

Capacity decisions

What is the main advantage of using a WYSIWYG("what you see is what you get")editor when constructing a website
A.only one programming language is required
B.websites may have more professional construction
C.knowledge of HTML is not required
D.Website templates are not necessary

Answers

Answer:

c

12121212121212121212121212121221212121212121212

I have no idea, any help is appreciated.

Answers

Answer:

A

Explanation:

How do I explain it.... well the analogy shows the circle in the middle of the parallelogram, then the next shows the circle bigger than the parallelogram and the parallelogram with lines in it.

So you do the same to the triangle with a square and there you go!

Answer:

A - the first one is correct.

Explanation:

Hope this Helps!

:D

1) ¡(X && Y )&& !X || W && Z

2) W || !(X || Z && Y)

3) !X || !Y || Z && X && !Y

4) X || Y || X && !Z && !Y

Answers

Answer:

???

Explanation:

Answer:

uhh

Explanation:

you spammed random stuff?

What is the difference between a spreadsheet and word processing software?

Only one can calculate numeric data.
Only one can display graphs and charts.
Only one can organize data.
Only one can present text and numeric data.

Answers

Answer:

Only one can calculate numeric data.

Explanation:

Both spreadsheet and word processing software can display graphs and chats.

Both spreadsheet and word processing software can organize data through cells and tables respectively.

Both spreadsheet and word processing software can present text and numeric data.

Answer:

Only one can calculate numeric data.

Explanation:

Help very please??????

Answers

Answer:

Z = 100

C = 200

School = "Emirates American School"

print(Z,C,School)

x = 5

y = 5

output = (x == y)

print(output)

txt = "I study at {}"

print(txt.format(School))

print(School.upper())

if anyone has a x box and r o b l o x and would like to help me get money please give me your x box name thank you

Answers

Answer:

wait money-!?

Explanation:

Answer:

oh to have a x box ;-;

Explanation:

Q1 To remove filter

Option1: Click the Filter option of the Sort & Filter button in the Editing group on the HOME

Option2: Click the Filter option in the Sort & Filter group on the DATA tab.

Option3: Both 1 and 2

Option4: Pres DELETE​​

Answers

Answer:

Click DATA, Look for "Sort & Filter", Click Filter Box (right above "Sort & Filter"). Done.

Answer:

add a picture pls

Explanation:

We wish to produce a graphic that is pleasing and easily readable. Suppose we
make the background color pink. What color text font should we use to make
the text most readable? Justify your answer.Assume that the color Pink is obtained by mixing equal amounts of Red and White. Use the RGB color model and assume that the amount of each primary color in the model is described in the interval [0 255]. Describe the color of the text font you would choose using these conventions.

Answers

Answer:

light color

Explanation:

When we will mix equal amounts or equal quantities of the color red and the color white, we will get the color reddish pink. It is popularly called as the SOFT RED and the color code of this color is RGB (255, 128, 128).

Since, red color + white color = 0.5 RGB(255, 0, 0) + 0.5RGB(255, 255, 255)

                                                 = RGB (255, 128, 128)

According to me, the color white will best suit as the text color that can be used for a background having RGB(255, 128, 128). Because the color looks more red and not that pink, so it wise to use a light tone color for the natural reading purpose. Hence, it will not give strain to the eyes.

Right now I have an i5 2400 and a PYN XLR8 gaming GTX 1650 Super, my CPU is too weak for 1080p gaming, what CPU should I get that has a B75 LGA 1155 socket, or Overclock it if so how many GHz should I overclock it to
(I only have a stock cooler)

Answers

Answer:

if its a number you need 5600GHz but im not to sure

Explanation:

Answer:

answer

Explanation:

if it a number you need 5600GHz but it not I'm not sure

what CSS properties will you need for your page

Answers

Answer:

border-radius.

box-shadow.

text-shadow.

text-stroke.

Multiple Backgrounds.

background-size.

text-overflow.

Flexible Box Model.

Explanation:

You need to be familiar with at least some of these kinds of CSS.

Some of the arguments are valid, whereas others exhibit the converse or the inverse error. Use symbols to write the logical form of each argument. If the argument is valid, identify the rule of inference that guarantees its validity. Otherwise, state whether the converse or the inverse error is made. If this computer program is correct, then it produces the correct output when run with the test data my teacher gave me. This computer program produces the correct output when run with the test data my teacher gave me.



This computer program is correct.

Let p = "this computer program is correct," and let q = "this computer program produces the correct output when run with the test data my teacher gave me." Is the argument valid or invalid? Select the answer that shows the symbolic form of the argument and justifies your conclusion.

Answers

Hi, you've asked an incomplete/unclear question. I inferred you want a symbolic representation and validity of the argument mentioned.

Answer:

argument is valid

Explanation:

Let's break down the arguments into parts:

Let,

p = "if this computer program is correct,"

q = "this computer program produces the correct output when run with the test data my teacher gave me."

c = "This computer program is correct."

Meaning, p ⇒ q (p results in q), then we can conclude that,

(p ⇒ q ) ∴ ⇒ c

However, the correct converse of the statement is:

If this computer program produces the correct output when run with the test data my teacher gave me, then the computer program is correct,"

q ⇒ p (If q then p)

While the correct inverse of the statement is:

If this computer program is not correct, then this computer program does not produce the correct output when run with the test data my teacher gave me."

What is the purpose of the Microsoft® PowerPoint® application? to design publications such as newsletters and brochures to create documents such as business letters and resumés to develop presentations for business meetings to design a company employee database

Answers

Answer:

The first one

Explanation:

The main purpose of MS PowerPoint is to enable the user to create dynamic, informational slides through the use of text, graphics, and animation.

The purpose of PowerPoint is to act as a visual aid as a presenter goes along presenting their option, ideas, sales pitch, etc. Make sure to not make your slides too wordy and concentrate on adding only basic bullet points.

Answer:

to develop presentations for business meetings

Explanation:

Any of the other options will be used in Word, Excel and Publisher.

But Power Point is mainly for presentations and not newsletters and other.

Python rephactor

1. Write code that swaps the first and last elements in a list called my_list. Assume that the list has already been created and contains at least one element.

2.Write code that creates a Python set containing each unique character in a string named my_string. For example, if the string is 'hello', the set would be {'h', 'e', 'l', 'o'} (in any order). Assign the set to a variable named my_set. Assume that my_string has already been initialized.

Answers

1.

my_list = ([1,2,3,4,5])

h = my_list[-1]

my_list[-1] = my_list[0]

my_list[0] = h

print(my_list)

2.

my_string = "hello"

my_set = set(my_string)

print(my_set)

The list has already been created and contains one element. The python set of my string has been already initiated.

What is python set?

Python set is defined as a data type for unordered collections that is iterable, changeable, and lacks duplication of elements. There are essentially two sorts of sets in Python. the frozenset and the set. Whether the frozenset is changeable or not depends on the set type. On a set, we can use add(), remove(), and other operations of this nature; however, frozenset does not support these actions.

The program is

your list = ([1,2,3,4,5])

my list[-1] = h

MyList[-1] equals MyList[0]

h print(my list, "my list");

"hello" is my string

set(my string) my set

print(my set)

Thus, the list has already been created and contains one element. The python set of my string has been already initiated.

To learn more about python set, refer to the link below:

https://brainly.com/question/14936500

#SPJ5

Write a method named printGPA that takes in as a parameter a Scanner to read in user input, and calculates a student's grade point average. The user will type in input containing the student's name, then a number of scores, followed by that many integer scores. Then, the method will print out the average of all grades entered. Here are two example dialogues: Enter a student name: Maria Enter the number of courses: 5 Course 1 Grade: 72 Course 2 Grade: 91 Course 3 Grade: 84 Course 4 Grade: 89 Course 5 Grade: 78 Maria's grade is 82.8 Enter a student name: Jordan Enter the number of courses: 4 Course 1 Grade: 86 Course 2 Grade: 71 Course 3 Grade: 62 Course 4 Grade: 90 Jordan's grade is 77.25

Answers

import java.util.Scanner;

public class JavaApplication40 {

   public static  void printGPA(Scanner scan){

       System.out.println("Enter a student name:");

       String name = scan.nextLine();

       System.out.println("Enter the number of courses:");

       int courses = scan.nextInt();

       double total = 0;

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

           System.out.println("Course "+i+" Grade:");

           double grade = scan.nextDouble();

           total += grade;

       }

       System.out.println(name+"'s grade is "+(total/courses));

   }

   public static void main(String[] args) {

       Scanner scan = new Scanner(System.in);

       printGPA(scan);

   }

   

}

I hope this helps!

2. Write the output of:
a) CLS
A= 10
B = 20
C = 30
S=A+B+C
Av=S/3
Print "sum is:",s
Print "Average is:", Av
End​

Answers

sum is 60 (add a b and c together)
average is 20 (divide 60 by 3)
Other Questions
Andrew is descending 57 feet underwater while scuba diving. If he descends at a rate of 3 feet per second, how many seconds will it take Andrew to descend the full distance? Whats the surface area of 200 square inches ? What's the difference between Venezuela's Cultural and Argentina's Cultural Justin played video games for the following amount of time this past week 42 mins, 35 mins, 28 mins, 55 mins, and 57 mins what was the median amount of time justin played video games this past week PLEASE HELP :( Mario is spending the day at the county fair. The admission ticket costs $10.00. Each ride ticket costs $2.50.Which equation can be used to find y, the total cost of Marios day at the fair, given x represents the number of ride tickets he purchases?y = 2.50x + 10y=2.50(x+10)y = 10x + 2.50y=2.50x10 what were hebrews and what was there religion what is the slope and the y-intercept for the equation y = -3 + 6x? 00:00 The product of 64 and 13 can be rewritten as the sum of two products. Which expression is equal to 64 x 13? A. (60 x 13) + (60 x 4) B. (10 x 60) + (4 x 3) O C. (60 x 13) + (4 x 13) O D. (60 x 1) + (60 x 4) Which statement includes the same information presented in the article and in the map? Complete the equation of the line through (3,-8)(3,8)left parenthesis, 3, comma, minus, 8, right parenthesis and (6,-4)(6,4)left parenthesis, 6, comma, minus, 4, right parenthesis. Chocolate: The New Health Food Now you can stop feeling guilty about that bite of chocolate you had for dessert. Chocolate has been found to be a cause of weight gain. But scientists have discovered that it does have some health benefits. However, dont reach for that chocolate cake just yet. Researchers found that only people who ate about one ounce of dark chocolate per day received the health benefit. Dark chocolate is full of flavonoids, which help prevent diseases. Flavonoids have been found to decrease cholesterol and reduce blood clots that can cause strokes. Flavonoids also boost a natural chemical in your brain called serotonin. Low serotonin can cause depression. Thats probably why eating chocolate boosts mood and feelings of well-being. Chocolate: A Bittersweet Pill Many new studies have found that chocolate has some unexpected health benefits. But before we start calling chocolate the new wonder food, lets look at the facts. These so-called health benefits dont beat the risks of eating too much chocolate. Chocolate is rich in fats and sugar. Eating too much of it can lead to weight gain. Other studies have shown that eating chocolate can trigger painful headaches in some people. In addition, chocolate can increase the risk of developing painful kidney stones in some people. Plus, only dark chocolate has health benefits, not milk chocolate. White chocolate also has no health benefits. 3 Select the correct answers. Which two points do the two passages agree on? Chocolate can boost feelings of well-being and lower depression. Dark chocolate has some health benefits. Eating chocolate in large amounts is good for health. Chocolate can cause weight gain. Eating chocolate can cause headaches in some people. The most effective tool for making a project schedule is a ____________ .A.) notebook B.) calculatorC.) canlender D.) graph A pharmacologist measured the concentration of dopamine in the brains of several rats. The mean concentration was 1,269 ng/gm and the standard deviation was 145 ng/gm.4 What was the standard error of the mean if:_______.(a) 8 rats were measured?(b) 30 rats were measured? I NEED HELP!Who wrote the Virginia Statute for Religious Freedom? Question 1 of 10Which of the following instruments is usually tuned to the notes E-A-D-G-B - E? One possible solution to a diminishing Social Security payroll is to decrease the Social Security benefit by 13%. Howwould such a decrease effect the benefits on a salary of $54,000?a. Benefit would decrease by $1,404 annually.b. Benefit would decrease by $7,020 annually.. Benefit would decrease by $8,640 annually.d. Benefit would decrease by $15,660 annually. A weighted coin has a 0.599 probability of landing on heads. What is the probability that it takes 5 flips for the first head to occur? Is there a triangle whose angles have these measures in degrees?A) YesB) No explain the purpose of rhetorical devices in writing. please help me its a sentence or paragraph Step 1: Review the scene from the play. a) Review the scene you read during the lesson. b) Pay attention to the plays setting, characters, and plot. c) Read the questions on the Viewing Guide to help you know what to look for. Step 2: View the scene from the film. a) Take notes about similarities you see between the play and the film. b) Take notes about differences you see between the play and the film. Step 3: Write to compare the play with the film. a) Use your notes to complete the Viewing Guide. Be sure to write in complete sentences and use appropriate grammar. b) When you have completed your assignment, return to the Virtual Classroom and use the Browse for file option to locate and submit your assignment. Congratulations! You have compared the play with a filmed version of it.