Pseudocódigos en PSeInt para principiantes
How to Calculate the Perimeter of an Equilateral Triangle
Introduction to Pseudocode
- The speaker greets the audience and introduces the topic of creating pseudocode to calculate the perimeter of an equilateral triangle.
- Emphasizes that only one variable is needed for one side of the triangle, as all sides are equal in an equilateral triangle.
Variables and Constants
- Introduces two variables: one for storing the length of a side (lado) and another for storing the perimeter (perímetro).
- Mentions a constant value, which is 3, used for multiplying the side length to find the perimeter.
Writing Pseudocode
- Begins writing pseudocode by suggesting a title related to calculating perimeter; notes that having a title is optional.
- Describes how to prompt users to input the length of one side using a message displayed on screen.
Performing Calculations
- Explains that since the perimeter is calculated by summing all sides, it multiplies the side length by 3 and stores this result in the variable for perimeter.
- Demonstrates running the pseudocode with sample inputs, confirming its correctness through example outputs.