School ICT Self Study
Absolutely Free Learning Opportunity! No Need to Spend Money! Study at Your Own Pace! Everything You Need is Right Here
UNLOCK YOUR DIGITAL FUTURE!
Free ICT Learning for Sri Lanka
🚀 Welcome to School ICT

Your Gateway to Digital Excellence

🌍
|

Algorithm Representation Tools

380 viewsG11-01. Programming
0

Algorithm Representation Tools

  1. What does an oval symbol represent in a flowchart?

  2. Convert the following pseudo code into a flowchart:

  1. Optimize the following pseudo code to check if a number is prime:

  1. Write pseudo code to assign a grade based on a score (90-100: A, 80-89: B, below 80: C).

  2. When is a switch/case statement preferred over If-Else?

Ruwan Suraweera Changed status to publish
0

Answers and Descriptions

  1. Answer: An oval symbol represents the start or end of a flowchart. Description: Flowcharts use standardized symbols to visualize algorithms. The oval marks the entry or exit point, clearly defining the algorithm’s boundaries.

  2. Answer: Start (Oval) → Input age (Parallelogram) → Decision (Diamond: age >= 18?) → Yes: Output "Eligible to vote" (Rectangle) → No: Output "Not eligible" (Rectangle) → End (Oval). Description: Converting pseudo code to a flowchart reinforces understanding of both tools. The flowchart visually represents the decision-making process for voting eligibility.

  3. Answer:

Description: Optimizing pseudo code reduces iterations. Checking up to the square root of n and breaking when a divisor is found improves efficiency for prime number checks.

  1. Answer:

Description: The If-Else-EndIf structure evaluates conditions to assign grades, demonstrating selection control structures for multi-condition logic.

  1. Answer: Switch/case is preferred when a single variable is tested against multiple fixed values. Description: Switch/case simplifies code for checking a variable (e.g., day of the week) against constants, improving readability over multiple If-Else statements.

Ruwan Suraweera Changed status to publish
🔴 Lesson List
SIDE BUTTON ON
Sign In Register
×

👋 Welcome Back!

🚀
Ready to Learn?Pick up where you left off.
🔑
Forgot Password?Click the link below to reset.
📢
New FeaturesCheck out the new AI Voice tool.

Sign In

👤
🔒
or continue with
Google Facebook

Already have an account? Register Now

🖥️ View Desktop Version Switch to full website view.