Search Header Logo
W4L2

W4L2

Assessment

Presentation

Education

9th Grade

Practice Problem

Easy

Created by

Ayesha Abdullah

Used 10+ times

FREE Resource

7 Slides • 0 Questions

1

media

Week 5

2

Task 3

Suppose you're tasked with developing a software feature that sorts a large list of names alphabetically and then searches for a specific name within the sorted list. How would you break down this problem into smaller, more manageable tasks? Can you outline a step-by-step algorithm to solve each smaller problem, and then explain how you'd combine these solutions to achieve the overall goal?

3

Answer for Task 3

1. Step By Step Algorithms:

  • Receive the list of names and the target name.

  • Use a sorting algorithm (e.g., quicksort) to arrange names alphabetically.

  • Apply binary search to find the target name in the sorted list.

  • Display if the name is found or not.

  1. Combining Solutions:

  • Input the data.

  • Sort the names.

  • Search for the target name.

  • Display the result.

4

Task 4.1

media

5

Task 4.2

  • Start the program

  • Take three numbers n1, n2 and n3 as input.

  • Compare the n1 to the n2 and n3, If it's the largest, print n1.

  • If not, compare the n2  to the n3.if it's the largest, print n2.

  • If not, the n3 is the largest, print n3

  • End the program

6

media

​Task 5.1

7

Task 5.2

Show Welcome message

Prompt user to enter their name

Prompt user to enter their age

Display users age and name in one line

media

Week 5

Show answer

Auto Play

Slide 1 / 7

SLIDE