A programmer for a weather website needs to display the proportion of days with freezing temperatures in a given month.


Their algorithm will operate on a list of temperatures for each day in the month. It must keep track of how many temperatures are below or equal to 32. Once it's done processing the list, it must display the ratio of freezing days over total days.
Which of these correctly expresses that algorithm in pseudocode?
A.
numFreezing ← 0

numDays ← 0

FOR EACH temp IN temps {

IF (temp ≤ 32) {

numFreezing ← numFreezing + 1

}

numDays ← numDays + 1

DISPLAY(numFreezing/numDays)

}

B.
numFreezing ← 0

numDays ← 0

FOR EACH temp IN temps {

IF (temp ≤ 32) {

numFreezing ← numFreezing + 1

}

numDays ← numDays + 1

}

DISPLAY(numFreezing/numDays)

C.
numFreezing ← 0

numDays ← 0

FOR EACH temp IN temps {

IF (temp < 32) {

numFreezing ← numFreezing + 1

}

numDays ← numDays + 1

}

DISPLAY(numFreezing/numDays)

D.
numFreezing ← 0

numDays ← 0

FOR EACH temp IN temps {

IF (temp ≤ 32) {

numFreezing ← numFreezing + 1

numDays ← numDays + 1

}

}

DISPLAY(numFreezing/numDays)

Answers

Answer 1

Answer:

B.

Explanation:

The correct Pseudocode for this scenario would be B. This code makes two variables for the number of total days (numDays) and number of freezing days (numFreezing). Then it loops through the entire data set and checks if each temp is less than or equal to 32 degrees. If it is, it adds it to numFreezing, if it is not then it skips this step, but still adds 1 to the total number of days after each loop. Once the entire loop is done it prints out the ratio, unlike answer A which prints out the ratio for every iteration of the loop.

numFreezing ← 0

numDays ← 0

FOR EACH temp IN temps {

IF (temp ≤ 32) {

numFreezing ← numFreezing + 1

}

numDays ← numDays + 1

}

DISPLAY(numFreezing/numDays)


Related Questions

Can anyone help me solve this?

Answers

Answer:

what should be basically be done in this question?

that’s not a question

Need an answer as soon as possible please!


The lesson discusses ten "best practices" for digital recordings. Identify three of them and explain why they are important for ensuring a quality product.


(For a Digital Media Course)

Answers

Solution :

Digital recording may be defined as the preservation of an audio or some visual signals like the series of a binary numbers which can be stored on a magnetic tape or on an optical disc or some other digital storage media.

Some of the best practices for doing digital recording are :

1. We should always take permission from those who are being recorded. It is not right to shoot others without their permission. It is against the right to privacy.

2. We should record audio at about 44.1 kHz/16 bit in an uncompressed wave format.

3. A High quality MP3 (192 kbps or higher) is often accepted due to the limitations of a recorder or for a storage space.

The MP3 recordings are considered as the best option for certain recorders  and when the storage space is severely limited. It produces a good quality recording.

in a dark place you have only a match , a twig , campfire logs , and oil lamp and a candle which do you literally first /
a twig
a campfire
none of the above

Answers

Answer:

You would use a twig first :)

Explanation:

Answer:

The glowing embers from the crackling campfire lit up the nighttime sky.

Explanation:

Given a string, an integer position, and a character, all on separate lines, find the character of the string in that position and replace it with the character read. Then, output the result.

Ex: If the input is:

warn

0

e

the output is:

earn

Note: Using a pre-defined string function, the solution can be just one line of code.​

Answers

Answer:

The program in Python is as follows:

myStr = input()

pos = int(input())

chrr = input()

myList=[]

myList[:0]=myStr

myList[pos] = chrr

myStr =""

for i in myList:

   myStr+=i

print(myStr)

Explanation:

This gets input for the string

myStr = input()

This gets input for the character position

pos = int(input())

This gets input for the incoming character

chrr = input()

Create an empty list

myList=[]

Convert the string to a list

myList[:0]=myStr

Replace the character

myList[pos] = chrr

Empty the string

myStr =""

Get the new string

for i in myList:

   myStr+=i

Print the new string

print(myStr)

Following are the C++ program to replace the first index value of the string.

Program Explanation:

Defining header file.Defining the main method.Inside the main method three variable "Sval, Spos, Subchar" is declared in which "string, int, and char".After input variable value a string variable is declared with the at (method), which replaces the first index value with the character value.After replacing the first index value that is "0" use the prints method that prints its value.

Program:

#include <iostream>//header file

#include <string>//header file

using namespace std;

int main() //main method

{

 string Sval;//defining string variable

 int Spos;//defining integer variable

 char Subchar;//defining char variable

 cin>>Sval>>Spos>> Schar;//input value

 Sval.at(Spos)  =  Subchar; //using string variable that replaces the first index value with the character value

 cout << Sval << endl;//printing the replaced value

 return 0;

}

Output:

Please find the attached file.

Learn more:

brainly.com/question/24494143

There are eight primitive data types in Java. If the the size of 4 different datatype sizes are as follows then what is maximum value they can store? Show using the chart as in our example.

Answers

Answer and Explanation:

The eight primitive data types in Java include:

byte , short , int , long , float , double , boolean and char.

By size of datatype we mean the amount of memory the data type occupies. For a 32-bit processor/CPU,

The size of int data type(with whole numbers from -2,147,483,648 to 2,147,483,647) in Java is 4 bytes

The size of byte data type is 1 byte

The size of short data type is 2 bytes

The size of long data type is 8 bytes

Q4. What is one of the benefits of using a library in a program?

Answers

Answer:

Simplifies creating a complex program

Explanation:

What is the primary function of RAM?


What is the basic unit of measurement for RAM specs?


A computer with sufficient RAM will be able to

with greater ease.


What can you do if a computer is running slowly and you suspect it is because you have insufficient

RAM?


How many bits are in one computer byte?





those questions have a drop-down box.

Answers

Answer :

1 . Stores Information temporarily

2 . byte

3 . switch between applications

4 . upgrade the RAM

5 . 8

JUST DID IT (Edge 2021)

an_is a sepuence of precise instructions which result in a solution​

Answers

Answer:

algorithm.

Explanation:

An algorithm can be defined as a standard formula or procedures which comprises of set of finite steps or instructions for solving a problem on a computer. The time complexity is a measure of the amount of time required by an algorithm to run till its completion of the task with respect to the length of the input.

Furthermore, the processing symbols and their functions used in developing an algorithm are oval (start or stop), diamond (decision-making), circle (on-page connector), parallelogram (input and output), rectangle (calculation), arrow (flow or direction) and pentagon (off-page connector).

Some of the characteristics of an algorithm include the following;

I. An algorithm can be written using pseudocode. A pseudocode refers to the description of the steps contained in an algorithm using a plain or natural language.

II. An algorithm can be visualized using flowcharts. A flowchart can be defined as a graphical representation of an algorithm for a process or workflow.

In conclusion, an algorithm is a sequence of precise instructions which result in a solution​ for solving problems using a computer system.

What is the organizational management practices on planning during a pandemic like corona virus.

Answers

Answer:

wear a mask use hand sanitizer dont get in contact with anyone between 6 feet

Explanation:

como se genera la electricidad con energias no renovables
porfa alguien me ayuda llevo muchas horas buscando la respuesta
doy corona y todos lo puntos que pueda

Answers

Answer:

efeiueur eiuube erferve

Explanation:

Answer:

La energia no renovable proviene de fuentes que se agotaran o no se repondran durante miles o incluso millones de años.

Los combustibles fósiles se queman para generar energía y electricidad. Por ejemplo, carbón.

Choose the issue that is occurring from the drop-down menu. During the , development teams transform the requirements into a software application design. During the , the software design is implemented by developers in code. In the , software is evaluated for quality. Any issues with the software are logged as to be resolved by developers. Software that is maintained by developers is said to be .

Answers

Answer: See explanation

Explanation:

During the, (software design phase), developmentt teams transform the requirements into a software application design.

During the (software development phase), the software design is implemented by developers in code.

In the (software evaluation phase), software is evaluated for quality.

Any issues with the software are logged as (bugs) to be resolved by developers.

Software that is maintained by developers is said to be (supported).

Answer:

1) 2

2) 1

3) 2

4) 2

5) 3

Explanation: just did it

An organization's Finance Director is convinced special malware is responsible for targeting and infecting the finance department files. Xander, a security analyst, confirms the files are corrupted. Xander is aware the Director possesses privileged access but not the security knowledge to understand what really happened. What does Xander believe happened

Answers

Answer: Malware infected the Director's machine and used his privileges

Explanation:

Malware simply means malicious software variants, which consists of spyware, viruses, ransomware etc. These can be used by cyberattackers to cause damage to data or in order to have access to a network.

With regards to the question, Xander believed that malware infected the Director's machine and used his privileges which results in the corrupt of the files.

Write a program that takes as input: - the current hour - the number of hours to add and outputs the new hour. For example, if the inputs are 2 (as the current hour) and 51 (as the number of hours to add), your program should output the answer from part (a) of this problem. Note that your program should always output an integer between 1 and 12. We will get you started with this program with the two lines that gather the input from the user. You'll need to write the rest.

Answers

Answer:

The program in Python is as follows:

cTime = int(input("Current Hour: "))

while(cTime <1 ):

   cTime = int(input("Current Hour: "))

aTime = int(input("Additional Hours: "))

while(aTime <0):

   aTime = int(input("Current Hour: "))

tTime = cTime + aTime

tTime%=12

print("New:",tTime,"hours")

Explanation:

This gets input for current time

cTime = int(input("Current Hour: "))

The following ensures that the user enters a time greater than 0

while(cTime <1 ):

   cTime = int(input("Current Hour: "))

This gets input for additional time

aTime = int(input("Additional Hours: "))

The following ensures that the user enters a positive time

while(aTime <0):

   aTime = int(input("Current Hour: "))

This calculate the new hours

tTime = cTime + aTime

This gets the hour equivalent between 1 and 12

tTime%=12

This prints the new hour

print("New:",tTime,"hours")

In today's digital world, companies have created software that makes business communication and productivity more efficient and effective. Explain why it is important for you to know how to use business communication tools such as the Microsoft Office Suite (i.e., Word, PowerPoint, Excel, etc.).


Include examples of some scenarios you faced or may face in the future (as both a student and in your career) that will require you to use these business communication tools.
300 + words

Answers

Answer:

Business communications tools are widely used and the world is becoming increasingly digital so not having those skills will hinder you.

Explanation:

Many jobs require knowledge of Microsoft tools as a qualification. By not having that expertise, I will be viewed as less qualified for a position and may be passed up for job. In corporate America, presentations are a staple and Microsoft PowerPoint is the primary software. If I deliver a poor presentation due to inexperience, I will make myself look bad and as a result get a bad quarterly review and possibly stunted any future promotions. On the flipside, as a business owner Excel is a handy tool for tracking expenses. Very customizable, quick and easy to understand.

Phishing is ____________. When hackers overwhelm a website with too many requests. A network of private computers infected with malicious software and controlled as a group without the owners' knowledge. A piece of code that is capable of copying itself and typically has a detrimental effect, such as corrupting the system or destroying data. Emails designed to trick users into sharing private information.

Answers

Answer:

Emails designed to trick users into sharing private information.

Explanation:

if that is a multiple choice question and the other sentences is the answer choices.

Q.No.2. A study of the effect of smoking on sleep patterns is conducted. The measure observed is the time, in minutes, that it takes to fall asleep. These data are obtained: [3] Smokers:69.3 56.0 22.1 47.6 53.2 48.1 52.7 34.4 60.2 43.8 23.2 13.8 Non Smokers: 28.6 25.1 26.4 34.9 28.8 28.4 38.5 30.2 30.6 31.8 41.6 21.1 36.0 37.9 13.9

Answers

Answer:

(a) [tex]\bar x_1 = 43.7[/tex]     [tex]\bar x_2 = 30.25[/tex]

(b) [tex]\sigma_1 = 16.93[/tex]    [tex]\sigma_2 = 7.14[/tex]

(c) Smoking increases the time to fall asleep

Explanation:

Solving (a): The sample mean of each group

Mean is calculated as:

[tex]\bar x = \frac{\sum x}{n}[/tex]

So, we have:

Smokers

[tex]n_1= 12[/tex] and

[tex]\bar x_1 = \frac{69.3 +56.0+ 22.1 +47.6+ 53.2+ 48.1+ 52.7 +34.4+ 60.2 +43.8 +23.2 +13.8}{12}[/tex]

[tex]\bar x_1 = \frac{524.4}{12}[/tex]

[tex]\bar x_1 = 43.7[/tex]

Non Smokers

[tex]n_2 = 15[/tex] and

[tex]\bar x = \frac{28.6 +25.1 +26.4 +34.9 +28.8 +28.4 +38.5 +30.2 +30.6 +31.8 +41.6 +21.1 +36.0 +37.9 +13.9}{15}[/tex]

[tex]\bar x_2 = \frac{453.8}{15}[/tex]

[tex]\bar x_2 = 30.25[/tex]

Solving (b): The standard deviation of each group

This is calculated as:

[tex]\sigma = \sqrt{\frac{\sum(x - \bar x)^2}{n-1}}[/tex]

For smokers

[tex]n_1= 12[/tex]

So:

[tex]\sigma_1 = \sqrt{\frac{(69.3 -43.7)^2+(56.0-43.7)^2+..........+(13.8-43.7)^2}{12-1}}[/tex]

[tex]\sigma_1 = \sqrt{\frac{3152.04}{11}}[/tex]

[tex]\sigma_1 = \sqrt{286.5491}[/tex]

[tex]\sigma_1 = 16.93[/tex]

For non-smokers

[tex]n_2 = 15[/tex]

So:

[tex]\sigma_2 = \sqrt{\frac{(28.6 -30.25)^2+(25.1 -30.25)^2+..........+(13.9 -30.25)^2}{15-1}}[/tex]

[tex]\sigma_2 = \sqrt{\frac{713.2575}{14}}[/tex]

[tex]\sigma_2 = \sqrt{50.9469}[/tex]

[tex]\sigma_2 = 7.14[/tex]

Solving (c): Impact of smoking on time to sleep

In (b), we have:

[tex]\sigma_1 = 16.93[/tex] --- smokers

[tex]\sigma_2 = 7.14[/tex] --- non-smokers

Smokers have larger standard deviation (i.e. large variability) than non-smokers. This means that smokers require more time to fall asleep.

Which of the components of the systems model provides information so
the system can adjust its function? *
A. input
B. feedback
C. process
D. output

Answers

Answer: Feedback

Explanation:

The input components of the systems model can consist of resources like people, energy, tools, capital, etc.

The feedback components of the systems model provides information so

the system can adjust its function. An example of the feedback mechanism for a system is the progress bar which shows when one is downloading a file on iTunes.

Which is a true statement about automation?

A)human intervention is needed to control all sequences of operations of a task.

B)human intervention is not needed at anytime in initiating or controlling sequences of operations.

C)using computer to control sequences of operations without human intervention.

D)computers are not needed to initiate or control any sequence of operations of a task.

Answers

Answer:

im guessing its a?

Explanation:

What are the steps for creating a bookmark? 1. Place the insertion point where the bookmark should appear. 2. Click the tab. 3. In the group, click Bookmark. 4. When a dialog box opens, name the bookmark, and click . 5. To see bookmarks within the document, go to Backstage view and click Options. 6. In , select Show Bookmarks to have them appear as a locked cursor within the document.

Answers

Answer:

2. Insert

3. Links

4. Add

6. Advanced

Explanation:

HTML is an acronym for hypertext markup language and it is a standard programming language which is used for designing, developing and creating web pages.

A website refers to the collective name used to describe series of web pages linked together with the same domain name.

On the other hand, a webpage is the individual HTML document (single page) that makes up a website with a unique uniform resource locator (URL).

A bookmark can be defined as a placeholder or saved shortcut for a webpage and for future reference. Thus, it avails an end user the ability to quickly access a bookmarked webpage by automatically directing the web browser to the webpage.

Basically, the steps for creating a bookmark are;

1. The insertion point of the webpage should be placed at the point where the bookmark should appear.

2. Click the "INSERT" tab.

3. In the "LINKS" group, click "Bookmark"

4. When a dialog box opens, the bookmark should be named with a specific title, and then click "ADD"

5. To see bookmarks within the HTML document, you should go to Backstage view and click on "Options"

6. In ADVANCED, select Show Bookmarks to have them appear as a locked cursor within the HTML document.

what is meant by versatility in terms of features of computer?​

Answers

Answer:

Versatility refers to the capability of a computer to perform different kinds of works with same accuracy and efficiency.

Explanation:

thank me later

Versatility refers to the effort or ability of a computer to carry out different kinds of works and it is done that is done on the same level of accuracy and efficiency.

What is versatility in computer?

Computer is known to be a machine that is said to be versatile machine as it is made up of a lot of field and also involves in Multi-tasking.

Therefore, Versatility refers to the effort or ability of a computer to carry out different kinds of works and it is done that is done on the same level of accuracy and efficiency.

Learn more about Versatility from

https://brainly.com/question/26285269

#SPJ2

Identify the correct way to cite the Occupational Outlook Handbook's "How to Become a Dentist" web page.
A.Occupational Outlook Handbook. "How to Become a Dentist." Bureau of Labor Statistics and US Department of Labor, 2012.
B."Occupational Outlook Handbook." How to Become a Dentist. Bureau of Labor Statistics and US Department of Labor, 29 March 2012. Web. 1 May 2013.
C."How to Become a Dentist." Occupational Outlook Handbook. Bureau of Labor Statistics and US Department of Labor, 29 March 2012. Web. 1 May 2013.
D.How to Become a Dentist, Occupational Outlook Handbook. Bureau of Labor Statistics and US Department of Labor, 2012. Web. 1 May 2013.

Answers

Answer:

C."How to Become a Dentist." Occupational Outlook Handbook. Bureau of Labor Statistics and US Department of Labor, 29 March 2012. Web. 1 May 2013.

Explanation:

When citing an online publication without a known author, the title of the article is first stated and encapsulated in italics. This is then followed by the name of the website or book. The organization responsible for the write-up is indicated. A comma separates the name of the organization and the date when the article was written. 'Web' is written to show that the material was obtained online. Finally, the date that tells when the article was retrieved is noted.

This guideline applies to both the Modern Language Association and the American Psychological Association citation styles.

Answer:

Identify the correct way to cite the Occupational Outlook Handbook's "How to Become a Dentist" web page. awser:C Explanation: How to Become a Dentist." Occupational Outlook Handbook. Bureau of Labor Statistics and US Department of Labor, 29 March 2012. Web. 1 May 2013.

Five uses of the start button

Answers

Starting something

Possibly turning it off

Making something work

Fixing the Start Button

Beginning something

What will the Document search option search through?

Answers

Answer:

hi

Explanation:

nynttnynybynynynumkol0

help,these are true and false and tick and cross ​

Answers

Answer:

1.

a.true

b.false

2a internal

Explanation:

hope it helps you

in your own ideas what are the disadvantages of participating in a videoconference write your answer inside the circle​

Answers

Some disadvantages of taking part in a video-conference are:

1) Lack of communication from social cues (social cues are what we use to see if someone is in a good or bad mood)

2) There is a high chance of unstable network connection.

3) Technical and personal issues because not everyone is comfortable speaking on a video-conference platform.

4) It causes more stress due to the lack of organization when preparing meetings (because it’s so easy to just get on a device without preparing anything beforehand).

Hope this helped!

In what way, if any, are scripting languages different from markup languages?

A) Markup languages tell the computer what content to present, while scripting languages make things run faster.

B) Markup languages tell a single computer what to do, while scripting languages help computers communicate with each other.

C) Scripting languages tell the computer what content to present, while markup languages make things run faster.

D) Scripting languages tell a single computer what to do, while markup languages help computers communicate with each other.

Answers

Answer:

Markup languages tell the computer what content to present, while scripting languages make things run faster. A

Answer:

It's most likely A in edge.

Explanation:

My father works in IT, and I am taking a Fundamentals of Dig. Media class. If I remember correctly, the lesson for markup languages said that markup is used for online documents, like Wiki for example. Thus, I believe it is A.

n
Which of the following is not a goal of a persuasive speaking?
a. to motivate to action
b.
to change attitudes, beliefs, or values
to strengthen or weaken attitudes, beliefs, or values
d. to define, demonstrate, or instruct
C.

Answers

Answer: D. to define, demonstrate, or instruct.

Explanation:

Persuasive speaking is the form of speaking that we usually engage in. It is used to convince people. As individuals, we usually engage in persuasive speaking. We argue about different things and try to convince the other person to agree with us.

Th goals of persuasive speaking is to motivate to action, to change attitudes, beliefs, or values and to strengthen or weaken attitudes, beliefs, or values.

It should be noted that the goal of persuasive speaking isn't to to define, demonstrate, or instruct. Therefore, the correct option is D.

Answer:

Simple Answer: D

Can anyone help me with a mental ability work plzz

Answers

choose the correct option:

1) using

2) is

3) use

4) to eat

5) use

A professional-looking portfolio gives a clear message. What does it convey?
Ο Α. .
that you like to build up a sales pitch
OB. that you like to flaunt your work
OC. that you are serious about your work
OD.
that you put on a show for effect
Ο Ε.
that you only care about appearances
Reset
Next

Answers

Answer:a

Explanation:

A professional-looking portfolio gives a clear message that you put on a show for effect. Thus, the correct option is D). that you put on a show for effect.

What is a professional portfolio?

Professional portfolio refers to the collection of work and other documents that make clear the abilities of the candidate to the potential employers.  It can be created in both digital and physical format.

A portfolio is an collected album of all work samples and professional documentation that provides proof about the accomplishments, skills, potential and samples of an individual's work.  

In order to give portfolio a professional look, there are several categories to be consider such as Personal Information, Values, Personal Goals and History, Accomplishments and Job History, Skills and Attributes, Education and Training as well.

Learn more about professional portfolio here:-

https://brainly.com/question/20411709

#SPJ2

of the following potential benefits, which is LEAST likely to be provided by the upgraded system?
A Human representatives will not be needed to respond to some inquiries.
B
The company will be able to provide a human representative for any incoming call.
с
Customers are likely to spend less time listening to information not relevant to their issue.
D
Customers will be unable to mistakenly select the incorrect department for their particular issue.

Answers

Answer:

The company will be able to provide human representative for any incoming call

Explanation:

The upgrade of a system is meant to resolve identified issues in an initial system and given that the available human representative is usually less than the number of incoming call at a given time, due to a constant drive for a larger customer base, we have;

The upgraded system will provide technologies such that human representative will not be required for some inquiries, customers will listen to mainly relevant information with regards to their issues and customers will be properly directed to the correct department that are concerned with their current issue

Therefore, the LEAST likely goal of the upgraded system from among the options and therefore the least likely to be provided by the upgrade is the company will be able to provide human representative for any incoming call

Other Questions
Calculate the volume of 0.320-M NaOH solution needed to completely neutralize 74.0 mL of a 0.230-M solution of the monoprotic acid HBr. mL NaOH. Compute 7,953,000 / 1000. Ella Answer una blusa y unas botas. (comprar) At a new school there are 2 teachers of every 15 students. If the school has 42 teachers, how Many students are there in the school? Please help due today Lucas took an express train into the city last weekend without any stops. He boarded the train at 9:30 am, and arrived in the city at 11:15 a.m. Thetrain's average speed was 60 miles per hour. How far did Lucas travel by train?75 miles105 miles135 miles165 miles Csikszentmihalyi & Figurski (1982) conducted a study to determine the degree to which people find out about themselves through the process of introspection (thinking about themselves). They gave people beepers and asked them to write down what they were thinking about when the beepers went off randomly throughout the day. The results indicated that: Please help me i need help What is the midpoint of a line segment with endpoints at (-1,-1) and (3,3)? math pls pls help help no trolls i really need this grade If you don't cover the IV port with a sterile seal before transporting a compounded sterile preparation (CSP) you'll be potentially aiding a pathogen to be transferred to the patient also known as (05.06 MC)Choose the function to match the graph.-65332.1-202.3456-1-21 The Olympic Games began as a religious festival meant to honor the god Apollo. TrueFalse how has new ideas change Britain form of government? how Did these changes contrast with the changes brought about by the American revolution application to renew contract teacher extension Why did the cotton gin lead to more slavery?A. the work of picking cotton got harderB. cotton plantation started losing money.C. raising cotton became more expensiveD. growing cotton became more profitable and slaves were needed to grow the cotton what will happen if atom hit earth with speed of light? Qu significa Ustedes en ingls?TheyYou guysWe I need to know the coefficient order does Mars has Oxygen? Can we breath on Mars?