Create a jes function named level1 and include the relevant


All of your code must be in a single JY file named assignment2.jy. Each of the following levels (except level 0, which is not code) must be attempted in its own function (e.g. level 1 in level1(), etc.).

While you are permitted to create helper/utility functions that may be shared between the different levels, there must not be any direct interactions between the functions of different levels. E.g. level2() must never call level1(), etc. While this may not be ideal, if there is an issue with one level, we can still mark the other levels for what they are.

Level 0: Data preparation

Before any coding, prepare your data based on the given guidelines. You must create at least one character image (needed for level 1) and at least one image containing the text to detect. The text to detect must contain at least two occurrences of the chosen character and as shown must be just a single row of text.

Level 1: Detect instances of one character

Create a JES function named level1() and include the relevant behaviours. Specifically, in this level, you only need to detect just one character from the text and the text is only in a single row. The text image needs to have at least two occurrences of the character that you have chosen to detect.

Level 2: Detect all characters including space

Copy, paste and extend your level1() in a function named level2() so that all characters (uppercase A to Z and space) can be detected.

Hint: There is no need to use lists for level 2 (see level 3) but there will be a lot of code repetition (which is permitted for this level).

Tip 1: Look up "QUICK BROWN FOX..." (or similar) when preparing your text image to detect.

Tip 2: As having one image file per character mask can be tedious, feel free (but it is not a requirement) to create a single image with characters A-Z and "extract" the masks from that. You can manually enter/assume the bounding coordinates of each character.

Level 3: Using lists/arrays

Copy, paste and extend the level2() function in a function named level3() for this level. You must now store the character mask picture objects for A to Z and the space character in a list/array. This should significantly reduce code repetition that you would have in level 2.

 

Request for Solution File

Ask an Expert for Answer!!
Python Programming: Create a jes function named level1 and include the relevant
Reference No:- TGS0992784

Expected delivery within 24 Hours