- Make a variable called “total number of dots” and set its value to 0. Make a string variable called “cards” and set its value to the input entered by the end user (5 black and white cards). Check each letter of the string and if it’s ‘W’ add the corresponding number of dots (16 for the first letter, 8 for the second letter and so on) to the “total number of dots”. Display the “total number of dots” as the output.
- You can access a letter at the specified position in a string by using the 'Letter of' block under “Operators”.