Prof. Alfred J Bird, Ph.D., NBCT Door Code for IT441 Students – 142864* Office – Wheatly.

Slides:



Advertisements
Similar presentations
Bioinformatics is … - the use of computers and information technology to assist biological studies - a multi-dimensional and multi-lingual discipline Chapters.
Advertisements

Python Programming Chapter 2: Variables, expressions, and statements Saad Bani Mohammad Department of Computer Science Al al-Bayt University 1 st 2011/2012.
The Fundamentals of C++ Basic programming elements and concepts JPC and JWD © 2002 McGraw-Hill, Inc.
1 The First Step Learning objectives write Java programs that display text on the screen. distinguish between the eight built-in scalar types of Java;
Prof. Alfred J Bird, Ph.D., NBCT Office – McCormick 3rd floor 607 Office Hours – Tuesday and.
Prof. Alfred J Bird, Ph.D., NBCT Office – Wheatly 2nd floor Office Hours – MW 3:00PM to 4:00PM.
© The McGraw-Hill Companies, 2006 Chapter 1 The first step.
CPS120: Introduction to Computer Science Lecture 8.
Prof. Alfred J Bird, Ph.D., NBCT Office – Wheatly 2nd floor Office Hours – MW 3:00PM.
Hello World 2 What does all that mean?.
Prof. Alfred J Bird, Ph.D., NBCT Office – McCormack 3rd floor 607.
INTRODUCTION TO ALGORITHMS PROGRAMMING. Objectives Give a definition of the term algorithm Describe the various parts of the pseudocode algorithm or algorithm.
Introduction to Computational Linguistics Programming I.
Programming in Python Part I Dr. Fatma Cemile Serçe Atılım University
Introduction to Java Thanks to Dan Lunney (SHS). Java Basics File names The “main” method Output to screen Escape Sequence – Special Characters format()
Recursion.
Visual Basic.NET BASICS Lesson 4 Mathematical Operators.
Introduction to Programming David Goldschmidt, Ph.D. Computer Science The College of Saint Rose Java Fundamentals (Comments, Variables, etc.)
PhD, Senior Lecturer, Baimuratov Olimzhon A LGORITHMS & P ROGRAMMING (P YTHON ) Lecture 2 From SDU:
CSC201 Analysis and Design of Algorithms Asst.Proof.Dr.Surasak Mungsing Oct-151 Lecture 2: Definition of algorithm and Mathematical.
Prof. Alfred J Bird, Ph.D., NBCT Office – McCormick 3rd floor 607 Office Hours – Tuesday and.
Input, Output, and Processing
Jaeki Song ISQS6337 Lecture 01 Introduction. Jaeki Song ISQS6337 Instructor Name: Jaeki Song Office: BA 712 Office Hours Tuesday & Thursday 2:00-3:20.
Prof. Alfred J Bird, Ph.D., NBCT Door Code: * Office – McCormick 3rd floor 607 Office.
Variables and Expressions CMSC 201 Chang (rev )
Prof. Alfred J Bird, Ph.D., NBCT -bird.wikispaces.umb.edu/ Office – McCormick 3rd floor.
Programming for Beginners Martin Nelson Elizabeth FitzGerald Lecture 2: Variables & Data Types.
Pseudocode Simple Program Design Third Edition A Step-by-Step Approach 2.
Copyright © 2012 Pearson Education, Inc. Publishing as Pearson Addison-Wesley C H A P T E R 2 Input, Processing, and Output.
COMP 171: Data Types John Barr. Review - What is Computer Science? Problem Solving  Recognizing Patterns  If you can find a pattern in the way you solve.
Code Grammar. Syntax A set of rules that defines the combination of symbols and expressions.
3 1 Sending Data Using an Online Form CGI/Perl Programming By Diane Zak.
Prof. Alfred J Bird, Ph.D., NBCT Door Code for IT441 Students.
Prof. Alfred J Bird, Ph.D., NBCT Office – McCormick 3rd floor 607 Office Hours – Tuesday and.
Prof. Alfred J Bird, Ph.D., NBCT Door Code for IT441 Students.
1 COMS 261 Computer Science I Title: C++ Fundamentals Date: September 9, 2005 Lecture Number: 6.
Department of Electrical and Computer Engineering Introduction to Perl By Hector M Lugo-Cordero August 26, 2008.
Sequencing The most simple type of program uses sequencing, a set of instructions carried out one after another. Start End Display “Computer” Display “Science”
Prof. Alfred J Bird, Ph.D., NBCT Office – McCormick 3rd floor 607 Office Hours – Tuesday and.
Prof. Alfred J Bird, Ph.D., NBCT Office – McCormick 3rd floor 607.
Prof. Alfred J Bird, Ph.D., NBCT Door Code for IT441 Students.
Copyright © 2009 Pearson Education, Inc. Publishing as Pearson Addison-Wesley STARTING OUT WITH Python Python First Edition by Tony Gaddis Chapter 2 Input,
Python Lesson 1 1. Starter Create the following Excel spreadsheet and complete the calculations using formulae: 2 Add A1 and B1 A2 minus B2 A3 times B3.
Introduction to C++.  Computers: CPU, Memory & Input / Output (IO)  Program: Sequence of instructions for the computer.  Operating system: Program.
PYTHON VARIABLES : CHAPTER 2 FROM THINK PYTHON HOW TO THINK LIKE A COMPUTER SCIENTIST.
Python 1 SIGCS 1 Intro to Python March 7, 2012 Presented by Pamela A Moore & Zenia C Bahorski 1.
Prof. Alfred J Bird, Ph.D., NBCT Office – McCormick 3rd floor 607.
Perl for Bioinformatics Part 2 Stuart Brown NYU School of Medicine.
Bioinformatics Introduction to Perl. Introduction What is Perl Basic concepts in Perl syntax: – variables, strings, – Use of strict (explicit variables)
Prof. Alfred J Bird, Ph.D., NBCT Office – McCormick 3nd floor, room 607 Office Hours –Tuesday.
A Sample Program #include using namespace std; int main(void) { cout
CS0007: Introduction to Computer Programming Primitive Data Types and Arithmetic Operations.
Prof. Alfred J Bird, Ph.D., NBCT Office – McCormick 3rd floor 607.
PROBLEM SOLVING WARM-UP Fill in the spaces using any operation to solve the following (!, (), -/+,÷,×): = 6.
CSCE 206 Structured Programming in C
Programming what is C++
Whatcha doin'? Aims: To start using Python. To understand loops.
Chapter 2: Introduction to C++
IT441 Network Services Administration
IT441 Network Services Administration
Design & Technology Grade 7 Python
Presented By S.Yamuna AP/IT
Variables, Expressions, and IO
Computer Programming Methodology Introduction to Java
2.1 Parts of a C++ Program.
Lecture Notes 8/24/04 (part 2)
Unit 3: Variables in Java
A standard way to simplify mathematical expressions and equations.
Hardware is… Software is…
The Fundamentals of C++
Presentation transcript:

Prof. Alfred J Bird, Ph.D., NBCT Door Code for IT441 Students – * Office – Wheatly 2nd floor Office Hours – MW 3:00PM to 4:00PM

 Perl normally treats lines beginning with a # as a comment.  Get in the habit of including comments with your code.  Put a comment block at the beginning of your code which includes your name, the name of the module, date written and the purpose of the code.

 q// single quoted string  qq// double quoted string  In qq// the // can be replaced with any other non-alphanumeric character provided you use the same character on both ends of the string

 $a = “123”  $b = “456”  What do we get if we write this line of code,  print $a + $b;  How about this line of code,  print $a. $b;

 ** Exponentiation  -Unitary Negation  * Multiplication  /Division  %Modulo (Remainder)  +Addition  -Subtraction

 In mathematics and computer science, an algorithm is an effective method expressed as a finite list of well-defined instructions for calculating a function. Algorithms are used for calculation, data processing, and automated reasoning. In simple words an algorithm is a step-by-step procedure for calculations.

 To use a file we need to attach a filehandle to it.  We do this using the open statement.  A simple example:  open (OUT1, “>testoutout.txt”);  If we open it we want to close it after we are done:  Close (OUT1);  By convention a filehandle is codded in all capital letters

 We want to know for sure that we were successful opening the file so we include a test:  Open (OUT1, “>>test.txt”) or die $!;

 To use a filehandle you wrap it in angle brackets.  Print “Hello World!\n”;  chomp ($in = );

 Remember what the redirectors do:  >  >>  <

1. Calculate the first 50 prime numbers and write them to an output file. 2. Calculate the first 40 members of the Fibonacci Series and write them to an output file. 3. Letter guessing game 4. Number guessing game using

 Complete the four programming exercises.