Create Two Variables
name = "Your name"
age = 15
Write a print statement that will print out the following using the variables above
Hello Your Name. You are 15 years old
Extension:
Add an input prompt to collect the users name and age and print out the sentence with new data.
Number Guessing Game: The user must guess the secret random number between 1 – 100.
Each time the player guesses the program it lets the player know if they need to guess higher, lower or if they got it correct.
The game continues until they guess the secret number.
1. Generate a secret number
2. Prompt the user to guess the secret number and store in a variable
3. Provide feedback to the user
a. Was it correct - End the game when they guess correctly
b. Guess lower – prompt the user to guess again
c. Guess higher – prompt the user to guess again
The school canteen:
Write a program that displays a canteen menu to the user.
The user is then asked what items they would like to buy.
The program adds up the cost of all the items.
The user can buy multiple items
1. Welcome and display the menu
2. Prompt the user to select the items they would like to purchase
3. Ask if they are finished ordering
4. Display the price of all the items purchased
Adding up a perimeter:
Write a program where a user can enter the distance of each side of a polygon shape.
Each time a number is entered it’s tallied up to calculate the total perimeter of the polygon.
The program prints out the total distance
Country Guessing Game:
The program selects a random country from the list of countries and the user needs to guess the answer.
countries = ["Brazil", "Germany", "Australia", "United States"]
The program will provide a clue by showing the first letter of the country and display a _ for the remaining letters.
B _ _ _ _ _
The user is then prompted to guess the country with an input
The program provides feedback
The user keeps guessing until the spell the country name correctly.
Extension:
Add a score
Hint system
Turtle Draw Challenge:
Using the turtle module, draw the first and last initial of your name in square form letters.
Create a python program with a list of people
The program prompts for a user name
The program checks to see of they are on the list
If they are print a greeting or if not print a warning
Move the persons name to an arrived list to keep track of who was a the party
Write a program to keep track of the distance travelled in your car. You will need to keep a list or log of each trip
create a list to store the distance of each trip
Prompt the user to enter the start odometer reading and end odemeter reading
Calculate the differene between the start and end and push this distance to the list
Print how many km they have travelled
Provide a tax estimate by multiplying the toal distance coverered by $0.78c and print out the total