core-code-from-scratch-readme
====================================================================================
Pizza de Salchicha Italiana
Ingredientes
Para la masa
1 1/2 tazas de agua water
1 paquete (2 1/4 cucharaditas) de levadura
3 3/4 tazas de harina
2 cucharaditas de aceite de oliva extra-virgen
2 cucharaditas de sal
1 cucharadita de azúcar
Ingredientes y toppings de la pizza
Aceite de Oliva extra-virgen
Salsa de tomate
Queso (de los tipos que prefiera)
Champiñones
Chile pimiento en rodajas (sin semillas)
Salchicha italiana cocinada y en pedacitos (o rodajas)
Aceitunas negras en rodaja
Arúgula
Salsa Pesto
Pepperoni en rodajas
Cebollas en rodaja
Jamón (rodajas finas, cortadas en trocitos)
Preparación
- Haga la masa con los ingredientes indicados
- Estire la masa en el molde y forme orilla
- Ponga la salsa de tomate sobre la masa estirada
- Ponga el queso sobre la salsa (suficiente para cubrirla)
- Ponga los demás ingredientes a su gusto sobre el queso
- Hornear
- Sacar del horno y partir
- DEGUSTAR!!!
====================================================================================
====================================================================================
Hot N Cold
Convertir una temperatura en grados Centígrados a Fahrenheit
- Preguntar la temperatura y definir la escala (Celsius o Fahrenheit)
- Obtener la temperatura en la escala correspondiente
- Utilizar la fórmula de conversión (ºC * 9/5) +32 para convertir de ºC a ºF
- Utilizar la fórmula de conversión (ºF-32) * .5556
- Aplicar la fórmula que corresponda y presentar el resultado
====================================================================================
====================================================================================
Some Geometry Design an algorithm to calculate the volume of a pyramid, a cube and a sphere
- Investigar las fórmulas
- Declarar las fórmulas:
- Pirámide: 1/3 × Largo de la Base × Ancho de la Base × Altura de la pirámide
- Cubo: Tamaño de un lado elevado al cubo (a^3)
- Esfera:4/3(∏r^2)
- Preguntar la figura cuya área se desea calcular
- Una vez elegida, preguntar las variables según la figura:
- Pirámide: medida de largo y ancho de la base, medida de la altura de la pirámide
- Cubo: largo de un lado
-
Esfera: medida del radio de la esfera
- Con los datos solicitados, aplicar la fórmula correspondiente
- Desplegar el resultado
- Preguntar si se desea calcular otra área diferente o el área de otra figura ====================================================================================
Algorithms Session - November 24th
Hay dos hombres. Uno de ellos lleva una camisa roja y el otro lleva una camisa azul. Los dos hombres se llaman Andrew y Bob, pero no sabemos cuál es Andrew y cuál es Bob. EL chico de la camisa azul dice: "Soy Andrew" El chico de la camisa roja dice: "Soy Bob" Si sabemos que al menos uno de ellos mintió, ¿qué color de camisa lleva Andrew?
Premisas: 1 uno de ellos miente: como no sabemos quién, podemos asumir que ambos mienten. 2 Si el de camisa azul dice que es Andrew (mentira) y el de camisa roja dice que es Bob (también mentira) podemos deducir que Andrew trae camisa roja.
Segundo problema: Las 3 cajas y el automóvil Hay tres cajas y exactamente una de ellas tiene un automóvil. Puedes quedarte con el auto si eliges la caja correcta En cada caja hay un enunciado, solamente uno dice la verdad: 1 Caja 1: El auto está en esta caja 2 Caja 2: El auto no está en esta caja 3 Caja 3: El auto no está en la caja 1
Resolución: 1 Asumiendo que la caja 1 dice la verdad: Se contradicen 1 y 2 2 Asumiento que la caja 2 dice la verdad: Se contradicen 1 y 3 3 Asumiento que la caja 3 dice la verdad: Auto en la caja 2
1 Numbers Description Design an algorithm to check if a number is even or odd. If it is even, write that it is even, otherwise write that it is odd. Represent the algorithm in a flowchart.
Expected output A graph showing the steps to verify if a number is even or odd
SOLUTION
- Ask for a number
- Divide the number by 2, if the quotient is an integer, then write "Even Number", else write "Odd number"
=============== 2 How old are you 👴 Description Write pseudocode for an algorithm that calculates the age of a person based on date of birth
Expected output A sequence that tells you how old is someone based on DOB
SOLUTION
- Set date to "TODAY"
- Ask for "Date of Birth"
- Store as "DOB"
- Subtract "DOB" from "TODAY" (TODAY - DOB)
- Save the difference as "result"
- Write the value stored in a sentence as "You are (result) years old"
- End
=============== 3 Find the treasure 👑 Description We are in a room with three chests. We know that at least one has a treasure in it. Each chest has a message, but all the messages are lies.
Left chest: The middle chest has a treasure Middle chest: All these chests have treasures in them Right chest: Only one of these chests has treasures.
Which chests have treasures?
SOLUTION We know ALL messages are lies:
Left chest: The middle chest has a treasure => this is a lie. No treasure in the middle chest. Middle chest: All these chests have treasures in them => this is a lie. This chest does not have a treasure (based on 1), but 1 and 3 might have a treasure. Right chest: Only one of these chests has treasures => this is a lie. More than one can have a treasure. If there is NO treasure in the middle, 1 or 3 may have a treasure, and more than one chest can have a treasure, then: Chest A (left) and Chest C (right) have a trasure.
#=============== Week 2 Logic problem Description The teacher asks his 5 students if they studied mathematics yesterday.
Alice: "Nobody studied math yesterday". Bob: "1 person studied math yesterday". Charlie: "2 people studied math yesterday". Dan: "3 people studied mathematics yesterday". Eva: "4 people studied mathematics yesterday".
The teacher knows that only those who studied would be telling the truth and those who didn't would be lying. Who is telling the truth?
SOLUTION: No one can atest as to how many people studied other than themselves, to Alice, Charlie, Dan and Eva are lying, hence, Bob is telling the truth as he is referring to himself.
Answer: Bob is telling the truth. #===============
===============
Tuesday, November 29 - Algorithms Session
WEEK 2 CHALLENGES
Week challenges (Tuesday) 💻
===============
Install PSeInt
===============
Print my name
Algoritmo My_Name
MyName <- 'Josemiguel Dávila'
Imprimir MyName
FinAlgoritmo
===============
Print my name & age
Algoritmo Name_and_Age
Name <- 'Josemiguel Dávila'
Age <- 47
Imprimir Name
Imprimir Age
===============