SlideShare ist ein Scribd-Unternehmen logo
1 von 10
TRABAJO DE ALGORITMIA
MARTIN JOSE PACHECO MARQUEZ
UNIVERSIDAD COOPERATIVA DE
COLOMBIA
APRENDIENDO
CON ALGORITMOS
¿QUE ES UN
ALGORITMO?
Es una secuencia de
pasos lógicos o reglas
bien definidas,
ordenadas y finitas que
permite realizar una
actividad mediante pasos
sucesivos que no generen
dudas a quien deba
realizar dicha actividad.
QUE ES UN SI
ANIDADO?
Una función SI anidada es cuando una segunda
función SI se coloca dentro de la primera de
manera que pruebe alguna condición adicional.
Las funciones SI anidadas aumentan la
flexibilidad de la función al ampliar el número de
posibles resultados a probar.
EJEMPLO DE UN
SI ANIDADO
Hacer un programa que muestre el
mensaje de acuerdo a la edad ingresada:
Si la edad es de 0 a 10 años “niño”, si la
edad es de 11 a 14 Años “púber”, si la
edad es de 15 a 18 años “adolescente” ,
si la edad es de 19 a 25 años “joven”, si
la edad es de 26 a 65 años “adulto”, si la
edad es Mayor de 65 “anciano”.
ANALISIS DE LA
SOLUCION
Este ejercicio nos pide hallar un mensaje con su
respectiva edad, para ello nos basamos en estos
pasos:
1. Formulación del problema
2. Respuesta esperada
3. Datos disponibles
4. Restricción
5. Procesos necesarios
FORMULACION DEL PROBLEMA
El problema seria que no sabemos cual era el mensaje el
cual iba a imprimir el algoritmo.
RESPUESTA ESPERADA
Saber cual es el mensaje que va a imprimir el algoritmo.
DATOS DISPONIBLES
Si la edad es de 0 a 10 años “niño”, si la edad es de 11 a
14 Años “púber”, si la edad es de 15 a 18 años
“adolescente” , si la edad es de 19 a 25 años “joven”,
si la edad es de 26 a 65 años “adulto”, si la edad es
Mayor de 65 “anciano”, en donde son condiciones.
RESTRICCIÓN
En la restricción es lo que no nos da el algoritmo,
y en este ejercicio lo que no tenemos es la edad
que va a ser ingresada.
PROCESOS NECESARIOS
Son aquellos elementos que vamos a utilizar, como
el ejercicio nos plantea que son muchas
condiciones, utilizaremos un SI ANIDADO ya que
este nos ayudara a resolver este ejercicio de
manera fácil.
PSEUDOCODIOINICIO
Escribir "Digite su edad"
Leer ED
Si ED = 0 o ED <= 10 Entonces
Escribir "Usted es un Niño"
Sino
Si ED=11 o ED<=14 Entonces
Escribir "Usted es un púber"
Sino
Si ED=15 o ED<=18 Entonces
Escribir "Usted es un Adolecente"
Sino
Si ED=19 o ED<=25 Entonces
Escribir "Usted es Joven"
Sino
Si ED=26 o ED<=65 Entonces
Escribir "Usted es un Adulto"
Sino
Escribir "Usted es un Anciano"
Fin Si
Fin Si
Fin Si
Fin Si
Fin Si
FIN
Algoritmos y condicionales SI anidados

Weitere ähnliche Inhalte

Empfohlen

Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTExpeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Applitools
 

Empfohlen (20)

Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 

Algoritmos y condicionales SI anidados

  • 1. TRABAJO DE ALGORITMIA MARTIN JOSE PACHECO MARQUEZ UNIVERSIDAD COOPERATIVA DE COLOMBIA
  • 3. ¿QUE ES UN ALGORITMO? Es una secuencia de pasos lógicos o reglas bien definidas, ordenadas y finitas que permite realizar una actividad mediante pasos sucesivos que no generen dudas a quien deba realizar dicha actividad.
  • 4. QUE ES UN SI ANIDADO? Una función SI anidada es cuando una segunda función SI se coloca dentro de la primera de manera que pruebe alguna condición adicional. Las funciones SI anidadas aumentan la flexibilidad de la función al ampliar el número de posibles resultados a probar.
  • 5. EJEMPLO DE UN SI ANIDADO Hacer un programa que muestre el mensaje de acuerdo a la edad ingresada: Si la edad es de 0 a 10 años “niño”, si la edad es de 11 a 14 Años “púber”, si la edad es de 15 a 18 años “adolescente” , si la edad es de 19 a 25 años “joven”, si la edad es de 26 a 65 años “adulto”, si la edad es Mayor de 65 “anciano”.
  • 6. ANALISIS DE LA SOLUCION Este ejercicio nos pide hallar un mensaje con su respectiva edad, para ello nos basamos en estos pasos: 1. Formulación del problema 2. Respuesta esperada 3. Datos disponibles 4. Restricción 5. Procesos necesarios
  • 7. FORMULACION DEL PROBLEMA El problema seria que no sabemos cual era el mensaje el cual iba a imprimir el algoritmo. RESPUESTA ESPERADA Saber cual es el mensaje que va a imprimir el algoritmo. DATOS DISPONIBLES Si la edad es de 0 a 10 años “niño”, si la edad es de 11 a 14 Años “púber”, si la edad es de 15 a 18 años “adolescente” , si la edad es de 19 a 25 años “joven”, si la edad es de 26 a 65 años “adulto”, si la edad es Mayor de 65 “anciano”, en donde son condiciones.
  • 8. RESTRICCIÓN En la restricción es lo que no nos da el algoritmo, y en este ejercicio lo que no tenemos es la edad que va a ser ingresada. PROCESOS NECESARIOS Son aquellos elementos que vamos a utilizar, como el ejercicio nos plantea que son muchas condiciones, utilizaremos un SI ANIDADO ya que este nos ayudara a resolver este ejercicio de manera fácil.
  • 9. PSEUDOCODIOINICIO Escribir "Digite su edad" Leer ED Si ED = 0 o ED <= 10 Entonces Escribir "Usted es un Niño" Sino Si ED=11 o ED<=14 Entonces Escribir "Usted es un púber" Sino Si ED=15 o ED<=18 Entonces Escribir "Usted es un Adolecente" Sino Si ED=19 o ED<=25 Entonces Escribir "Usted es Joven" Sino Si ED=26 o ED<=65 Entonces Escribir "Usted es un Adulto" Sino Escribir "Usted es un Anciano" Fin Si Fin Si Fin Si Fin Si Fin Si FIN