Download - CS1100 Introduction to Programming
CS1100 – Introduction to Programming
Course Outline
• Introduction to Computing.
• Programming (in C).
• Exercises and examples from various domains.
• Problem solving using computers.
Logistics:
• Instructor: Meghana Nasre.
• Class Hours: 3 times a week.• Wed. 11.00am – 11.50am• Thurs. 9.00am – 9.50am• Fri. 8.00am – 8.50am
• Venue : CRC 101.
Course Outline
• Introduction to Computing.
• Programming (in C).
• Exercises and examples from various domains.
• Problem solving using computers.
Logistics:
• Instructor: Meghana Nasre.
• Class Hours: 3 times a week.• Wed. 11.00am – 11.50am• Thurs. 9.00am – 9.50am• Fri. 8.00am – 8.50am
• Venue : CRC 101.
What is CS1100 about?
• Computer and its components.
• Computing.
• Programming Languages.
• Problem Solving and Limitations of a Computer.
What is a computer?
What is a computer?
• A huge electrical circuit.
• Can accept data fromexternal world, processit, return results to theexternal world.
• What processing can beperformed?
• Determined by theprogram stored on thecomputer.
What is a computer?
What is a computer?
• A huge electrical circuit.
• Can accept data fromexternal world, processit, return results to theexternal world.
• What processing can beperformed?
• Determined by theprogram stored on thecomputer.
What is a computer?
What is a computer?
• A huge electrical circuit.
• Can accept data fromexternal world, processit, return results to theexternal world.
• What processing can beperformed?
• Determined by theprogram stored on thecomputer.
What is a program?
• Program is a precise description of steps that we want toperform on the data.
• Goal of the course: learn to program the computer to performdifferent tasks.
• Programming language: means of communication with acomputer.
• In this course : The C Programming Language• Developed by Dennis Ritchie (1969 – 1973).• Used to “write” the Unix operating system.• One of the most popular programming language.
What is a program?
• Program is a precise description of steps that we want toperform on the data.
• Goal of the course: learn to program the computer to performdifferent tasks.
• Programming language: means of communication with acomputer.
• In this course : The C Programming Language• Developed by Dennis Ritchie (1969 – 1973).• Used to “write” the Unix operating system.• One of the most popular programming language.
What is a program?
• Program is a precise description of steps that we want toperform on the data.
• Goal of the course: learn to program the computer to performdifferent tasks.
• Programming language: means of communication with acomputer.
• In this course : The C Programming Language• Developed by Dennis Ritchie (1969 – 1973).• Used to “write” the Unix operating system.• One of the most popular programming language.
What is a program?
• Program is a precise description of steps that we want toperform on the data.
• Goal of the course: learn to program the computer to performdifferent tasks.
• Programming language: means of communication with acomputer.
• In this course : The C Programming Language• Developed by Dennis Ritchie (1969 – 1973).• Used to “write” the Unix operating system.• One of the most popular programming language.
Goal for today – have fun!
Observe the following patterns:
********************************
********************
********* ** ** *********
• It is very easy to draw to the patterns on paper.
• How about describing the same to a friend on phone?
Goal for today – have fun!
Observe the following patterns:
********************************
********************
********* ** ** *********
• It is very easy to draw to the patterns on paper.
• How about describing the same to a friend on phone?
Describing a pattern
• How do you communicate?
• Use commonly understood commands.
• draw a star.• go to new line.• repeat a set of commands k times.
****************
• repeat 8 times• draw a star.
• go to new line.
• repeat 8 times• draw a star.
Describing a pattern
• How do you communicate?
• Use commonly understood commands.
• draw a star.• go to new line.• repeat a set of commands k times.
****************
• repeat 8 times• draw a star.
• go to new line.
• repeat 8 times• draw a star.
Describing a pattern
• How do you communicate?
• Use commonly understood commands.
• draw a star.• go to new line.• repeat a set of commands k times.
****************
• repeat 8 times• draw a star.
• go to new line.
• repeat 8 times• draw a star.
Can you describe all patterns?
********************************
********************
********* ** ** *********
• draw a star.
• go to new line.
• repeat a set of commands k times.
• move right (without drawing a star).
Can you describe all patterns?
********************************
********************
********* ** ** *********
• draw a star.
• go to new line.
• repeat a set of commands k times.
• move right (without drawing a star).
Summarizing..
What have we achieved?
• Describe simple patterns using a set of commands.
• When required, introduce new commands.(and also inform the friend of its meaning).
• It is a program? Yes
• Is it a program in C? No
• To be able to write programs in C, we need to learn thelanguage.
• That is the goal of this course.
Summarizing..
What have we achieved?
• Describe simple patterns using a set of commands.
• When required, introduce new commands.(and also inform the friend of its meaning).
• It is a program? Yes
• Is it a program in C? No
• To be able to write programs in C, we need to learn thelanguage.
• That is the goal of this course.
Rest of this week..
• A brief history about computers.
• What is a computer made of?• Do we need to know internals of a computer to be able to
program it?
• How does a computer perform so many diverse tasks (numbercrunching, weather prediction, playing chess, ...)?
• Convert every task into a task on numbers.• How to represent numbers on computers?
Rest of this week..
• A brief history about computers.
• What is a computer made of?
• Do we need to know internals of a computer to be able toprogram it?
• How does a computer perform so many diverse tasks (numbercrunching, weather prediction, playing chess, ...)?
• Convert every task into a task on numbers.• How to represent numbers on computers?
Rest of this week..
• A brief history about computers.
• What is a computer made of?• Do we need to know internals of a computer to be able to
program it?
• How does a computer perform so many diverse tasks (numbercrunching, weather prediction, playing chess, ...)?
• Convert every task into a task on numbers.• How to represent numbers on computers?
Rest of this week..
• A brief history about computers.
• What is a computer made of?• Do we need to know internals of a computer to be able to
program it?
• How does a computer perform so many diverse tasks (numbercrunching, weather prediction, playing chess, ...)?
• Convert every task into a task on numbers.• How to represent numbers on computers?
Rest of this week..
• A brief history about computers.
• What is a computer made of?• Do we need to know internals of a computer to be able to
program it?
• How does a computer perform so many diverse tasks (numbercrunching, weather prediction, playing chess, ...)?
• Convert every task into a task on numbers.• How to represent numbers on computers?
Books for the course
• Paul Deitel and Harvey Deitel. C: How to Program.
• V. Rajaraman: Computer Programming in C.
• R. G. Dromey: How to Solve It By Computer?
• Kernighan and Ritchie: The C Programming Language.
Evaluation for the course
• Two Quizzes 30 marks.
• Programming Assignments 25 marks.
• End of Semester Exam 45 marks.
• Attendance taken in the lab and in lectures.
Programming Assignments
• Lab Slot : Tuesdays 3:00pm 5:00pm.
• Venue : Departmental Computing Facility (DCF) in CSEDept.
Policies
• Strictly no cell phone usage in class• Keep your cell phone turned off
(Not even in silent mode)• No SMS, chat etc.
• Cell phones will be confiscated if there are violations
• Returned only after 2 weeks
• Repeat violationsStudents will be sent to the Dean (Acad)
Acknowledgements
• Slides for the course are based on material prepared by facultyof CSE department IITM.
• Ideas will also be drawn from a book by Prof. AbhiramRanade (IITB) (Introduction to programming using C++).
• All images – courtsey Google Images.
• This applies for all slides throughout the course.
Outline
• A brief history of computers.
• Components of a computer.
• Representing numbers on a computer.
From Abacus to Apple
• Counting frame.
• One of the earliest formof calculator.
• Still used by kids to dofast simple arithmetic.
• Followed by mechanical calculators by B. Pascal (1642),G. W. Leibniz (1671).
• Used cogs / interlocking gears.• Performed +,−, ∗, /√.• Leibniz is credited of creating the binary system.
From Abacus to Apple
• Counting frame.
• One of the earliest formof calculator.
• Still used by kids to dofast simple arithmetic.
• Followed by mechanical calculators by B. Pascal (1642),G. W. Leibniz (1671).
• Used cogs / interlocking gears.• Performed +,−, ∗, /√.• Leibniz is credited of creating the binary system.
Charles Babbage (1791–1871)
• Regarded as the “Fatherof Computer”.
• Conceived of a machinethat has all the parts of amodern computer, input,a memory, a processor,and an output (1850).
Difference Engine (1850)
Difference engine built from Babbage’s design (London ScienceMuseum).
Ada Lovlace (1815–1852)
• “Wrote” the descriptionof the mechanicalcomputer of Babbage.
• Regarded as the firstprogrammer ever.
• The programminglanguage ADA is namedafter her.
Alan Turing (1912 – 1954)
• Father of TheoreticalComputer Science (TCS)and Artificial Intelligence(AI).
• Turing machine – amodel for a generalpurpose computer.
• Turing test – howintelligent is a machine?
ENIAC 1946
• Electronic Numerical Integerator And Calculator.
• First electronic computer.
• Massive compared to modern PCs (weight 30 tons).
1946 – 1976
Transistors
Integrated Circuits
Apple Macintosh
1946 – 1976
Transistors
Integrated Circuits
Apple Macintosh
Modern computing devices
What do we learn from History?
• Untiring efforts by several pioneers (Babbage, Turing, VonNeuman, George Boole, Steve Jobs and many unnamedcomputer scientists) have given us the technology that wehave today.
• Several failed attempts and criticisms for path breaking ideas.
• Most of the advances were made by necessity and driven bypassion and immense hard work.