PROGRAMMING USING PYTHON LANGUAGE ASSIGNMENT 1. INSTALLATION OF RASPBERRY NOOB First prepare the SD card provided in the kit by loading an Operating System.

Slides:



Advertisements
Similar presentations
Introduction to Unix – CS 21 Lecture 11. Lecture Overview Shell Programming Variable Discussion Command line parameters Arithmetic Discussion Control.
Advertisements

Lecture 2 Introduction to C Programming
CS Lecture 03 Outline Sed and awk from previous lecture Writing simple bash script Assignment 1 discussion 1CS 311 Operating SystemsLecture 03.
Shell Programming Software Tools. Slide 2 Shells l A shell can be used in one of two ways: n A command interpreter, used interactively n A programming.
Working with JavaScript. 2 Objectives Introducing JavaScript Inserting JavaScript into a Web Page File Writing Output to the Web Page Working with Variables.
XP 1 Working with JavaScript Creating a Programmable Web Page for North Pole Novelties Tutorial 10.
About the Presentations The presentations cover the objectives found in the opening of each chapter. All chapter objectives are listed in the beginning.
Introduction to C Programming
1 Chapter One A First Program Using C#. 2 Objectives Learn about programming tasks Learn object-oriented programming concepts Learn about the C# programming.
Introducing Java.
A First Program Using C#
Python Programming Fundamentals
Lesson 1: Introduction to ABAP OBJECTS Todd A. Boyle, Ph.D. St. Francis Xavier University.
Introduction to Python Basics of the Language. Install Python Find the most recent distribution for your computer at:
Builtins, namespaces, functions. There are objects that are predefined in Python Python built-ins When you use something without defining it, it means.
Python Control Flow statements There are three control flow statements in Python - if, for and while.
Copyright © 2012 Pearson Education, Inc. Publishing as Pearson Addison-Wesley C H A P T E R 6 Value- Returning Functions and Modules.
Copyright © 2012 Pearson Education, Inc. Publishing as Pearson Addison-Wesley C H A P T E R 2 Input, Processing, and Output.
Introduction to Computational Linguistics Programming I.
1 CSC 221: Introduction to Programming Fall 2012 Functions & Modules  standard modules: math, random  Python documentation, help  user-defined functions,
XP Tutorial 10New Perspectives on Creating Web Pages with HTML, XHTML, and XML 1 Working with JavaScript Creating a Programmable Web Page for North Pole.
Python – Part 1 Python Programming Language 1. What is Python? High-level language Interpreted – easy to test and use interactively Object-oriented Open-source.
1 System Administration Introduction to Scripting, Perl Session 3 – Sat 10 Nov 2007 References:  chapter 1, The Unix Programming Environment, Kernighan.
Copyright © 2010 Certification Partners, LLC -- All Rights Reserved Perl Specialist.
CONTENTS Processing structures and commands Control structures – Sequence Sequence – Selection Selection – Iteration Iteration Naming conventions – File.
Python uses boolean variables to evaluate conditions. The boolean values True and False are returned when an expression is compared or evaluated.
C++ Programming Basic Learning Prepared By The Smartpath Information systems
Python Functions.
CSC 110 Using Python [Reading: chapter 1] CSC 110 B 1.
Introduction to Visual Basic Programming. Introduction Simple Program: Printing a Line of Text Another Simple Program: Adding Integers Memory Concepts.
Perl Tutorial. Why PERL ??? Practical extraction and report language Similar to shell script but lot easier and more powerful Easy availablity All details.
Copyright © 2003 ProsoftTraining. All rights reserved. Perl Fundamentals.
Introduction to Perl. What is Perl Perl is an interpreted language. This means you run it through an interpreter, not a compiler. Similar to shell script.
8 January 2016Birkbeck College, U. London1 Introduction to Programming Lecturer: Steve Maybank Department of Computer Science and Information Systems
1. COMPUTERS AND PROGRAMS Rocky K. C. Chang September 6, 2015 (Adapted from John Zelle’s slides)
Execution ways of program References: www. en.wikipedia.org/wiki/Integrated_development_environment  You can execute or run a simple java program with.
PHP Tutorial. What is PHP PHP is a server scripting language, and a powerful tool for making dynamic and interactive Web pages.
XP Tutorial 10New Perspectives on HTML, XHTML, and DHTML, Comprehensive 1 Working with JavaScript Creating a Programmable Web Page for North Pole Novelties.
Today… Modularity, or Writing Functions. Winter 2016CISC101 - Prof. McLeod1.
Some of the utilities associated with the development of programs. These program development tools allow users to write and construct programs that the.
A High Flying Overview CS139 – Fall 2010 How far we have come.
FILES AND EXCEPTIONS Topics Introduction to File Input and Output Using Loops to Process Files Processing Records Exceptions.
Lecture III Syntax ● Statements ● Output ● Variables ● Conditions ● Loops ● List Comprehension ● Function Calls ● Modules.
Web Database Programming Using PHP
Development Environment
Python’s Modules Noah Black.
CS170 – Week 1 Lecture 3: Foundation Ismail abumuhfouz.
Discussion 2: More to discuss
Introduction Python is an interpreted, object-oriented and high-level programming language, which is different from a compiled one like C/C++/Java. Its.
Web Database Programming Using PHP
Getting Started with C.
Functions CIS 40 – Introduction to Programming in Python
CS139 – Fall 2010 How far we have come
Introduction to Python
Topics Introduction to File Input and Output
An Introduction to Python
First Python Program Professor Hugh C. Lauer CS-1004 — Introduction to Programming for Non-Majors (Slides include materials from Python Programming: An.
Topics Introduction Hardware and Software How Computers Store Data
Loops CIS 40 – Introduction to Programming in Python
Algorithms Take a look at the worksheet. What do we already know, and what will we have to learn in this term?
Topics Introduction to Value-returning Functions: Generating Random Numbers Writing Your Own Value-Returning Functions The math Module Storing Functions.
12th Computer Science – Unit 5
Topics Introduction to File Input and Output
 A function is a named sequence of statement(s) that performs a computation. It contains  line of code(s) that are executed sequentially from top.
Python Basics. Topics Features How does Python work Basic Features I/O in Python Operators Control Statements Function/Scope of variables OOP Concepts.
Chapter 2 part #1 C++ Program Structure
Selamat Datang di “Programming Essentials in Python”
PYTHON - VARIABLES AND OPERATORS
Presentation transcript:

PROGRAMMING USING PYTHON LANGUAGE ASSIGNMENT 1

INSTALLATION OF RASPBERRY NOOB First prepare the SD card provided in the kit by loading an Operating System into it. Step 1- Formatting the SD card: The SD card in mounted on the laptop and resulted to formatting. To ensure proper formatting, a software called SD Association’s Formatting Tool can be used too. Step 2- Formatting the entire device as FAT 3. Download the Noobs Software from the Raspberry pi official website, extract the files and copy them onto the SD card. Load this SD card into the SD card slot and you are ready to go.

PROGRAMMING IN PYTHON Python is an interpreted language wherein a special software reads the code and runs the file. The programs are generally written in an Integrated Development Environment (IDE) which is basically a text editor that is packaged with other tools to make writing a code a lot easier.

WRITING PROGRAMS IN PYTHON The simplest of the language is used to do programming using python. Most of it is natural language. Print ‘Hello World’ can be as simple as – print(‘Hello World’) The IDE we are using here is Python 3 that works like Linux Terminal i.e it runs the given input in the same environment. One more thing to observe here is, we can also create a new file from the Shell, write a program in that and have it executed from the file to the Shell.

FEATURES OF PYTHON LANGUAGE Like any other programming, we can use comments # in this language too. Any basic or complex arithmetic operations can be performed like addition, subtraction, multiplication, division. Variables can be used but they should start with a letter(a-s) or (A-Z) followed by any number, letter or an underscore. They can hold any type of information starting from numbers, strings, boolean set, dictionary to lists etc.

LISTS AND DECISIONS Lists collect items together into a single list. They are ordered- each slot in the list is given a number starting from 0. Decisions is indication of Trueness or Falsity of an expression depending on which, one can use different operations. This is done by using if and if else statements. Many operators can be used like- ==, !=,, =. And for combining two expressions we can use the AND and OR.

LOOPS, FUNCTIONS AND CLASSES OBJECTS Loops are blocks of code that repeat a sequence of Python commands a set number of times, or continuously until a certain condition is met. Functions are mainly used to break a Python program into smaller parts. One must specify arguments while writing functions (An argument is nothing but a variable or a value that one can pass into a function). One can also not use the arguments by specifying the default value for a parameter that is being used in the function. A class is like a blueprint which describes the structure of the objects and defines their methods. Other Object oriented concepts used in python are Inheritance, Methods, Encapsulation etc.

MODULES PACKAGES AND FILE I/O A module is a collection of functions and classes that are related to s specific purpose. Some of the important modules are: base64, curses, http, PIL etc. Packages group modules together in namespaces – organized and hierarchical trees of modules. It is like working with file systems, except you use dots instead of slashes. Raspbian in- built functions can be used to control the I/O system. The operations one can do are- Opening a file, Reading from a file, Writing text to a file, Appending text to a file, Renaming and Deleting files and working with folders.