Hello World! Syntax.

Slides:



Advertisements
Similar presentations
Python Basics: Statements Expressions Loops Strings Functions.
Advertisements

Programming in python Lesson 2.
Introduction to Python
Python Programming Introduction to programming using python.
IPC144 Introduction to Programming Using C Week 1 – Lesson 2
PYTHON: PART 2 Catherine and Annie. VARIABLES  That last program was a little simple. You probably want something a little more challenging.  Let’s.
Input, Output, and Processing
Floating point numerical information. Previously discussed Recall that: A byte is a memory cell consisting of 8 switches and can store a binary number.
Getting Started with MATLAB 1. Fundamentals of MATLAB 2. Different Windows of MATLAB 1.
Python Programming Using Variables and input. Objectives We’re learning to build functions and to use inputs and outputs. Outcomes Build a function Use.
Lesson 6. Python 3.3 Objectives. In this lesson students will learn how to output data to the screen and request input from the user. Students will also.
Copyright © 2012 Pearson Education, Inc. Publishing as Pearson Addison-Wesley C H A P T E R 2 Input, Processing, and Output.
1 Computer Science of Graphics and Games MONT 105S, Spring 2009 Session 1 Simple Python Programs Using Print, Variables, Input.
PROGRAMMING In Lesson 2. STARTER ACTIVITY Complete the starter activity in your python folder – lesson 2 Now we will see how you got on and update your.
PROGRAMMING In. Objectives  We’re learning to develop basic code with the use of the correct syntax and variables. Outcomes  Explain what syntax is.
Lecture 5 1.What is a variable 2.What types of information are stored in a variable 3.Getting user input from the keyboard 1.
Variables and Assignment CSIS 1595: Fundamentals of Programming and Problem Solving 1.
Introduction to Python Dr. José M. Reyes Álamo. 2 Three Rules of Programming Rule 1: Think before you program Rule 2: A program is a human-readable set.
CSC 1010 Programming for All Lecture 3 Useful Python Elements for Designing Programs Some material based on material from Marty Stepp, Instructor, University.
Python Let’s get started!.
PROGRAMMING IN PYTHON LETS LEARN SOME CODE TOGETHER!
1. COMPUTERS AND PROGRAMS Rocky K. C. Chang September 6, 2015 (Adapted from John Zelle’s slides)
CS 177 Recitation Week 1 – Intro to Java. Questions?
COMPUTER PROGRAMMING Year 9 – lesson 1. Objective and Outcome Teaching Objective We are going to look at how to construct a computer program. We will.
Introducing Python 3 Introduction to Python. Introduction to Python L1 Introducing Python 3 Learning Objectives Know what Python is and some of the applications.
Part 1 Learning Objectives To understand that variables are a temporary named location to store data and that programmers work with different data types.
Introduction to Python Lesson 2a Print and Types.
C++ Programming: From Problem Analysis to Program Design, Fourth Edition Chapter 3: Input/Output Samples.
2.1 The Part of a C++ Program. The Parts of a C++ Program // sample C++ program #include using namespace std; int main() { cout
Introducing Python Introduction to Python.
Development Environment
More about comments Review Single Line Comments The # sign is for comments. A comment is a line of text that Python won’t try to run as code. Its just.
Topics Designing a Program Input, Processing, and Output
A Playful Introduction to Programming by Jason R. Briggs
Input and Output Upsorn Praphamontripong CS 1110
Python Let’s get started!.
Introduction to Algorithms
1-1 Logic and Syntax A computer program is a solution to a problem.
Introduction to Python
Lesson 1 An Introduction
Data Transfer ASCII FILES.
Variables, Expressions, and IO
Mathcad Basics The Mathcad does not require any programming language to perform simple operations. The Mathcad follow the precedence of operation such.
Intro to PHP & Variables
IPC144 Introduction to Programming Using C Week 1 – Lesson 2
G7 programing language Teacher / Shamsa Hassan Alhassouni.
Today’s lesson – Python next steps
Introduction to C++ Programming
Programming Right from the Start with Visual Basic .NET 1/e
Language Basics.
For -G7 programing language Teacher / Shamsa Hassan Alhassouni.
CISC101 Reminders Assn 3 due tomorrow, 7pm.
Introduction to TouchDevelop
A look at Small basic The Text Window 2017.
Variables and Expressions
Topics Designing a Program Input, Processing, and Output
Topics Designing a Program Input, Processing, and Output
Introduction In today’s lesson we will look at: why Python?
Chapter 2: Introduction to C++.
Topics Designing a Program Input, Processing, and Output
Topics Designing a Program Input, Processing, and Output
Move this box to see the hints (there are two hints for this code)
Introduction to Python
Introduction to Python programming for KS3
CMPT 120 Lecture 3 - Introduction to Computing Science – Programming language, Variables, Strings, Lists and Modules.
Starter Which of these inventions is: Used most by people in Britain
What you need to do… Drag the pieces of code into the correct order like you can see in the EXAMPLE below. print ( “ int input ) = + Hello world chr ord.
Hardware is… Software is…
Intro to Programming (in JavaScript)
Week 1 - Friday COMP 1600.
Presentation transcript:

Hello World! Syntax

What is syntax? Syntax is the set of rules that determine the correct structure of a language. Our own language has rules, what are some rules, which when not followed, can cause confusion? Let’s eat grandma! A panda eats shoots and leaves Most of the time travelers worry about luggage

Python Syntax “ “ Quotes go around words that don’t change ( ) Parentheses go around what you print or input input and print are special words with meaning in Python = An equals sign assigns a value to a variable , Commas are used to separate the things that print out

Let’s write a program print("What's your name? ") name = input( ) print("Hello, ",name,"!") Save the program as “Hello” Then right click on file and open

Let’s modify our program… Modify the program to ask what day it is and then respond Today is _____ . filling in the blank with the day you typed in. Notice that there’s a period at the end of the sentence.

Abstraction in coding When you give the command to print, what really happens? information stored in the computer’s memory appears on the screen if there are multiple things to print, separated by commas, the computer has to display all of them one after the other the computer has to figure out where the information is stored in its memory the computer has to calculate where the next available space on the screen is. the computer has to translate the binary code in the computer’s memory into dots on the screen for each symbol, one at a time. Do we need to know all of these steps that happen in order to use the print function? No. That’s abstraction. You don’t need the details “under the hood” to make it work.