0% found this document useful (0 votes)
4 views8 pages

Algorithms for Currency and Temperature Conversion

The document presents 4 problems and requests identifying the input elements and expected results for each. Instructions are provided to specify these elements by asking what information is needed, what the known data is, the unknown to be calculated, and in what format the result will be delivered. As an example, the first problem is solved by detailing its input and output elements and proposing an algorithm to convert Colombian pesos to dollars.

Translated by

ScribdTranslations
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views8 pages

Algorithms for Currency and Temperature Conversion

The document presents 4 problems and requests identifying the input elements and expected results for each. Instructions are provided to specify these elements by asking what information is needed, what the known data is, the unknown to be calculated, and in what format the result will be delivered. As an example, the first problem is solved by detailing its input and output elements and proposing an algorithm to convert Colombian pesos to dollars.

Translated by

ScribdTranslations
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Section 1

Taking into account the following problems, identify the possible


input elements and expected results of each one:

• An algorithm is desired to be developed that allows identifying the quantity


of dollars equivalent to an amount of Colombian pesos.
• An algorithm is desired to determine the
equivalent temperature in degrees Celsius to the amount of
current Fahrenheit degrees in the city of New York.
• Assuming we are resting in our house
in a city in Colombia I need to make a detailed plan for
arrive on time at my workplace the next day.
• Assuming I have skills in cooking.
I need to make arroz con pollo for 5 people.

Regarding the issues raised:


To specify the input elements of each of the situations
stated do not forget the guiding questions or:

¿What information is important and necessary to solve the problem??


¿What information is not important and can be dispensed with??
¿What are the known input data??
¿What is the unknown or what should we calculate??
¿The data can be grouped into categories?
¿What additional information is needed to solve the problem??

To clarify the expected results, it is recommended to use the


guiding questions:

¿What information are they requesting??


¿In what format should this information be submitted??
Solution section 1
An algorithm is desired to identify the amount of
dollars equivalent to a certain amount of Colombian pesos.

▪ ¿What information is important and necessary to solve the


problem?
Amount in Colombian pesos, value of the dollar.

▪ ¿What are the known input data??


Value of the dollar.

▪ ¿What is the unknown or what should we calculate??


What is the amount of dollars in a sum of Colombian pesos?

▪ ¿What additional information is needed to solve the problem??


Amount of pesos for which the equivalent in pesos is to be known

▪ ¿What information are they requesting??


The amount of dollars equivalent to a value X of Colombian pesos

▪ ¿In what format should this information be delivered??


Real number

Algorithm to identify the amount of dollars equivalent to a


amount of Colombian pesos.
1. Solicitar el valor en pesos colombianos = Valor
[Link] for information on the dollar price in Colombian pesos = P.
dólar: 4,232
[Link] divide Value by dollar price = Value / dollar price
[Link] result will be the amount of dollars equivalent to the value.
solicitado. = Valor/P. dólar = Resultado

Example
1. Valor = 2.500.000
2.P. dólar =4.232
[Link] 2.500.000/P. dólar 4.232
[Link] = 590,7
It is desired to develop an algorithm that allows determining the temperature
equivalent in degrees Celsius to the amount of degrees Fahrenheit
current in the city of New York.

▪ ¿What information is important and necessary to solve the


problem?
Current city temperature, know the conversion formula
between degrees Celsius and degrees Fahrenheit

▪ ¿What are the known input data??


Conversion between degrees Celsius and degrees Fahrenheit

▪ ¿What is the unknown or what should we calculate??


Calculate the conversion of temperature from degrees Celsius to
Fahrenheit degrees

▪ ¿What additional information is needed to solve the problem??


Know the day's temperature in New York.

▪ ¿What information are they requesting??


To know what the current Celsius degrees are equivalent to in degrees.
Fahrenheit

▪ ¿In what format should this information be delivered??


Real number

Algorithm to calculate what degrees Celsius are equivalent to


current in New York in degrees Fahrenheit.
1. Consult the conversion formula from degrees Celsius to degrees.
Fahrenheit = F: (11 °C × 9/5) + 32
[Link] the temperature New York = C°
[Link] the entered value in the formula =
F: (T °C × 9/5) + 32
[Link] the formula = F: (T °C × 9/5) + 32 = R
Assuming we are resting in our house in
a city in Colombia, I need to make a detailed plan to get to
time to my workplace the next day.

▪ ¿What information is important and necessary to solve the


problem?
Starting point, endpoint

▪ ¿What are the known input data??


Starting point, destination point

▪ ¿What is the unknown or what should we calculate??


Text that describes the directions to get from the point of
departure to the arrival point

▪ ¿What additional information is needed to solve the problem??


Type of transport used

▪ ¿What information are they requesting??


Text describing the directions to get from the point of
departure to the arrival point

▪ ¿In what format should this information be delivered??


Text

Algorithm that describes the arrival instructions from the


point A to point B
1. Open navigation apps (waze, maps, etc.)
2. Insert point A = Bosa Recreo
[Link] the destination point B = El Dorado Airport
[Link] which route is the best option.
[Link] the option to start the tour is chosen
6. Walk 10 blocks to the SITP stop
[Link] SITP C-147 heading to Br Bilbao for 55 minutes.
[Link] off the bus at Br. Veracruz Sector II-KR 100 -
CL 25H
9. Cross El Dorado Avenue at the traffic light
[Link] feeder route 16-14 Airport at the first stop.
[Link] 2 stops ahead
[Link] has arrived at point B

Assuming that I have skills in cooking food


I need to make arroz con pollo for 5 people.

▪ ¿What information is important and necessary to solve the


problem?
Ingredientes, Cantidad de personas.

▪ ¿What are the known input data??


Number of people

▪ ¿What is the unknown or what should we calculate??


Cantidad de ingredientes para preparar 5 porciones.

▪ ¿What additional information is needed to solve the problem??


Recipe

▪ ¿What information are they requesting??


Prepare a chicken rice for 5 servings

▪ ¿In what format should this information be delivered??


Rice with chicken“Recipe”

Algorithm describing how to make rice with chicken for 5


people
1. Check the recipe and the ingredients needed for rice
with chicken.
[Link] the recipe that you like for the 5 people.
[Link] the food that is not at home.
2 chicken breasts
3 tablespoons of oil
1 large red bell pepper
1 large yellow bell pepper,
1 large green bell pepper
1 clove of garlic, crushed
1 medium onion
2 cups of rice
2 cups of assorted chopped vegetables (carrot, pea
bean, yellow corn
[Link] the food in advance
Cook chicken breasts, cooked and cut into small pieces
Cut and chop the red pepper, yellow pepper, and the pepper.
green.
Crush the garlic clove, chop the medium onion.
[Link] the oil in a large pot over low heat. Sauté the three
chopped bell peppers, the garlic and the large onion and stir until
take a golden color.
[Link] the 2 cups of rice, the important thing is to stir very well
[Link] 4 cups of water, the chopped vegetables, the chicken breasts and
salt to taste.
[Link] and let cook over medium heat for approximately 15
minutes or until the rice is dry.
9. Once the rice has absorbed all the water, cover the pot and cook at
simmer for 10 to 15 more minutes until the rice is tender.
[Link] rice with chicken
[Link] the person wants, they can add ketchup.

Section 2 Workshop
Conduct a short research using the available materials in the
library or Internet regarding the fundamentals for resolution of
problems with algorithms, select at least three sources that provide you
let's answer the following questions:

▪ Definition of flowchart.
▪ Most important symbols.
▪ Select one of the problems from section 1 and represent it in
its equivalent flowchart.
Solution section 2
▪ Definition of flowchart.
A flowchart is a diagram that describes a process, system
the computer algorithm. They are widely used in numerous fields
to document, study, plan, improve, and communicate processes
which tend to be complex in clear and easy-to-understand diagrams.

▪ Most important symbols.


▪ Select one of the problems from section 1 and represent it in
its equivalent flowchart.

Start

Read value pesos


Colombians

Value in pesos/Value
dólar =4.232

Show result

End

1. Solicitar el valor en pesos colombianos = Valor


[Link] for information on the price of the dollar in Colombian pesos
P. dólar: 4,232
[Link] divide Value by dollar price = Value / dollar price
[Link] result will be the amount of dollars equivalent to the value.
solicitado. = Valor/P. dólar = Resultado

You might also like