These are a selection of short exercises that will allow you to develop and practice specific skills. Given them a try and start by building towards the success criteria, but then experiment and play around.
These are a selection of short exercises that will allow you to develop and practice specific skills. Given them a try and start by building towards the success criteria, but then experiment and play around.
For this programming task, you will create your own little Mad Lib to build some coding essentials. A Mad Lib is where you select random words to fill in to make a fun and often ridiculous story.
Off the screen: Play with some online Madlibs and write your own off the computer.
Skills:
Variables and type (YouTube Video)
Example Solution: <NOT RELEASED>
You will create a simple program for this programming task that takes in a user name and manipulates it intentionally. This exercise will give comfort with basic string manipulation.
Off the screen: Write down your first name. Above each letter write down the index value, starting at 0.
0123
Paul
First, rearrange the letters in a way to produce a new code. Second, you can think about replacing letters in a pattern to make a new name.
Paul --> Lupa
In the above example, my code name approach was breaking the word in half and switching the front half and back half.
Skills:
Example Solution: <NOT RELEASED>
For this programming
Off the Screen: Write down 5 different formulas that you commonly have to apply. Identify what inputs are required to execute each formula and the output. Consider the type that each variable needs to be.
Skills:
Error Checking Numeric Type
Math module
Functions
Example Solution: <NOT RELEASED>
Off the Screen: Write down a list of 10 random numbers in a row. Then identify the maximum value. How did you do that? Imagine if you had a list of 1 billion integers, how would you find the maximum?
Skills:
reading from a file
writing to a file
traversing a list
loop with nested condition
built-in list functions
primitive and reference types
You will create a program that can identify if an inputed value is a prime and use that to generate lists of primes. This will help highlight ideas around modular programming.
Off The Screen: Write out as many prime numbers as you can think of starting from 2. You can use the image to the right. How did you determine if a number is prime or not from the image? How do you do it normally.
Skills