1 / 18
๐ Welcome Back, Programmer! ๐
Session 2: Your First Real C Program!
Hi [Student Name]! ๐
Ready to write your first lines of code?
โจ Today we become real programmers! โจ
๐ Homework Detective Report! ๐
๐ก
What 3 programmed things did you find in your house?
๐ก
What would you like to program someday?
๐จโ๐ฉโ๐งโ๐ฆ
What did your family say about programming?
๐
Any cool discoveries this week?
โก Quick Memory Challenge! โก
Let's test your Session 1 memory!
๐ค What was our robot making?
๐ค Which programming language are we learning?
๐ What has more code - a car or smartphone?
๐ช What's C programming's superpower?
๐งฉ Programming breaks big problems into...?
๐ฏ Today's Epic Mission! ๐ฏ
๐ง Set up our Programming Workshop
๐จโ๐ป Write our first C program
๐โโ๏ธ Run real code on our computer
๐จ Customize and make it our own
๐ Celebrate becoming a programmer!
By the end of today, you'll be writing real code!
๐ง Building Our Programming Workshop ๐ง
Just like a carpenter needs tools, programmers need special software!
๐ฏ Meet Code::Blocks - Our Chosen IDE! ๐ฏ
๐ป
Why Code::Blocks is Perfect for Us:
- โ
Free - Doesn't cost anything!
- โ
Easy - Beginner-friendly interface
- โ
Complete - Everything we need built-in
- โ
Cross-platform - Works everywhere
- โ
Professional - Real programmers use it!
๐ฅ Installation Adventure! ๐ฅ
Let's set up your programming workshop together!
1. ๐ Go to codeblocks.org
2. ๐ฅ Download for your system
3. ๐ง Install step by step
4. ๐ Launch our new IDE
5. ๐โโ๏ธ Take a tour of the interface
Don't worry if it looks complicated - we'll only use the basics!
๐บ๏ธ Your Programming Cockpit Tour! ๐บ๏ธ
๐ File Menu
Where we create new programs
๐ Code Area
Big white space where we write
๐บ Output Panel
Where we see our program's results
โถ๏ธ Play Button
Runs our amazing programs!
๐ The "Hello, World!" Tradition ๐
Every programmer in the world starts with this same program!
๐
Amazing Facts:
- ๐ This tradition is over 50 years old!
- ๐ Google creators started with "Hello, World!"
- ๐ป Mark Zuckerberg wrote this program too
- ๐ฎ Game developers all began here
- ๐ Even NASA programmers started this way!
๐ป Let's Write Our First C Program! ๐ป
Type exactly what I type - every character matters!
#include <stdio.h>
int main() {
printf("Hello, World!");
return 0;
}
This is real programmer code!
๐ Understanding Our Code! ๐
#include <stdio.h>
๐ "Hey computer, I want to use input/output functions!"
int main()
๐ช "This is where our program starts - the front door!"
printf("Hello, World!");
๐ข "Print this message on the screen!"
return 0;
โ
"Program finished successfully!"
๐พ Save & Run Our Program! ๐พ
1. ๐พ Save as "my_first_program.c"
2. โถ๏ธ Click "Build & Run" button
3. ๐ Watch the magic happen!
4. ๐ See "Hello, World!" appear!
๐ The magic moment is coming! ๐
๐ ๏ธ If We Get Errors - No Problem! ๐ ๏ธ
Even professional programmers get errors! Let's fix them together!
Missing ;
Every statement needs a semicolon!
Like a period in English
Wrong Quotes
Use straight quotes " not curly ones
Computers are picky!
Spelling Errors
printf not Print or PRINTF
Exact spelling matters
Missing Brackets
Every { needs a }
They come in pairs!
๐จ Make It Yours! ๐จ
Let's customize your first program!
Challenge 1: Print your name instead!
printf("Hello, I'm [Your Name]!");
Challenge 2: Make multiple lines!
printf("Hello, I'm learning C!\n");
The \n makes a new line!
Challenge 3: Say whatever you want!
Your message to the world!
๐ญ Creative Ideas for Your Program! ๐ญ
๐ Tell a Joke
"Why don't scientists trust atoms? Because they make up everything!"
๐ Favorite Quote
"Be yourself; everyone else is already taken!"
๐จ ASCII Art
Simple patterns with characters like * and -
๐ Family Message
A special message for your family to see!
๐ Look What You Accomplished! ๐
๐ง Set up professional IDE
๐ป Wrote first C program
๐โโ๏ธ Ran real code
๐ ๏ธ Debugged like a pro
๐จ Customized your code
๐จโ๐ป Officially a programmer!
You're now officially a C programmer! ๐
๐ง Quick Review Quiz! ๐ง
What does printf() do?
(Prints text to the screen)
What does \n do?
(Makes a new line)
Where does our program start?
(int main())
What file extension do we use?
(.c)
๐ Next Week: Variables! ๐
We'll learn how to make programs that remember information!
๐ Fun Homework This Week:
- ๐ Practice: Run your Hello World 3 more times
- ๐จ Experiment: Try different messages
- ๐ Explore: Look at Code::Blocks menus
- ๐ญ Think: 3 things you'd like your program to remember
How does it feel to be a programmer? ๐