WEEK 1 Class Activities.

Slides:



Advertisements
Similar presentations
CS1020 Data Structures and Algorithms I Lecture Note #0 Course Admin (AY2014/5 Semester 2)
Advertisements

CS1010 Programming Methodology
CS1010: Programming Methodology
CS1101: Programming Methodology
Chapter 1 Pseudocode & Flowcharts
CS1010 Programming Methodology
Welcome and Administrative Matters.
Programming Basics Aims of Programming: –The aim of programming is to write programs to accomplish complex tasks Programming method: –functional decompositional.
Guide To UNIX Using Linux Third Edition
WEEK 9 Class Activities Lecturer’s slides.
Chapter 1 Pseudocode & Flowcharts
CS1101: Programming Methodology Aaron Tan.
Introduction to High-Level Language Programming
CS1101: Programming Methodology
IPC144 Introduction to Programming Using C Week 1 – Lesson 2
Section 2.4 solving equations with variables on both sides of the equal sign. Day 1.
Welcome and Administrative Matters Lecturer’s slides.
CS 114 – Class 02 Topics  Computer programs  Using the compiler Assignments  Read pages for Thursday.  We will go to the lab on Thursday.
Chapter 1 Introduction to Computers and C++ Programming Goals: To introduce the fundamental hardware and software components of a computer system To introduce.
CS 1308 Computer Literacy and The Internet Software.
CS 140 Computer Programming (I) Second semester (3 credits) Imam Mohammad bin Saud Islamic University College of Computer Science and Information.
WEEK 4 Class Activities Lecturer’s slides.
Adding Mixed Numbers © Math As A Second Language All Rights Reserved next #7 Taking the Fear out of Math
Chapter 1 Introduction Chapter 1 Introduction 1 st Semester 2015 CSC 1101 Computer Programming-1.
Variables on Both Sides. Visual 5x + 6 = 3x + 12.
C++ Basics C++ is a high-level, general purpose, object-oriented programming language.
CSEB 134 Assignment 1 Problem Solving. Instructions  This is a group assignment on Problem Solving  Each group consist 2 or 3 students.  Each group.
CZ1102 Scientific Problem Solving and Computation Monday/Thursday 2:00pm, LT22 Your lecturer: Dr. Wang Jian-Sheng.
CHAPTER 1 INTRODUCTION 1 st Semester H King Saud University College Of Applied Studies and Community Services CSC 1101 Computer Programming-1.
CHAPTER 1 INTRODUCTION 1 st semester H King Saud University College Of Applied Studies and Community Services CSC 1101 Computer Programming-1.
CS221 Algorithm Basics. What is an algorithm? An algorithm is a list of instructions that transform input information into a desired output. Each instruction.
Getting Started with MATLAB (part2) 1. Basic Data manipulation 2. Basic Data Understanding 1. The Binary System 2. The ASCII Table 3. Creating Good Variables.
Chapter 1 - Fundamentals Inequalities. Rules for Inequalities Inequalities.
CHAPTER 1 INTRODUCTION 2 nd Semester H King Saud University College Of Applied Studies and Community Services CSC 1101 Computer Programming-1.
1 CS161 Introduction to Computer Science Topic #4.
CS1101: Programming Methodology
WEEK 6 Class Activities Lecturer’s slides.
HKOI Programming HKOI Training Team (Intermediate) Alan, Tam Siu Lung Unu, Tse Chi Yung.
How Are Computers Programmed? CPS120: Introduction to Computer Science Lecture 5.
CS1020 Data Structures and Algorithms I Lecture Note #0 Course Admin (AY2015/6 Semester 2)
Textbook C for Scientists and Engineers © Prentice Hall 1997 Available at NUS CO-OP at S$35.10.
Welcome and Administrative Matters Lecturer’s slides.
Solving Subtraction Equations Core Focus on Introductory Algebra Lesson 3.4.
CS1010: Programming Methodology Preparing for Practical Exam (PE)
3/4/2016Review of 8-4 & 8-53/4/2016 Problems of the Day Simplify the expression. 3/4/2016 a.b.c.
A radical equation is an equation that contains a radical. BACK.
CS1010: Programming Methodology
WEEK 10 Class Activities Lecturer’s slides.
Factoring Polynomials Grouping, Trinomials, Binomials, GCF & Solving Equations.
Week 12 Class Activities.
WEEK 1 Class Activities.
CS140 – Computer Programming 1 Course Overview First Semester – Fall /1438 – 2016/2017 CS140 - Computer Programming 11.
Chapter 1 Introduction 2nd Semester H
CS1010 Discussion Group 11 Week 3 - Computational Thinking/Algorithms.
CS1010 Programming Methodology
CS1010 Programming Methodology
CS2100 Computer Organisation
CS1010: Programming Methodology Preparing for Practical Exam (PE)
TMC 1414 Introduction to Programming
CS2100 Computer Organisation
Chapter 1 Pseudocode & Flowcharts
Midterm Exam Preperation
Rational Expressions and Equations
COP 3502.
Chapter 1 Pseudocode & Flowcharts
King Saud University College Of Applied Studies and Community Services CSC 1101 Computer Programming-1 Done By: Asmal Alosaimi Edited By: Fatimah Alakeel.
King Saud University College Of Applied Studies and Community Services CSC 1101 Computer Programming-1 Done By: Asmal Alosaimi Edited By: Fatimah Alakeel.
SECTION 10-4 : RADICAL EQUATIONS
Midterm Exam Preperation
Chapter 1 Pseudocode & Flowcharts
Presentation transcript:

WEEK 1 Class Activities

Week 1: Getting Started 1.Welcome and Admin Matters 2.Unit 1: Computing Fundamentals 3.Unit 2: Algorithmic Problem Solving 4.Things-To-Do 5.Announcements CS1010 (AY2015/6 Semester 2)Week1 - 2© NUS

Unit 1: Computing Fundamentals CS1010 (AY2015/6 Semester 2)Week1 - 3 We will go through the document “Getting Started with UNIX and CodeCrunch” ( Objectives: To learn basic UNIX commands, the edit-compile-execute process, and the software use (vim for editing, gcc for compiling) We will do CodeCrunch next week. © NUS

Unit 2: Algorithmic Problem Solving CS1010 (AY2015/6 Semester 2)Week1 - 4 We will go through some tasks on problem- solving. You are to discuss and write the algorithms in pseudo-code. © NUS

Task 1: Area of a Circle (1/2) CS1010 (AY2015/6 Semester 2)Week1 - 5© NUS What is the data? 2a2a Side of square = 2a What is the unknown? Area of circle, C What is the condition? That is, if what is known, then what can be computed? If radius r is known, C can be computed. What would be the next question? How to obtain r ?

Task 1: Area of a Circle (2/2) CS1010 (AY2015/6 Semester 2)Week1 - 6© NUS Pythagoras’ theorem: r 2 = 2 * a 2 Area of circle C =  * r 2 =  * 2 * a 2 a a r

Task 2: Coin Change CS1010 (AY2015/6 Semester 2)Week1 - 7 Given these coin denominations: 1¢, 5¢, 10¢, 20¢, 50¢, and $1, find the smallest number of coins needed for a given amount. You do not need to list out what coins are used.  Example 1: For 375 cents, 6 coins are needed.  Example 2: For 543 cents, 10 coins are needed. © NUS

Task 3: Breaking Up An Integer CS1010 (AY2015/6 Semester 2)Week1 - 8© NUS A common sub-task in many problems involves number manipulation Example: Given a positive integer n, how do you sum up all its individual digits?  The answer for the above example is 19 ( )

Algorithm Before Coding CS1010 (AY2015/6 Semester 2)Week1 - 9 The earlier examples show that we can discuss problems and their solutions (algorithms) without writing out the codes. A sample program development process:  Understanding the problem (if in doubt, ask questions!): 5 minutes  Writing the algorithm: 30 minutes  Testing the algorithm: 20 minutes  Writing the program: 20 minutes  Testing and debugging the program: 30 minutes to 3 hours or more For more complex problems, time spent in thinking about the algorithm could far exceed time spent in writing the program. The more time you invest in writing a good algorithm, the more time you will save in debugging your program. © NUS

Things-To-Do CS1010 (AY2015/6 Semester 2)Week Read the CS1010 Student Handbook Continue to practise the UNIX commands and vim on your own Very important as you will need them in your practical exams Revise Chapter 1 Programming Fundamentals Preparation for next week: Read Chapter 2 Variables, Arithmetic Expressions and Input/Output Read Chapter 3 Lessons 3.1 Math Library Functions and 3.2 Single Character Data © NUS

Announcements CS1010 (AY2015/6 Semester 2)Week Introductory workshop If you think you still need extra help on UNIX and vim after attending today’s sectional session and trying them out yourselves Check out the IVLE forum on the dates and times and how to sign up © NUS

End of File CS1010 (AY2015/6 Semester 2)Week1 - 12© NUS