CS 101: Introduction to computer programming and utilization Abhiram Ranade.

Slides:



Advertisements
Similar presentations
Computer Science 1000 LOGO I. LOGO a computer programming language, typically used for education an old language (1967) the basics are simple: move a.
Advertisements

C Programming for engineers Teaching assistant: Ben Sandbank Home page:
Introduction to Computer Programming in C
Introduction to CS170. CS170 has multiple sections Each section has its own class websites URLs for different sections: Section 000:
COSC 120 Computer Programming
What Data Do We Have? Sections 2.2, 2.5 August 29, 2008.
Welcome to IIT and cs105!. CS Secs Jon Hanrath SB Office Hours: –MW 8:00 A.M. – 9:45 A.M. –W 5:00 P.M. – 6:00 P.M
CS101- Lecture 11 CS101 Fall 2004 Course Introduction Professor Douglas Moody –Monday – 12:00-1:40 – – –Web Site: websupport1.citytech.cuny.edu.
CSC 171 – FALL 2004 COMPUTER PROGRAMMING LECTURE 0 ADMINISTRATION.
COMP 110 Introduction to Programming Mr. Joshua Stough August 22, 2007 Monday/Wednesday/Friday 3:00-4:15 Gardner Hall 307.
Today’s quiz on 8.2 A Graphing Worksheet 1 will be given at the end of class. You will have 12 minutes to complete this quiz, which will consist of one.
Today’s quiz on 8.2 B Graphing Worksheet 2 will be given at the end of class. You will have 12 minutes to complete this quiz, which will consist of one.
Starting Out with C++: Early Objects 5/e © 2006 Pearson Education. All Rights Reserved Starting Out with C++: Early Objects 5 th Edition Chapter 1 Introduction.
Please open your laptops, log in to the MyMathLab course web site, and open Daily Quiz 16. IMPORTANT NOTE: If you have time left out of your five minutes.
CS1104 – Computer Organization PART 2: Computer Architecture Lecture 1 Introduction.
B.A. (Mahayana Studies) Introduction to Computer Science November March Logo (Part 1) An introduction to Logo: drawing, moving,
Copyright 2003 Scott/Jones Publishing Brief Version of Starting Out with C++, 4th Edition Chapter 1 Introduction to Computers and Programming.
CS190/295 Programming in Python for Life Sciences: Lecture 1 Instructor: Xiaohui Xie University of California, Irvine.
Topic 1: Class Logistics. Outline Class Web site Class policies Overview References Software Background Reading.
CS1430: Programming in C++ Section 2 Instructor: Qi Yang 213 Ullrich
Please CLOSE YOUR LAPTOPS, and turn off and put away your cell phones, and get out your note-taking materials. Today’s daily quiz will be given at the.
Alternate Version of STARTING OUT WITH C++ 4 th Edition Chapter 1 Introduction to Computers and Programming.
CSC 125 Introduction to C++ Programming Chapter 1 Introduction to Computers and Programming.
Introduction COMP104: Fundamentals and Methodology.
1 Please switch off your mobile phones. 2 Prolog: The Initiation ET: Hey Alice! What is this on your desk? Alice: That’s a digital computer. ET: Digital.
CSE 1340 Introduction to Computing Concepts Class 2.
CS 101: Arrays Abhiram Ranade. Computers manipulate many objects Given the position, masses, and velocities of all stars, where will they be after the.
Instructor: Tina Tian. About me Office: RLC 203A Office Hours: Wednesday 1:30 - 4:30 PM or .
CS161 Topic #21 CS161 Introduction to Computer Science Topic #2.
Dr. Suzanne Buie, DPT, STC.  For the purposes of this lab, you will be changing your laptop screen into a microscope.  This is not a virtual lab, you.
1 Agenda Administration Background Our first C program Working environment Exercise Memory and Variables.
COMP 171: Principles of Computer Science I John Barr.
CS 114 – Class 02 Topics  Computer programs  Using the compiler Assignments  Read pages for Thursday.  We will go to the lab on Thursday.
1 ITI 1120 Lab # 1 An Introduction to the Lab Environment Contributors: G. Arbez, M. Eid, D. Inkpen, A. Williams, D. Amyot.
CMPSC 16 Problem Solving with Computers I Spring 2014 Instructor: Lucas Bang Lecture 1: Introduction.
CS 140 Computer Programming (I) Second semester (3 credits) Imam Mohammad bin Saud Islamic University College of Computer Science and Information.
CSE 1340 Introduction to Computing Concepts Class 1 ~ Intro.
Computer Programming and Utilization CS101 Spring 2012 Soumen Chakrabarti with CS101 TAs and Staff.
CSE 113 Introduction to Computer Programming Lecture slides for Week 1 Monday, August 29 th, 2011 Instructor: Scott Settembre.
Principles of Computer Science I Honors Section Note Set 1 CSE 1341 – H 1.
Coming Up: Today: Lecture on Section 2.5 More word problems! Next two class sessions after today: 1. Review for Test 1 2. Test 1 on Mon. November 9 th.
Computer Programming & Utilization(CS 101) Pushpak Bhattacharya.
CMSC 104, Lecture 011 Course Introduction CMSC 104 Problem Solving and Computer Programming Spring 2002 Section 0801, Wed 7:00-9:30pm Dr. Thomas Gaeng.
Coming Up: Today: Review Quiz 2 Lecture on Section 2.4: Word problems! NOTE: This homework is due at the beginning of the next class session. Coming up.
CS 1150 – Lab #8 – Using Algorithms for Painting TA – Sanjaya Wijeratne – Web Page -
Introduction Fall 2001 Foundations of Computer Systems Prerequisite:91.166* or * Section A Instructor: Dr. David Hutchinson Office:
Please CLOSE YOUR LAPTOPS, and turn off and put away your cell phones, and get out your note- taking materials.
CS Class 03 Topics  Sequence statements Input Output Assignment  Expressions Read pages Read pages 40 – 49 for next time.
1 CS1430: Programming in C++ Section 2 Instructor: Qi Yang 213 Ullrich
CMSC 1041 Introduction CMSC 104 Problem Solving and Computer Programming Fall 2000 Section 0101 MW 11:00-12:15.
1 4/11/98 Welcome to CSE 143 Martin Dickey University of Washington Spring 1998 Slides based upon those of Ben Dugan, Winter 1998.
Grade Scale Test 1 Results: Average class score after partial credit: XX.X% Commonly missed questions: # _________________ All of this material will be.
CHAPTER 1: INTRODUCTION C++ Programming. CS 241 Course URL: Text Book: C++ How to Program, DETITEL & DEITEL, eighth Edition.
1 Project 2: Using Variables and Expressions. 222 Project 2 Overview For this project you will work with three programs Circle Paint Ideal_Weight What.
Computer Programming for Engineers CMPSC 201C Fall 2000.
CSE 1340 Introduction to Computing Concepts Class 1 ~ Intro.
Course Information CSE 2031 Fall Instructor U. T. Nguyen /new-yen/ Office: CSEB Office hours:  Tuesday,
CS122 Engineering Computation Lab Lab 2 Bruce Char Department of Computer Science Drexel University Winter 2012.
Homeroom (8:00 – 8:10) Go to Under schools click on Alice Robertson Junior High Under Student Resources click on
1 st PeriodAP Computer Science 2 nd PeriodComputer Science I 3 rd PeriodIntroduction to Programming 4 th PeriodComputer Science I/ Advanced Projects Lunch.
Course Information CSE 2031 Fall Instructor U.T. Nguyen Office: CSE Home page:
Coming Up: Today: Review Quiz 2 Lecture on Section 2.4: Word problems! NOTE: This homework is due at the beginning of the next class session. Coming up.
ECE/CS 352 Digital System Fundamentals1 ECE/CS 352 Digital Systems Fundamentals Spring 2001 Introduction Charles R. Kime.
CS 101: Objects Abhiram Ranade. Inside Turtle Graphics ● You have probably guessed that there isnt a real turtle that is obeying your commands, but the.
CS 1150 – Lab #8 – Using Algorithms for Painting
CSE1320 INTERMEDIATE PROGRAMMING
Programming COMP104: Fundamentals and Methodology Introduction.
CS190/295 Programming in Python for Life Sciences: Lecture 1
CSE1320 INTERMEDIATE PROGRAMMING
Presentation transcript:

CS 101: Introduction to computer programming and utilization Abhiram Ranade

Course Overview How to represent problems on a computer and solve them Programming examples to be drawn from CSE, Mathematics, Engineering, and anything fun! C++ programming language Not much on hardware.

Course Resources Textbook: Cohoon & Davidson, C++ Program Design. Lecture slides on course homepage: Other resources from the web Previous years' course pages. Teaching Assistants, and me!

Grading 10 % : Quiz 1 25 % : Midterm 10 % : Quiz 2 40 % : Final Examination 7 % : Lab assignments 8 % : Lab Project

Teachers Lecturer: Abhiram Ranade. 10 Senior Teaching Assistants (Mtech 2)‏  5 lab supervisors  5 other duties 55 Junior Teaching Assistants. (Mtech 1)‏  40 lab supervisors  15 Consultants

Lectures Students divided into 4 divisions. Each lecture first to Divisions 1,2, and again to Divisions 3,4. Div 1,2: Slot 3A,3B.  Mon 10:30-11:30, Tue: 11:30-12:30 Div 3,4: Slots 2A, 2C  Mon 9:30-10:30, Thu: 11:30-12:30 Venue: PC Saxena Auditorium

Lab 10 batches, each with about 70 students. 109Friday 87Thursday 65Wednesday 43Tuesday 21Monday 8:30-10:306:30-8:30

Which batch are you in? You will receive an telling you which batch you are in. Please check your .

Labs Begin This Week Venue: “Old Software Lab”, Ground Floor of Math Building. Show up at your batch time. Lab will be conducted by 1 senior TA and 4 Junior TAs. Each junior TA will grade the work of 1/4th of each batch, called a section. Sections: find out in the first session.

Lab Assignments Assignment for this week: handout will be given when you go to the lab  how to log in,  how to use an editor to write a program,  how to compile the program and run it.  General information about Unix Lab assignments are meant more for you to practice than for us to grade you.

This week’s assignment Use a “Turtle Simulator” developed by your TAs. You can drive around the turtle. Turtle has a pen, so it draws as it moves. To drive the turtle you write a simple C++ program. It is easy, you will all be driving your turtles in no time!

Program to draw a square procedure turtleMain(){ forward(10); right(90); forward(10); right(90); forward(10); right(90); forward(10); }

Procedures and Procedure Calls turtleMain : Procedure you wrote. The simulator will execute this procedure after it sets up the the window on the screen etc. forward(10) : procedure you are asking to execute, “procedure you called”. Other numbers can be given instead of 10. Turtle moves forwards that many steps. right(90): turn right 90˚. Another procedure.

How to run this program Log in to an OSL computer. Open an editor and type in the program call it turtle1.cpp Compile it. Run it Click the “X” to remove the picture.

How to draw a square 2 procedure turtleMain(){ repeat(4){ forward(10); right(90); }

How to draw a polygon procedure turtlec(){ cout << “How many sides?” int nsides; cin >> nsides; repeat(nsides){ forward(10); right(360/nsides); }

Explanation of statements “int nsides;” : Reserve a cell for me in memory in which I will store some integer value, and call that cell “nsides”. “cout <<...”: Print that message on the screen. “cin >> nsides;” Read an integer value from the keyboard and put it in the cell nsides. nside: Variable taking integer values. Can be used wherever numbers may appear.

Repeat Statement repeat (x) {... } : causes the instructions inside { } to be executed x times.

More procedures for you penup(): Causes the pen to be raised. pendown(): Causes the pen to be lowered. (): Unlike forward which needs one number to decide how much forward to move, penup/down does not need any numbers.

Repeat within repeat repeat(4){ repeat(3){ forward(10); penup(); forward(10); pendown(); } right(90); }

A necessary Mantra Put following lines in your file #include ; This allows you to use the turtle simulator.

Homework Draw a 5 pointed star. Draw a 7 pointed star. How many different 7 pointed stars can you have? Draw 7 identical circles, with 6 touching the central circle. Circle = polygon of large no of sides, say 360. Draw 4x4 array of tiles slightly separated from each other.