Skip to content

Latest commit

 

History

History
29 lines (18 loc) · 1.56 KB

File metadata and controls

29 lines (18 loc) · 1.56 KB

It's around here somewhere

In this lab, you will implement several custom blocks performing variants of sequential search.

Part 1: You there

  1. Write your own version of the contains block, which takes a list and a value as arguments. Then reports true if the value is in the list and reports false otherwise. You should not use the existing contains block in your implementation.

Part 2: Where

  1. Write a custom block called index of that takes a list and a value as arguments and reports the index of the value found in the list. If the value is not in the list, report -1.

Part 3: Tell Me More

  1. Write a custom block called first e-word that takes a list as an argument and reports the first word in the list that starts with the letter 'e'. If no such word exists, report a blank (nothing).

  2. Save your project as Lab4.5.

Bonus: Write a custom block called first word that starts with that takes both a list and a letter as arguments, and reports the first word in the list that starts with the given letter. If no such word exists, report a blank (nothing).

Grading rubric

Criteria Points
1.1 contains block 0.5
2.1 index of block 0.5
3.1 first e-word block 1.0
Bonus: first word that starts with block 0.5
Total 2.0