Presentation is loading. Please wait.

Presentation is loading. Please wait.

Invent Your Own Computer Games with Python

Similar presentations


Presentation on theme: "Invent Your Own Computer Games with Python"— Presentation transcript:

1 Invent Your Own Computer Games with Python
Week 1 Introduction to Programming Invent Your Own Computer Games with Python

2 Chapter One Installing Python
Learn to Program by game design Computers are GOOD! Sometimes…. What is a program? Step-by-Step Instructions Algorithm Psuedocode Flowchart Source Code

3 Why Learn Programming? …for Fun or just a challenge. People learn programming like a hobby …for a new career. Programmers can usually make a good salary …to fill a need. They need a program to solve a certain problem …as an Intellectual Challenge. Computing is a fascinating study

4 Why Learn Programming? …for Fun or just a challenge. People learn programming like a hobby …for a new career. Programmers can usually make a good salary …to fill a need. They need a program to solve a certain problem …as an Intellectual Challenge. Computing is a fascinating study

5 How Does a Computer Program Work?
Computers don’t do anything without someone telling them what to do! A program is like a recipe. Statements tell the computer what to do with the variables. It contains a list of ingredients: variables and a list of directions - called statements A variable can represent numeric data, text, or graphical images.

6 What is a Computer Program?
An organized list of instructions that, when executed, causes the computer to behave in a predetermined manner. What is a Computer Program? A set of step by step instructions Software Code A program tells the computer how to accept input, manipulate it and turn it into something useful.

7 AND: to be willing to put in the time to learn a new skill, AND,
Isn’t difficult Programming It is time-consuming! All you need is: Curiosity Desire Imagination Programming Isn’t difficult but it is time-consuming All you need is the desire to do the work The curiosity to explore The imagination to create Tenacity, and the willingness to take the time to learn a new skill.. And not be afraid of failing! AND: to be willing to put in the time to learn a new skill, AND, not to be afraid of failing. 

8 Who Writes Programs? Developers Programmers Analysts
Developer, developer, developer, developers! Software Engineers

9 Missile guidance systems
Create Modify Programmers: Write Maintain Develop Missile guidance systems Games Operating Systems Programmers write code, create programs.. Modify, maintain and develop new applications. They write operating systems, games, reports, missile guidance systems and the list goes on.. If you are wise you will pick the most current language and technologies and the best companies and environments to work in and with. Here are two types of career paths.. You choose..

10 Programming Languages
Computers are not very smart.   They really only understand one language, Machine Language.   Machine language is made up of ones (1) and zeros (0). Binary Code       There are 10 kinds of people in the world - those who understand binary and those who don't.

11 Programming Languages
High-level languages C, C++, Pascal, BASIC, QBasic, RPGLE, FORTRAN, COBOL, LISP, Java, Visual Basic, C#, Scripting Languages. Low-level languages The Low-level languages like assembly languages are more difficult to write. They are closer to the language used by a computer, while high-level languages are closer to human languages.

12 HELLO WORLD!

13 Various Language Examples
Basic 10 print"Hello World!“ 20 goto 10 #include <stdio.h> main() { for(;;) { printf ("Hello World!\n");} } C

14 C++ RPGLE #include <iostream.h> main() { for(;;) {
cout << "Hello World! "; } C++ RPGLE H FSCREEN O F CRT C EXCPT OSCREEN E 1 O 'HELLO WORLD!'

15 COBOL 000100 IDENTIFICATION DIVISION. 000200 PROGRAM-ID. HELLOWORLD.
DATE-WRITTEN. 02/05/96 21:04. 000400* AUTHOR BRIAN COLLINS ENVIRONMENT DIVISION. CONFIGURATION SECTION. SOURCE-COMPUTER. RM-COBOL. OBJECT-COMPUTER. RM-COBOL. DATA DIVISION. FILE SECTION. 001200 PROCEDURE DIVISION. 100100 MAIN-LOGIC SECTION. BEGIN. DISPLAY " " LINE 1 POSITION 1 ERASE EOS. DISPLAY "HELLO, WORLD." LINE 15 POSITION 10. STOP RUN. MAIN-LOGIC-EXIT. EXIT.

16 QBASIC Pascal Perl begin: print "Hello World!" goto begin
Program Hello (Input, Output); Begin Writeln ('Hello World!'); End. Perl print "Hello, World!\n" while (1);

17 HTML Java <HTML> <HEAD>
<TITLE>Hello, World Page!</TITLE> </HEAD> <BODY> Hello, World! </BODY> </HTML> Java class HelloWorld { public static void main (String args[]) { for (;;) { System.out.print("Hello World "); }

18 JavaScript Dos batch file <TITLE> Hello World in JavaScript
document.write ("Hello, world!") </SCRIPT> Dos batch file @echo off :top echo "Hello, World!" goto top

19 Python C# # here it is print("Hello, World!") OR x = 1 while True:
using System; namespace ConsoleApplication1 { class Program { static void Main(string[] args) { int number = 0; while(number < 5) { Console.WriteLine(number); number = number + 1; } Console.ReadLine(); } } }

20 That’s enough! Let’s write some code


Download ppt "Invent Your Own Computer Games with Python"

Similar presentations


Ads by Google