Curso de Programación en PSEINT [#10] - Ciclo MIENTRAS (Bucle While)

Curso de Programación en PSEINT [#10] - Ciclo MIENTRAS (Bucle While)

New Section

In this section, the instructor introduces the topic of while loops in programming and explains their significance in executing code based on specific conditions.

Introduction to While Loops

  • While loops are essential for repeating instructions as long as a specific condition is met.
  • The loop allows executing a set of instructions multiple times as long as the evaluated condition remains true.
  • The loop evaluates a boolean expression; if true, it executes the specified instruction until the condition becomes false.
  • Proper syntax for a while loop includes defining the logical expression followed by the action to be performed.

Understanding Loop Execution

This part delves into an example demonstrating how while loops function by incrementing a variable until a certain condition is met.

Example: Incrementing Variable Display

  • Demonstrates displaying numbers from 0 to 10 using a while loop with appropriate logic.
  • Introduces the concept of counters within loops to control iterations effectively.
  • Explains incrementing the counter within each iteration to ensure proper execution flow.
  • Illustrates how the program displays incremented values until reaching 10, showcasing successful loop execution.

Alternative Loop Implementation

Explores an alternative approach to implementing loops without relying on counters but rather on conditional statements for termination.

Implementing Loop Without Counter

  • Presents an exercise involving reading grades and counting approvals without using a counter variable.

New Section

In this section, the speaker explains a programming exercise involving loops and conditions to calculate grades and determine the number of students who passed.

Programming Exercise Explanation

  • The speaker introduces a loop structure using "while" to repeat actions based on user input.
  • A variable "nota" is created to store the grade entered by the student.
  • A condition is set where a subject is considered passed if the grade is equal to or greater than three.
  • The program counts the total number of students who passed using a counter variable named "alumno."

Detailed Explanation of Programming Concepts

In this section, the speaker discusses the variation in conditions for validating data and presents an exercise for the audience to practice at home.

Validation of Data Conditions

  • The condition varies for validating data, where if a certain criterion is met (e.g., equal to 1), specific actions are taken; otherwise, the process exits.

Exercise: Book Publication Value Calculation

  • A program creation task is introduced where the goal is to calculate the value of a book publication by multiplying the number of pages by 100. Additional considerations include applying a 10% surcharge if it's not a national edition or if published in 2005.

Interactive Learning and Support

The speaker emphasizes interactive learning through comments, discussions, and providing additional resources for comprehensive understanding.

Interactive Learning Approach

  • Encouragement for audience participation through comments to share doubts, engage in debates, and ensure correct understanding.

Continuous Learning Support

  • Emphasis on acquiring programming fundamentals applicable across languages. Viewers are advised to revisit videos or explore previous course chapters for better comprehension.

Resource Enhancement and Feedback Loop

Video description

Esta estructura nos permite repetir un bloque de instrucciones con una condición y se repite mientras esta condición sea verdadera, sino no entra al ciclo. El ciclo Mientras (While) tiene que tener su final y salirse de él, tiene un limite y su limite es hasta que la condición ya no se cumpla, o sea que se vuelva 'falsa'. En este vídeo aprenderás: ● Ciclo Mientras ● Como usarlo correctamente ● Como añadir un contador o acumulador ● Manipular el ciclo ● Cerrar ciclo Mientras en Pseint ➜ DONACIONES: https://goo.gl/PTx3pB ★ Mira el curso completo aquí► https://goo.gl/hNB6Gt 🎓 CURSO DE PROGRAMACIÓN EN C: https://www.youtube.com/watch?v=G6TTfcmNrxk&list=PL4Wdg-psRY0Z5MUmym8-0NQff4ncjwOoo&index=1 🖥️ CURSO BÁSICO DE PROGRAMACIÓN EN PSEINT: https://www.youtube.com/watch?v=nMoFtd4ln28&list=PL4Wdg-psRY0ZEzlAaglj6Lm-q_vXi_arU ⬇️ Series de este canal ⬇️ 🖥️ Hardware Para Novatos [TODO SOBRE PC'S] - https://goo.gl/iYtTiS 💻 TOP 10 [Los Mejores Juegos para PC] - https://goo.gl/t5s9UB 📱 Mejores Juegos para Android & iOS - http://bit.ly/36LBQAx 🎁 Mega Packs - Recursos Gratuitos - https://bit.ly/3wHH6o7 ⚙️ Reviews, Unboxings y Tecnología - https://bit.ly/3QVqTE0 ⌨️ Tutoriales y Soluciones Informáticas - https://bit.ly/38KsDyw --------------------------------------------------------------------------------------------------- 🖥️【 MI PC 】🎬 https://youtu.be/zHd4HLXmkXI 🔹️ Procesador: AMD Ryzen 5 5600G: https://amzn.to/3xZ22YD 🎬Review: https://youtu.be/MJXo-sPOho8 🔹️ Placa Madre: ASUS Prime A520M-A II/CSM : https://amzn.to/3O0cGCX 🎬Review: https://youtu.be/YbXUJTzD_58 🔹️ Gabinete - Cooler Master MasterBox TD500: https://amzn.to/3b2saZs 🔹️ Fuente - Thermaltake Smart 500W: https://amzn.to/3O3Vg9A 🔹️ RAM - TEAMGROUP T-Force Delta RGB DDR4: https://amzn.to/3OibQSx 🎬Review: https://youtu.be/etFWa0Ia3vk 🔹️ Kingston SSD 480 GB: https://amzn.to/3tC3hKn 🔹️ Kingston SSD 1 TB: https://amzn.to/3xUsJgX ☑️ Micrófono: HyperX Quadcast - https://amzn.to/3fEGoyB 🎬Review: https://youtu.be/JA2n84ck7_k ☑️ Cámara Web: Logitech Brio 4k - https://amzn.to/3LmAAYT 🎬Review: https://youtu.be/8fYSlPcnCqQ ☑️ Tira LED RGB 5050 - https://amzn.to/3odxZHo ☑️ Brazo para Micrófono - https://amzn.to/3KSqNKp ☑️ Teclado Mecánico - https://amzn.to/3s8VIJA ☑️ Mouse Logitech G203 - https://amzn.to/3oapYTy 💻 ¡LINK! - Si compras con mi link afiliado de Amazon, ¡ayudas al canal y NO te cuesta más! --------------------------------------------------------------------------------------------------- También me puedes encontrar en: 💌 CANAL PRINCIPAL: https://www.youtube.com/@TheSegaRed 🃏 CANAL RESPALDO: https://www.youtube.com/@SegaTech_ 💰 FINANZAS PERSONALES: https://www.youtube.com/@CapsulaFinanciera 📲 FACEBOOK: https://www.facebook.com/thesegared 📷 INSTAGRAM: https://instagram.com/thesegared 🌎 SITIO WEB: https://segared.blogspot.com/