C++ please help
The program first reads integer orderCount from input, representing the number of pairs of inputs to be read. Each pair has a string and an integer. One Order object is created for each pair and added to vector orderList. Call each Order object's Print().
Ex: If the input is:
5 bread 17 gyro 4 coconut 3 fennel 5 truffle 12
then the output is:
Order: bread, Quantity: 17 Order: gyro, Quantity: 4 Order: coconut, Quantity: 3 Order: fennel, Quantity: 5 Order: truffle, Quantity: 12
Note: The vector has at least one element.
code below:
#include
#include
using namespace std;
class Order {
public:
void SetFoodAndQuantity(string newFood, int newQuantity);
void Print() const;
private:
string food;
int quantity;
};
void Order::SetFoodAndQuantity(string newFood, int newQuantity) {
food = newFood;
quantity = newQuantity;
}
void Order::Print() const {
cout << "Order: " << food << ", Quantity: " << quantity << endl;
}
int main() {
int orderCount;
unsigned int i;
vector orderList;
Order currOrder;
string currFood;
int currQuantity;
cin >> orderCount;
for (i = 0; i < orderCount; ++i) {
cin >> currFood;
cin >> currQuantity;
currOrder.SetFoodAndQuantity(currFood, currQuantity);
orderList.push_back(currOrder);
}
/* Your code goes here */
return 0;
}

Answers

Answer 1

Here is the modified code that meets the requirements mentioned in the problem:

#include <iostream>

#include <vector>

using namespace std;

class Order {

public:

void SetFoodAndQuantity(string newFood, int newQuantity);

void Print() const;

private:

string food;

int quantity;

};

void Order::SetFoodAndQuantity(string newFood, int newQuantity) {

food = newFood;

quantity = newQuantity;

}

void Order::Print() const {

cout << "Order: " << food << ", Quantity: " << quantity << endl;

}

int main() {

int orderCount;

unsigned int i;

vector<Order> orderList; // vector of Order objects

Order currOrder;

string currFood;

int currQuantity;

cin >> orderCount;

for (i = 0; i < orderCount; ++i) {

   cin >> currFood;

   cin >> currQuantity;

   currOrder.SetFoodAndQuantity(currFood, currQuantity);

   orderList.push_back(currOrder);

}

// Loop through the orderList vector and print each order

for (i = 0; i < orderList.size(); ++i) {

   orderList[i].Print();

}

return 0;

}

How does the above code work?

The code reads an integer representing the number of pairs of inputs to be read.


For each pair, an Order object is created with the string and integer values, and then added to a vector. Finally, the Print() function is called for each object in the vector.

Learn more about codes;
https://brainly.com/question/28848004
#SPJ1


Related Questions

which protocol is popular for moving files between computers on the same lan, where the chances of losing packets are very small? http smtp icmp tftp

Answers

Option D is correct. Another well-liked Layer 4 protocol is UDP. UDP is used by several protocols, including DNS, TFTP, and others, to transmit data.

A connectionless protocol is UDP. Before you transmit data, there is no need to create a link between the source and destination. At the transport level, TCP is by far the most widely used protocol when combined with IP. On networks like Novell or Microsoft, the IPX protocol is used at the network layer, and SPX is paired with it at the transport layer. TCP is used to manage network congestion, segment size, data exchange rates, and flow management. Where error correcting capabilities are needed at the network interface level, TCP is chosen.

Learn more about protocol here-

https://brainly.com/question/27581708

#SPJ4

Which are two fundamental building blocks for creating websites?
OOOO
HTML
XML
CSS
DOCX
AAC

Answers

Hey the main coding languages for building websites are html. html is for the formatting . when CSS the other one is used for the style. we use CSS for style sheets and much more.  

if you think about it like a house html is the foundations and the walls and css is the paint.

Hope this helps.

hy does payments constitute such a large fraction of the FinTech industry? (b) Many FinTech firms have succeeded by providing financial services with superior user interfaces than the software provided by incumbents. Why has this strategy worked so well? (c) What factors would you consider when determining whether an area of FinTech is likely to tend towards uncompetitive market structures, such as monopoly or oligopoly?

Answers

(a) lengthy and complex processes for making payments (b)  legacy systems and complex interfaces (c) regulatory requirements and substantial initial investment, can limit competition

(a) Payments constitute a significant portion of the FinTech industry due to several factors. First, traditional banking systems often involve lengthy and complex processes for making payments, leading to inefficiencies and higher costs. FinTech firms leverage technology and innovative solutions to streamline payment processes, providing faster, more secure, and convenient payment options to individuals and businesses. Additionally, the rise of e-commerce and digital transactions has increased the demand for digital payment solutions, creating a fertile ground for FinTech companies to cater to this growing market. The ability to offer competitive pricing, improved accessibility, and enhanced user experience has further fueled the growth of FinTech payment solutions.

(b) FinTech firms have succeeded by providing financial services with superior user interfaces compared to incumbents for several reasons. Firstly, traditional financial institutions often have legacy systems and complex interfaces that can be challenging for users to navigate. FinTech companies capitalize on this opportunity by designing user-friendly interfaces that are intuitive, visually appealing, and provide a seamless user experience. By prioritizing simplicity, convenience, and accessibility, FinTech firms attract and retain customers who value efficiency and ease of use. Moreover, FinTech companies leverage technological advancements such as mobile applications and digital platforms, allowing users to access financial services anytime, anywhere, further enhancing the user experience.

(c) Several factors contribute to the likelihood of an area of FinTech tending towards uncompetitive market structures such as monopoly or oligopoly. Firstly, high barriers to entry, including regulatory requirements and substantial initial investment, can limit competition, allowing a few dominant players to establish market control. Additionally, network effects play a significant role, where the value of a FinTech service increases as more users adopt it, creating a competitive advantage for early entrants and making it challenging for new players to gain traction. Moreover, data access and control can also contribute to market concentration, as companies with vast amounts of user data can leverage it to improve their services and create barriers for potential competitors. Lastly, the presence of strong brand recognition and customer loyalty towards established FinTech firms can further solidify their market position, making it difficult for new entrants to gain market share.


To learn more about technology click here: brainly.com/question/9171028

#SPJ11

when the soviets launched _______________, america devoted even more resources to space and technology research.

Answers

When the Soviets launched Sputnik 1, America devoted even more resources to space and technology research.

What is Sputnik 1?

Sputnik 1 was the first artificial Earth satellite. It was launched into an elliptical low Earth orbit by the Soviet Union on October 4, 1957. The surprise success precipitated the Sputnik crisis and triggered the Space Race between the Soviet Union and the United States.

Sputnik 1 was a small metal sphere measuring about 22.8 inches (58 centimeters) in diameter and weighing 183.9 pounds (83 kilograms). It was powered by two silver-zinc batteries and transmitted radio signals at a frequency of 20.005 and 40.002 MHz.

The satellite orbited the Earth once every 96.2 minutes at an altitude of about 310 miles (500 kilometers) and was visible from the ground as a rapidly moving point of light. It remained in orbit for about three months before its batteries died and it burned up in the Earth's atmosphere on January 4, 1958.

To learn more about satellite, visit: https://brainly.com/question/16761637

#SPJ4

Describe an ethical dilemma related to pricing or advertising.

Answers

Answer:

Here are the 5 ethical pricing issues that hurt business the most:

Price fixing: Collusion at its worse. ...

Bid rigging: Favoritism. ...

Price discrimination: Anti-favoritism. ...

Price skimming: Discriminating through time. ...

Supra competitive pricing: Monopoly gouging.

Explanation:

Sorry if it's wrong

once you select a slide layout, it cannot be changed T/F

Answers

True. Once you select a slide layout, it can be changed. To change the slide layout, follow these steps:

1. Select the slide you want to change the layout for.
2. Go to the "Home" tab in the toolbar.
3. Click on "Layout" in the "Slides" group.
4. Choose the new slide layout you want to apply from the dropdown menu.

The slide layout will be updated according to your selection.

Slide layouts contain formatting, positioning, and placeholder boxes for all of the content that appears on a slide. Placeholders are the dotted-line containers on slide layouts that hold such content as titles, body text, tables, charts, SmartArt graphics, pictures, clip art, videos, and sounds.

To know more about  slide layout:https://brainly.com/question/5055761

#SPJ11

water resources engineering by larry w mays pdf free download

Answers

Water Resources Engineering by Larry W. Mays is a textbook for students, professionals, and researchers interested in the field of water resources engineering. This book is available for purchase, but there are also sites where it can be downloaded for free in PDF format. Water resources engineering is a field of engineering that focuses on the management, development, and preservation of water resources, including groundwater and surface water.

This field is concerned with ensuring that water resources are available for various purposes, such as drinking, irrigation, industrial use, and recreational activities.vThe textbook Water Resources Engineering by Larry W. Mays is an excellent resource for anyone interested in this field. It covers topics such as the hydrologic cycle, precipitation, evaporation, infiltration, and runoff. It also covers water quality, groundwater hydrology, floodplain management, and river engineering.
The book is a comprehensive guide to the principles and practices of water resources engineering. It is an excellent resource for students who are studying water resources engineering and for professionals who want to stay up-to-date with the latest developments in the field. In conclusion, Water Resources Engineering by Larry W. Mays is a must-have book for anyone interested in the field of water resources engineering. It is a comprehensive guide that covers all the essential topics and principles of water resources engineering.


Learn more about water resources engineering here,
https://brainly.com/question/33334914

#SPJ11

What is the output of the following code snippet?
public static void main(String[ ] args)
{
int s1 = 20;
if(s1 < 20)
{
System.out.print("1");
}
if(s1 <= 40)
{
System.out.print("2");
}
if(s1 > 20)
{
System.out.print("3");
}
}

Answers

Output: "23" is the output of the following code snippet. The code initializes an integer variable s1 to 20.

It then proceeds to evaluate a series of if statements. The first if statement checks if s1 is less than 20, but since s1 is equal to 20, the condition is false and nothing is printed. The second if statement checks if s1 is less than or equal to 40, which is true, so "2" is printed. The third if statement checks if s1 is greater than 20, which is also true, so "3" is printed. As a result, the output of the code is "23". Despite s1 being equal to 20, both the second and third if statements evaluate to true and result in "2" and "3" being printed, respectively.

learn more about code here:

https://brainly.com/question/17293834

#SPJ11

In addition to assessing whether each of your independent variables has an effect on the dependent variable, a factorial ANOVA also allows you to:
A) use multiple dependent measures in a single analysis.
B) control for a third variable that might be related to your dependent measure prior to
investigating the independent variable of interest.
C) determine whether the effects of one factor depend on the other factor.
D) partition out the variability due to individual differences and the variability due to
measurement error.

Answers

Answer:

C) determine whether the effects of one factor depend on the other factor.

Explanation:

ANOVA is analysis of variance which helps to understand whether the population mean are equal or not. It is statistical model which is used by the businessmen to analyze their business performance. ANOVA also determines whether the effect of one factor are related or dependent on other factor.

Network forensics might deal with what? Retrieving photos from a PC Analyzing text messages Investigating a data breach Defragmenting a hard drive

Answers

Answer:

Investigating a data breach

Explanation:

A data breach usually involves data exfiltration over a computer network. the other options involve data being stored on a device locally which isn't volatile data like text messages, photos or rearranging data in defragmentation all of which does not require a network.

What would you say was the biggest single headache you faced with technology today?

Answers

Answer:

According to a survey conducted, the top three "headaches" of modern living are slow Wi-Fi, PPI calls, and a laptop or computer freezing.

Explanation:

Bright lights: If you operate in a room with a lot of natural light or harsh interior lighting while also utilizing a screen with bright lights, you may get a headache from the over-illumination.

Eyestrain: Your eye muscles will have a hard time adjusting if you don't keep enough distance between your eyes and the screen. This persistent strain on the eyes might cause a headache or migraine.

Allow Lungi to enter the number of blankets he wishes to distribute on a given day

Answers

To allow Lungi to enter the number of blankets he wishes to distribute on a given day, you can create a form or a spreadsheet that allows him to input the desired quantity.

Allow Lungi to enter the number of blankets he wishes to distribute on a given day:

To allow Lungi to enter the number of blankets he wishes to distribute on a given day, you can use the following steps:

1. Prompt Lungi for input by asking how many blankets he wants to distribute. You can use a print statement for this. For example:
  `print("Lungi, how many blankets do you want to distribute today?")`

2. Take Lungi's input and store it in a variable, such as `number_of_blankets`. You can use the `input()` function to receive the user's input, and the `int()` function to convert the input to an integer. For example:
  `number_of_blankets = int(input())`


Now, Lungi can enter the number of blankets he wishes to distribute on a given day, and the program will store that value in the variable `number_of_blankets`.

To know more about Blankets

visit:

https://brainly.com/question/27895571

#SPJ11

the dash area is used for typing and editing the text​

Answers

Explanation:

document area is used for typing and editing the text

analisa is a sales representative who travels extensively. at a trade show, analisa uses her virtual private network (vpn) connection to simultaneously connect to the office lan and her personal computer at home. what security risk does this pose?

Answers

Since Analisa uses her virtual private network (vpn) connection to simultaneously connect to the office lan and her personal computer at home. The security risk that this pose is Split tunneling.

Is split tunneling a VPN secure?

Split tunneling poses a few security risks. The corporate firewall, endpoint detection and response system, antimalware, and other security features do not safeguard any data that does not pass through a secure VPN, making it vulnerable to access and/or interception by ISPs and nefarious hackers.

Hence, Split tunneling enables simultaneous use of two connections. Your VPN program separates your internet traffic into two groups; one is encrypted and forwarded through safe VPN servers, and the other is left unencrypted and let to communicate with the internet directly.

Learn more about Networking from

https://brainly.com/question/14290388
#SPJ1

Direction: Choose the letter of the correct answer.

1. It is a substance consumed to provide nutritional sustenance for an

organism.

a. food

b. dish

c. menu

d. meal

2. This refers to a prepared item of food like cordon bleu.

a. meal

b. dish

c. menu

d. food

3. This is the term for all item that has been manufactured and is useful to us.

a. nutritive tool b. dishes

c. product evaluation

d. sensory evaluation

4. This involves the sense of sight and can be described through colors, size,

shape, consistency and crumb.

a. flavour

b. fresh

c. appearance

d. texture

5. This is produced by a combination of taste and aroma.

a. flavour

c. changes in color

b. texture

d. sensory

6. This involves the senses of sight and touch and results to different cooking

methods to produce different textures such as soft , chewy, crispy, sticky

and grainy.

a. flavour

c. appearance

b. texture

d. aroma

7. This refers to the nutritive value of the food or dish .

a. sensory tools

c. nutritive tools

b. senses

d. food evaluation

8. This must be evaluated for the purpose of maintaining the consistency of

the products served.

a. meal

c. menu

b. recipe

d. dish

9. It refers to the taste buds on our tongue.

a. taste

c. aroma

b. appearance

d. texture

10. This involves the sense of smell and is detected by the nose.

a. taste

c. texture

b. aroma

d. appearance

Ano pong answer nyo dito?.
pahelp po.

Answers

Explanation:

b c a d d d a b c c good luck bro

When an item in a menu is gray, it means that _____.


the item has been selected
the item has been selected

the item is unavailable
the item is unavailable

the item only works with another application
the item only works with another application

the item has been deleted

Answers

Answer:

the item is unavailable

Explanation:

this is an extrapolation as you would need more context to be sure but usually grey menus mean it is unavailable

Question 6 (2 points)
The recipe for good communication includes these "ingredients":

a.clause, brevity, comments, impact, value

B.clarity, brevity, comments, impact, value

C.clarity, brevity, context, impact, value

D.clause, brevity, context, impact, value

Answers

Answer:

C

Explanation:

i think lng hehehehehe

write algorithm and QBASIC and flowchart to find a number and check this number is positive or negative or zero ​

Answers

Answer: Qbasic:

CLS

INPUT "ENTER ANY NUMBER";N

IF N>0 THEN

PRINT "THE NUMBER IS POSITIVE"

ELSE IF N<0 THEN

PRINT "THE NUMBER IS NEGATIVE"

ELSE

PRINT "THE NUMBER IS ZERO"

ELSE IF

END

(10 points) For EM algorithm for GMM, please show how to use Bayes rule to drive \( \tau_{k}^{i} \) in closed-form expression.

Answers

The closed-form expression for \( \tau_{k}^{i} \) in the EM algorithm for GMM is derived using Bayes rule, representing the probability that observation \( x_{i} \) belongs to the kth component. By dividing the likelihood and prior by the sum of all such terms, we arrive at the desired expression.

In EM algorithm for GMM, Bayes rule can be used to derive the closed-form expression for \( \tau_{k}^{i} \).

The expression is as follows:$$\tau_{k}^{i} = \frac{p_{k}(x_{i}|\theta_{k})\pi_{k}}{\sum_{j=1}^{K}p_{j}(x_{i}|\theta_{j})\pi_{j}}$$where, \(x_{i}\) is the ith observation, \(\theta_{k}\) represents the parameters of the kth component, \(p_{k}(x_{i}|\theta_{k})\) represents the probability of \(x_{i}\) belonging to the kth component, and \(\pi_{k}\) is the mixing proportion of the kth component.

To derive this expression using Bayes rule, we can use the following steps:1. Using Bayes rule, we can write the posterior probability of the kth component as:$$p_{k}(\theta_{k}|x_{i}) = \frac{p_{k}(x_{i}|\theta_{k})\pi_{k}}{\sum_{j=1}^{K}p_{j}(x_{i}|\theta_{j})\pi_{j}}$$2.

Since we are interested in the probability that the ith observation belongs to the kth component, we can simplify the above expression as:$$p_{k}(x_{i}|\theta_{k})\pi_{k} = \tau_{k}^{i}p_{k}(\theta_{k}|x_{i})\sum_{j=1}^{K}\tau_{j}^{i}p_{j}(x_{i}|\theta_{j})$$3. Dividing both sides of the above equation by \(p_{i}(x_{i})\), we get:$$\tau_{k}^{i} = \frac{p_{k}(x_{i}|\theta_{k})\pi_{k}}{\sum_{j=1}^{K}p_{j}(x_{i}|\theta_{j})\pi_{j}}$$This is the closed-form expression for \( \tau_{k}^{i} \) that we were looking for.

For more such questions algorithm,Click on

https://brainly.com/question/13902805

#SPJ8

how do i auto-sum the values of two columns into a third column in excel?

Answers

To auto-sum the values of two columns into a third column in Excel, you can use the SUM formula. Here are the steps to do so:

   Select the cell in the third column where you want the sum to appear.

   Type the formula "=SUM(".

   Select the first cell in the first column that you want to sum.

   Hold the Shift key and select the corresponding cell in the second column.

   Close the parentheses by typing ")".

   Press Enter to calculate the sum.

Excel will calculate the sum of the selected range of cells and display the result in the cell where you entered the formula. The sum will automatically update if you change the values in the first or second column.

Alternatively, you can use the AutoSum feature in Excel, which automatically suggests the sum formula based on the adjacent cells. Here's how:

   Select the cell directly below the values in the third column where you want the sum to appear.

   Click on the "AutoSum" button (Σ) in the Excel toolbar.

   Excel will automatically select the adjacent cells in the first and second columns.

   Press Enter to calculate the sum.

The sum will be calculated and displayed in the selected cell, and it will update automatically if the values in the first or second column change.

learn more about "Excel":- https://brainly.com/question/24749457

#SPJ11

The first commercial computer was developed by *

Microsoft
Apple
IBM
Intel

Answers

Answer:

Microsoft

Explanation:

Microsoft is the first ad

answer♡

microsoft, i think.

a hacker writes some programming code that will cause a computer to behave in an unexpected and undesirable manner, but disguises it as something else to make it difficult to detect. which attack vector has this attacker chosen to use?

Answers

Since the hacker writes some programming code that will cause a computer to behave in an unexpected and undesirable manner, the attack vector that this attacker has chosen to use is known to be virus.

What is a Computer virus?

A computer virus is known to be a kind or a type of computer program/software that if it is said to be executed, it tends to  replicates itself and by so during it alters aa well as modify other computer programs as well as also insert its own code.

Note that when the work of  replication is said to be done on that system, the affected aspect of the computer system are then said to be "infected" with what we call a computer virus and this is known to be a metaphor that was obtained from biological viruses.

Therefore, based on the above, one can say that since the hacker writes some programming code that will cause a computer to behave in an unexpected and undesirable manner, the attack vector that this attacker has chosen to use is known to be virus.

Learn more about computer virus from

https://brainly.com/question/26128220

#SPJ1

Complete the sentence.

When sensitive information is sent over the internet, it should be
.

Answers

Answer:

encrypted

Explanation:

to prevent others from viewing it

Answer:

Your answer is encrypted

Explanation:

This will keep your information secure whilst sending it.

This means to:

convert (information or data) into a cipher or code, especially to prevent unauthorized access

So your info is safe

Pls mark brainliest <3

Hope this helps :)

`

`

`

Tori

Write a scientific explanation that explains how we know the tectonic continental plates are not in the same location today that they were in the past.

Answers

Answer:

Im not a 100% sure this is correct.. but ill try my best!

Explanation:

The tectonic plates where orignally connected in Pangaea. The plates begein to move apart, causing earthquakes, and physical features. If it whernt for the tectonic plates moving, Pangaea would still exist today showing clear evidence they most likley had moved.

License plate numbers in a certain state consists of seven characters. The first character is a digit (0 through 9). The next four characters are capital letters (A through Z) and the last two characters are digits. Therefore, a license plate number in this state can be any string of the form: Digit-Letter-Letter-Letter-Letter-Digit-Digit


Required:

a. How many different license plate numbers are possible?

b. How many license plate numbers are possible if no digit appears more than once?

Answers

a)4,569,760,000 different license plate numbers possible in this state and b)17,971,200 different license plate numbers possible in this state if no digit appears more than once

a. To determine the number of different license plate numbers possible, we need to calculate the number of choices for each position in the license plate.

For the first position, there are 10 possible choices (digits 0-9).

For the second, third, fourth, and fifth positions, there are 26 possible choices for each (capital letters A-Z).

For the sixth and seventh positions, there are 10 possible choices for each (digits 0-9).

Therefore, the total number of different license plate numbers possible can be calculated as follows:

10 (choices for the first position) × 26 (choices for the second position) × 26 (choices for the third position) × 26 (choices for the fourth position) × 26 (choices for the fifth position) × 10 (choices for the sixth position) × 10 (choices for the seventh position) = \(10*26^{4} * 10^{2}\)

Simplifying this calculation, we get:

   10*26^{4} * 10^{2}= 10 × 456,976 × 100 = 4,569,760,000

Therefore, there are 4,569,760,000 different license plate numbers possible in this state.

b. If no digit appears more than once in the license plate number, we need to adjust the calculation from part (a).

For the first position, there are still 10 possible choices (digits 0-9).

However, for the sixth and seventh positions, we have fewer choices since we cannot repeat a digit that has already been used.

Therefore, the total number of different license plate numbers possible with no repeated digits can be calculated as:

10 (choices for the first position) × 26 (choices for the second position) × 25 (choices for the third position) × 24 (choices for the fourth position) × 23 (choices for the fifth position) × 8 (choices for the sixth position) × 7 (choices for the seventh position) = 10 × 26 × 25 × 24 × 23 × 8 × 7

Simplifying this calculation, we get:

10 × 26 × 25 × 24 × 23 × 8 × 7 = 17,971,200

Therefore, there are 17,971,200 different license plate numbers possible in this state if no digit appears more than once.

For more questions on license plate

https://brainly.com/question/30809443

#SPJ11

What term below is used to describe an attack that sends unsolicited messages to Bluetooth enabled devices?

Bluesnarfing
Bluejacking
Bluecracking
Bluetalking

Answers

The term used to describe an attack that sends unsolicited messages to Bluetooth-enabled devices is Bluejacking. Bluejacking is a technique where an attacker sends unsolicited messages or contacts to nearby Bluetooth devices, typically in the form of text or business card messages. So, the second option is the correct answer.

The purpose of Bluejacking is not to gain unauthorized access to the target device but rather to send unwanted messages and annoy the device owner or users. It takes advantage of the Bluetooth device's discoverability feature to send messages anonymously.

Bluejacking does not involve unauthorized data access or control of the target device, but rather focuses on unwanted messaging and disruption. Therefore, the correct option is second one.

To learn more about Bluetooth: https://brainly.com/question/29236437

#SPJ11

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:

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)

Which option identifies the programming paradigm selected in thr following scenario? A student is writing a science fiction story that deals with artificial intelligence. He wants to be realistic. He decides to add computer terms to the story that pertain to his storyline.

A. Java
B. Python
C. Perl
D. Ruby

Answers

Answer:

java

Explanation:

Java es rápido, seguro y fiable. Desde ordenadores portátiles hasta centros de datos, desde consolas para juegos hasta computadoras avanzadas, desde teléfonos móviles hasta Internet, Java está en todas partes. Si es ejecutado en una plataforma no tiene que ser recompilado para correr en otra. Java es, a partir de 2012, uno de los lenguajes de programación más populares en uso, particularmente para aplicaciones de cliente-servidor de web

How can skills related to ISO speeds, image manipulation, DSLR camera settings, image storage and transfer, and lenses be categorized?


intrinsic skills


technical skills


creative skills


fleeting skills

Answers

The correct option is (b) technical skills.

The skills related to ISO speeds, image manipulation, DSLR camera settings, image storage and transfer, and lenses can be categorized as technical skills.

Technical skills refer to the ability to use the tools, equipment, and procedures required to perform a specific task. In the context of photography, technical skills are essential to capture high-quality images and manipulate them effectively using various software and equipment.

These skills require a solid understanding of the camera's functions and settings, image manipulation software, and different lenses and their applications.

Additionally, knowledge of image storage and transfer is also important in ensuring that images are safely stored and efficiently transferred to various devices or platforms. Technical skills play a critical role in the success of a photographer's work.

The right option is (b) technical skills.

For more questions on technical skills, visit:

https://brainly.com/question/30463083

#SPJ11

If you wanted a smartphone with the fewest restrictions on application development which smartphone operating system should you choose

Answers

Answer:

Apple iOS

Explanation:

A software can be defined as a set of executable instructions (codes) or collection of data that is used typically to instruct a computer on how to perform a specific task and solve a particular problem.

Basically, softwares are categorized into two (2) main categories and these are;

I. Proprietary software: it's also known as a closed-source software and it can be defined as any software application or program that has its source code copyrighted and as such cannot be used, modified or distributed without authorization from the software developer.

II. Open-source software: it's a type of software in which end users are granted the permission to use, study, modify, copy and share the software with its source code anyhow.

An Apple iOS is an example of an operating system that has the open-source software features and as such its users are faced with minimal restrictions on application development.

This ultimately implies that, if you wanted a smartphone with the fewest restrictions on application development the smartphone operating system you should choose is Apple iOS.

Other Questions
Why might fibers be important to forensics Consider the following simultaneous-move game:ColumnL RRow. U 5,4. 4,5D. 3,2. 2, 3A. What is the equilibrium if neither player can use any strategic moves?B. Can one player improve his payoff by using a strategic move: commitment, threat, promise,or a combination of such moves? If so, which player makes what strategic move? Whatare the new payoffs? How many moles of carbon monoxide would be needed to react with 100 g FeO3? Because the scope of a business message for an expert is more detailed than that for layperson, what can business writers use when writing for an expert that they can't use for a layperson based on the information in the passage, which of these substances would be most likely to provoke a response similar to the barium dance What correlates with metallic behavior which direction does the gradient v point in the direction of maximum increase or maximum decrease in v which of the following are reasons a company might choose a direct channel to distribute its products? (Check all that apply.)- because it believes it can better serve the customer that way- When a customer wants to recycle an old computer- When a customer's coffee maker is under warranty and needs to be repaired- because it believers it can offer a cheaper price that way- When a customer's car has a safety recall on its brake pads- because it wants to directly manage the entire marketing mix- When a customer wants to return a jacket Match the criteria for effective market segmentation on the left with the appropriate definition on the right. Substantial Measurable Differentiable imagine a disease in which blood osmolarity is constantly too high. adding adh to the bloodstream does not treat the disorder. there must be a disruption at the level of the Over a period of several years, an organization has exceeded the capacity of its emergency electric generator. The organization should:a. Increase UPS capacity to make up the differenceb. Purchase a larger generator that can handle the entire workloadc. Purchase an additional generator so that the old and new generators together will generate enough powerd. Decrease UPS capacity to make up the difference select all that apply when professionals with hub mvss listen to business presentations, they respond best to which of the following? (choose every correct answer.) multiple select question. language that presents several options brash, confident language bottom-line performance measures presentations that hold clear business logic A 57.0kg57.0 kg box hangs from a rope. What is the tension in the rope if:(A) The box is at rest? Express your answer with the appropriate units.(B) The box moves up a steady 4.60m/s4.60 m/s? Express your answer with the appropriate units.(C) The box has vy=4.60m/svy=4.60 m/s and is speeding up at 4.60m/s24.60 m/s2? The y-axis points upward. Express your answer with the appropriate units.(D) The box has vy=4.60m/svy=4.60 m/s and is slowing down at 4.60m/s24.60 m/s2? Express your answer with the appropriate units. 1. what were the reasons for the emergence of a new form, modern dance, very early in the 20th century. the orbital period of saturn is 29.46 years. determine the distance from the sun to the planet in km if the shaded cross sections of the solids have the same area, which of the following corresponds to the value of a: the side length of the base of the square prism? What is the expression for steam function and potential function for the flow over the cylinder in terms of T/F the illustrator eyedropper tool can select attributes from one object and apply them to another but cannot simply sample rgb color values like the photoshop eyedropper tool. Which of the following are key ingredients of a confidence interval based on the Central Limit Theorem?(1) A summary statistic (e.g. a mean) from your sample(2) A multiple z, based on a tail area from the normal distribution.(3) A formula for the standard error of your summary statistic.a. All of the above (1, 2, and 3)b. (1) and (2)c. (1) and (3)d. (2) and (3) in a study of brand recognition of sony, groups of four consumers are not sure 0.30 interviewed. if x is the number of people in the group who recognize the sony brand name, then x can be 0, 1, 2, 3, or 4, and the corresponding probabilities are 0.0016, 0.0250, 0.1432, 0.3892, and 0.4096. does the given information describe a probability distribution? why or why not?