Introduction to Problem Types

Please read the following, watch the videos, and try to solve the problems.

Solving Regex Write Code Problems

If you see a problem like the one below you will need to replace your regex with “YOUR_REGEX” in the code. Please do not replace other symbols such as “^” and “$” if they exist.

See the video below for an example.

Try to finish writing the code for the following problem.

Please write a regex that would match the word “apple”. Replace “YOUR_REGEX” with your answer, but do not remove other symbols.

Before you keep reading...

Making great stuff takes time and $$. If you appreciate the book you are reading now and want to keep quality materials free for other students please consider a donation to Runestone Academy. We ask that you consider a $10 donation, but if you can give more thats great, if $10 is too much for your budget we would be happy with whatever you can afford as a show of support.

Solving Mixed-up Code Problems

If you see a problem like the one below you will need to put the mixed-up code in the correct order on the bottom. There will also be extra blocks that are not needed in a correct solution that you can leave on the top row. Click the “Check” button to check your solution.

See the video below for an example.

Try to solve the following mixed-up code problem.

Please write a regex that would match the word “apple”.

What to do next

Click on the following link to go the practice problems: Practice Problems

You have attempted 1 of 5 activities on this page