Upload
marcus-hopkins
View
216
Download
4
Embed Size (px)
Citation preview
CS001Introduction to Programming
Day 1
CS001Introduction to Programming
Day 1
Sujana Jyothi([email protected])
2
What will you learn?
• Learn to understand programs• Use the Scratch interactive
development environment (IDE) - Labs
• Learn to solve problems• Understand what we mean by
algorithms
3
Resources
• Resources
– Use the material from NUIM Moodle.
• Save your work
– on your flash drive– or email it to yourself
4
Course StructureLectures/Labs• Monday
11:00-12:00: lecture• Tuesday
9:00-10:00: Lecture• Lab
Friday 11:00 – 13:00
Assignments• Marks out of 2 are given for each of two laboratory
sessions• Two 10 minute quizzes (to be taken during lectures) – 3
marks each.• Total 10 marks for “Introduction to Programming” class.
Attendance• record will be kept for all sessions for lectures and labs
Assessment• will be based on lab work, quizzes & attendance
Computer Programming
Easy to UNDERSTANDINTERESTING to know
&Enjoyable
Programming is simply telling a computer to do a task
Sequence of steps to be followed
Pizza Dough Recipe (Requirements)1. Gather Ingredients2. Combine sugar (1tbs), salt (1tbs),
olive oil (1tbs), flour (1c) in mixing bowl
3. Turn on mixer4. Add 1/4 cup of flour5. If dough comes off the sides go to
step 6, otherwise go back to step 4
6. Knead 15 minutes7. Let rest for at least 45 minutes in
warm area
1 dough ball
N-Pizza Dough Program• Gather Ingredients• Combine sugar (N tbs), salt (N
tbs), olive oil (N tbs), flour (N c) in mixing bowl
• Turn on mixer• Add N/4 cup of flour• If dough comes off the sides go
to step 6, otherwise go back to step 4
• Knead 15 minutes• Let rest for at least 45 minutes in
warm area
N dough balls
N-Pizza Dough Program• Gather Ingredients• Combine sugar (N tbs), salt (N
tbs), olive oil (N tbs), flour (N c) in mixing bowl
• Turn on mixer• Add N/4 cup of flour• If dough comes off the sides go
to step 6, otherwise go back to step 4
• Knead 15 minutes• Let rest for at least 45 minutes in
warm area
Sequence of Statements
N dough balls
N-Pizza Dough Program• Gather Ingredients• Combine sugar (N tbs), salt (N
tbs), olive oil (N tbs), flour (N c) in mixing bowl
• Turn on mixer• Add N/4 cup of flour• If dough comes off the sides go
to step 6, otherwise go back to step 4
• Knead 15 minutes• Let rest for at least 45 minutes in
warm area
N dough balls
Variable
N-Pizza Dough - Program• Gather Ingredients• Combine sugar (N tbs), salt (N
tbs), olive oil (N tbs), flour (N c) in mixing bowl
• Turn on mixer• Add N/4 cup of flour• If dough comes off the sides go
to step 6, otherwise go back to step 4
• Knead 15 minutes• Let rest for at least 45 minutes in
warm area
Conditional
N-Pizza Dough - Program• Gather Ingredients• Combine sugar (N tbs), salt (N
tbs), olive oil (N tbs), flour (N c) in mixing bowl
• Turn on mixer• Add N/4 cup of flour• If dough comes off the sides go
to step 6, otherwise go back to step 4
• Knead 15 minutes• Let rest for at least 45 minutes in
warm area
SubroutinesMini-programs
N dough balls
Tomorrow's Class
• More on Programming• More on Algorithms• Friday – lab using Scratch