small series of apps to practice the concepts in Section 4
Detention
Bart needs to write the following paragraph 6 times:
"I will not copy and paste code. I will use Camel Case when writing class names. I will use lower Camel Case when writing function names. I will use lower Camel Case when writing variables names."
I help Bart by writing a function that does the task for him.
- The purpose is to practice defining functions
- And practice calling them
Tip
A small app that tips a waiter 15% of the bill
- Purpose is to practice passing values into functions
Weather
Converts user noon, evening and midnight temperatures from fahrenheit to celsius
- Purpose is to practice returning values from a function
Weather
A program that where a user can choose to draw 4 different types of animals: Butterfly, Elephant, Bear, or Snake.
- Purpose is to practice and understand how to apply logic into functions
Area Calculator
A simple calculator that calculates the area of a square, rectangle, triangle, or circle.
- Purpose is to use built-in functions
- And apply conditional logic (if-else)
Rock, Paper, Scissors
An interactive app where you can play the game Rock, Paper, Scissors.
- User can choose either rock, paper or scissors
- Computer reports its own choice
- Logic determines who wins the game based on the choices