110 likes | 296 Views
Introduction to Python. Learning to Program. Computer Science. Mathematics Engineering Science Craft Problem Solving. What is Python?. It’s a third generation language It’s an interpreted language. . Third Generation. . Second Generation. . First Generation. . Hardware.
E N D
Introduction to Python Learning to Program
Computer Science • Mathematics • Engineering • Science • Craft Problem Solving
What is Python? • It’s a third generation language • It’s an interpreted language Third Generation Second Generation First Generation Hardware
What is IDLE? • A rather basic text editor • An IDE • Integrated • Development • Environment • New to LHS Not installed by default
Our first program • >>> print(“Hello World!”) • Interactive Mode >>> • Script Mode
What is a program then? • Sequence of instructions • Input • Process • Math • Branches: (Conditional execution) • Loops: (Repetition) • Output THAT’S ALL FOLKS
Whoops! • Programming involves making lots of mistakes. These are called bugs. • There are three types • Syntax errors • Runtime errors • Semantic errors
Programming and Debugging are the same thing! • Only superheroes can write more than a few lines of code without making a mistake. SO We write a tiny program, fix it, write a tiny bit more, fix that, ….. and so on …. ….. forever
Our second program • Using the IDLE editor • Guess what! Print “Hello World!” • Now save it and run it….
Homework • Read through the first chapter of the book • Install Python on your home computer . • Complete Exercise 1.2