Intro to Programming STARS College of Communication and Information Florida State University Written by: Hannah Brock Alissa Ovalle Nicolaus Lopez Martin Sung Presented by: _____________
Overview What is Computer Programming? Different types of Programming Languages Print Statements Loops Conditional Statements Why Program?
What is a Programming Language?
Programming Language A set of rules designed to connect instructions to a machine or computer. Used to write computer programs, which involve computation. Has words, symbols, and rules of grammar called syntax. Each programming language has a different set of syntax rules.
Different types of Programming JavaScript: prominent language for websites. Scripting language. Python: interpreted coding language. Uses everyday language to make it easier to understand and to program. (Google) SQL: (Structured Query Language) used to interact with databases. Queries. PHP: used for dynamic web pages. Ability to send SQL queries and output HTML. C#: desktop software on Windows platforms. Basis of Microsoft’s ASP.NET web development framework. Java: object-oriented designed for cross-platform compatibility. High-level compiled language designed to run on most operating systems.
Different types of Languages
Top Programming Languages of 2015
Basic Language Variables Operations Data Types - int, char, bool, float Machine language Compiler Errors - syntax, runtime, and logic Class description of the representation of a specific kind of object, in terms of data and behavior a blueprint - let’s you see what it will be able to do Object an instance of a class house (objects) are different but all built from the same blueprint (class)
Print Statements
What they are? Print statements print the argument to the screen How to use them? System.out.print()- Prints the argument System.out.println()- Prints the argument & ends the line System.out.printf()- Formats the argument then prints it
Structure of a Java Program import java.util.Scanner; public class FirstProgram { public static void main(String[] args) { System.out.println(“********** Welcome ***********”); int a, b; String name; //this is a comment Scanner input = new Scanner(System.in); System.out.println(“Please enter your birth month (Ex: July - 07):” a = input.nextInt(); System.out.println(“Please enter your birth day (Ex: 10th - 10):” b = input.nextInt(); } //end of main } Class Name The main Method Statements Statement Terminator Reserved Words Blocks Comments
Control Structures: Loops
Loops Control Structures to act on decisions WHILE, FOR, DO...WHILE, NESTED Basic Control Structures Sequence a series of statements that executes one after another Selection (branch) executes different statements depending on certain conditions Loop (repetition) repeats statements while a certain conditions are met Subprogram/Subroutine breaks the program into smaller units functions
Loops: WHILE
Loops: FOR
Conditional Expressions Boolean operators AND OR NOT Relational operators, <=, ==, != IF, ELSE
Why code?
Resources Code.org w3schools.com Codeacademy.com TutorialsPoint.com Lynda.com Khanacademy.com