0% found this document useful (0 votes)
2 views

Coding Robotics Week 1-2

This 4-hour course introduces Python programming, covering basic concepts such as variables, user input, and simple math operations. Students will engage in hands-on projects, including a math game and a personalized greeting program, to reinforce their learning. By the end of the course, participants will have a foundational understanding of Python and experience in creating interactive programs.

Uploaded by

mokomgeh1
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Coding Robotics Week 1-2

This 4-hour course introduces Python programming, covering basic concepts such as variables, user input, and simple math operations. Students will engage in hands-on projects, including a math game and a personalized greeting program, to reinforce their learning. By the end of the course, participants will have a foundational understanding of Python and experience in creating interactive programs.

Uploaded by

mokomgeh1
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Course Overview:

• Duration: 4 Hours

• Goal: Introduce Python programming, including basic concepts like variables, user input, and
simple math operations, and have students complete two interactive projects.

Course Structure:

Hour 1: Introduction to Python and Basic Concepts

(15 minutes) Introduction to Python

• What is Programming?

o Briefly explain programming and how it is used in daily life (e.g., apps, games, robots).

o Python is a beginner-friendly programming language used in various fields (game


development, web development, robotics).

• Setting Up Python

o Show how to open Python (e.g., using Thonny or IDLE) and explain how to write and
run Python code.

(30 minutes) Variables and Data Types

• What is a Variable?

o Explain variables as storage containers for values (numbers, text).

o Introduce Integers (whole numbers), Floats (decimal numbers), and Strings (text).

o Example: x = 5 (integer), y = "Hello" (string).

• Simple Math with Python

o Teach how to perform basic arithmetic operations: addition, subtraction,


multiplication, division.

o Example: x = 5 + 3, y = 10 - 2, z = 5 * 2.
• Interactive Activity:
Let students write simple math programs:

x=5

y = 10

z=x+y

print(z)

Hour 2: Working with User Input

(20 minutes) Taking User Input

• What is User Input?

o Introduce the input() function, which allows users to interact with the program.

o Example: name = input("What is your name? ")

• Interactive Activity:
Students write a program that asks for their name and age and prints a greeting:

name = input("What is your name? ")

age = input("How old are you? ")

print(f"Hello {name}, you are {age} years old!")

(10 minutes) String Manipulation

• Combine Strings: Teach how to use + to combine (concatenate) strings.

o Example: greeting = "Hello " + name.

• Interactive Activity:
Students modify their greeting program to include their favourite colour:

color = input("What is your favourite colour? ")

print(f"Hello {name}, you are {age} years old and your favourite colour is {colour}.")

Hour 3: Simple Python Projects


(30 minutes) Project 1: Math Game

• Goal: Build a simple math game that asks a user to answer basic math questions.

• Project Walkthrough:

o Use random.randint() to generate random numbers for math questions.

o Example: "What is 3 + 5?"

o Program checks the user’s answer and gives feedback.

o Code:

import random

# Generate two random numbers

number1 = random.randint(1, 10)

number2 = random.randint(1, 10)

# Ask the user for an answer

answer = int(input(f"What is {number1} + {number2}? "))

# Check if the answer is correct

if answer == number1 + number2:

print("Correct!")

else:

print("Oops! Try again.")

• Activity:
Let students create their own version of the math game with random questions.

Hour 4: Final Project & Wrap-Up

(20 minutes) Project 2: Personalized Greeting Program


• Goal: Build a program that asks the user for their name, age, and favourite colour, and then
gives a personalized greeting.

• Project Walkthrough:

o Combine everything learned so far: user input, variables, and string manipulation.

o Example code:

name = input("What is your name? ")

age = input("How old are you? ")

color = input("What is your favourite colour? ")

print(f"Hello {name}, you are {age} years old and your favourite colour is {colour}.")

• Activity:
Students can customize their greeting program by adding fun details like their hobbies or
favourite food.

(10 minutes) Review & Q&A

• Quick Review:

o Recap the key points: Variables, Data Types, User Input, Simple Math, and String
Manipulation.

• Q&A Session:
Answer any questions the students may have about Python or the projects they created.

(10 minutes) Fun Farewell Challenge

• Challenge:
Give students a small coding challenge to try at home:
“Create a program that asks for your favourite number and then tells you what the number
multiplied by 10 is.”

Key Concepts Covered:

1. Variables and Data Types: Understanding how to store and manipulate numbers and text.
2. User Input: How to collect data from users and use it in the program.

3. String Manipulation: Combining text to create dynamic messages.

4. Simple Math Operations: Using Python for basic arithmetic calculations.

5. Building Fun Projects: Hands-on projects that make learning interactive and engaging.

Engaging Elements:

1. Hands-on Projects: Interactive math game and personalized greeting program keep kids
excited and learning by doing.

2. Real-world Application: Showing how coding is used in video games and apps makes the
content more relatable.

3. Customizable Challenges: Letting students personalize their projects encourages creativity


and deeper learning.

By the end of the course, students will have a solid understanding of basic Python programming and
have built two simple but fun projects!

You might also like