Page 1 Lecture Exercise ( Wk3) CS1301 Introduction To Computer Programming (07-08 Semester B) www.cs.cityu.edu.hk/~helena Question 1. There are 3 errors.

Slides:



Advertisements
Similar presentations
Unit 5 Music Using language.
Advertisements

Unit 3 Is this your skirt? A Read and write. Look and say! redpink brown black purple orange white yellow green blue.
SEN Knowing and Growing Confused Claire Presentation.
Come.
Social expressions Social expressions are expressions/vocabulary that are used in social situations.
Manager Video Your inside look at how to use People First.
Lesson 55 Whose clothes are these ? Lecturer: Guo Dali.
Lecture Exercise (9) CS1301 Introduction To Computer Programming (07-08 Semester B) Random Student Numbers 1: 2: 3: 4: 5:
Page 1 Lecture Exercise (Wk4) CS1301 Introduction To Computer Programming (07-08 Semester B) Question 2 According to the following.
1 CS1301 Introduction To Computer Programming (07-08 Semester B) Lecture Exercise (Wk8) Q.1 [Use of while-loop] (a) Write.
Page 1 Lecture Exercise ( Wk2) CS1301 Introduction To Computer Programming (07-08 Semester B) Question 1. MATCHING: html comments.
(CS1301) Introduction to Computer Programming City Univ of HK / Dept of CS / Helena Wong 2. Program Structure I - 1
CS211 Data Structures Sami Rollins Fall 2004.
CS 101 Problem Solving and Structured Programming in C Sami Rollins Spring 2003.
(CS1301) Introduction to Computer Programming City Univ of HK / Dept of CS / Helena Wong 1. Overview of Programming and JavaScript - 1
What are my assignments? Where can I find them? How to organize assignment files? Yong Choi BPA CSUB.
Pronouns in Compound Subjects and Objects *Sometimes you use a pronoun as part of a compound subject.
Complete the following questions. Using either the present simple or continuous. 1. ___you work here? 2. ___she working this week? 3. ___Gillian live near.
Editing Techniques Checking spelling. You have finished writing Now you have to check your spelling. What are my options? – Spellcheck – Proofreading.
Algorithm & Flowchart.
Exporting Gradebook Detail to PASS Step 1: Call Peggy and let her know that you wish to have your Gradebook detail displayed in PASS. She will create the.
What are the possibilities? The students will read to understand a text about baking a birthday cake and be able to write their own recipes. The students.
Sight Word Phrases Group 2. saw a cat at home again.
Welcome to CS 3260 Dennis A. Fairclough. Overview Course Canvas Web Site Course Materials Lab Assignments Homework Grading Exams Withdrawing from Class.
Event Handlers CS101 Introduction to Computing. Learning Goals Learn about event handlers Determine how events are useful in JavaScript Discover where.
Introduction to Python
Language Assessment Skills Training preLAS©
Introduction to JavaScript + More on Interactive Forms.
1. ___ you won’t help us, I’ll have to turn to others. A. Although B. Because C. For D. Now D. Now 2. The matter is worthy _____. A. discussing B. of.
I am ready to test!________ I am ready to test!________
Good morning.
Teaching Speaking Zhang Lu.
How to Make a friend By Alexa. Introduction If you want to learn how to make friends Follow these instructions. And, make sure you read my how to.
Dependent Probability. P(Yellow then Blue) = P (Pink then not blue) = P(Yellow then Yellow) = 3 32 == =
Feelings Everybody has feelings. Feelings Everybody has Feelings! There are many ways to feel! Can you look at someone and know how they feel? Angry Sad.
Algorithms CS139 – Aug 30, Problem Solving Your roommate, who is taking CS139, is in a panic. He is worried that he might lose his financial aid.
CPS120: Introduction to Computer Science Functions.
CPS120: Introduction to Computer Science Lecture 14 Functions.
AS computing Validation and verification. Introduction It is important to maintain the integrity of any database of information. Any data item must always.
Employee Video Your inside look at how to use People First.
Unit 5 My clothes Part A Let’s learn Let’s do 衣服.
3A Unit 4 Wonderland Fashion house A red hat, a green dress, How beautiful! A blue skirt , a white jacket How nice! Yellow shoes,Black trousers, How.
Evaluate Expressions Write Expressions Evaluate With Variables Analyze Patterns Skills To Maintain 100 points 200 points 300 points 400 points 500 points.
Introduction to Programming and JavaScript. Programming.
Welcome!
Unit 2 My Day ---Grammar 2. Unit 2 My Day ---Grammar 2.
Unit 5 My clothes Part A Let’s learn Let’s do. dress red dress.
2c – Textboxes and Buttons Lingma Acheson Department of Computer and Information Science, IUPUI CSCI N331 VB.NET Programming.
Sight Words and are a I can for go have he.
Introduction to Computer Programming 2. Program Structure I - 1http:// Program Structure I (Overview) Handling of Values – The.
Controls for Choices. Let’s look at a couple of new controls: option buttons and check boxes These controls are designed to be used when you want the.
English lớp 10 Unit 11: NATIONAL PARKS Lesson: Writing
Logical Operators.  Quiz  Let's look at the schedule  Logical Operators 2.
Lecture Exercise (Wk4) CS1301 Introduction To Computer Programming (11-12 Semester B) Page 1 Question 2 (a)Complete the code.
CHOOSE 1 OF THESE.
CS1301 Introduction To Computer Programming (11-12 Semester B) Lecture Exercise (Wk8) Q.1 Write the code that asks the user.
1 Structured Programming Arab Academy for Science and Technology CC112 Dr. Sherif Mohamed Tawfik The Course.
Parts of a Sentence. John swims. Dogs run. Children sing. Nouns: JohnDogsChildren.
Random Student Numbers 1: 2: 3: 4: 5: Generate random student numbers: Random Student Numbers 1: : : :
Rewrite Addition Problems as Multiplication Problems using the Distributive Property 6.NS.4 Quick Code LZ2581 Sadlier 6-5A 1/2014.
Hello. Hello. May I speak to…? This is … speaking. Learn to say 怎样打电话.
Page 1 Lecture Exercise ( Wk3) CS1301 Introduction To Computer Programming (11-12 Semester B) Question 1. Fill in the missing.
Development Environment
Responsibilities CS 4501 / 6501 Software Testing
Pronouns in Compound Subjects and Objects
Problem Identification
Responsibilities CS 4640 Programming Languages for Web Applications
Introduction to TouchDevelop
Responsibilities CS 4640 Programming Languages for Web Applications
Chapter 3, Book 2A Longman Welcome to English
Presentation transcript:

Page 1 Lecture Exercise ( Wk3) CS1301 Introduction To Computer Programming (07-08 Semester B) Question 1. There are 3 errors in the given code (one is not visible). Can you find some of them? Question 2. Fill in the missing code: -- In the application, the user can type a name and then click "Invitation", then the corresponding message is updated, with "Dear …" displayed in the span: " Demo <body onload="alert('CS1301 Introduction to Computer Programming');"> CS1301 <a href="javascript: document.getElementById('info') ='CS1301 ' + 'Introduction to Computer Programming ' + ' - Computer programming is the craft of ' + 'writing useful, maintainable, and extensible instructions ' + 'which can be interpreted by a computing system ' + 'to perform a meaningful task. ' ; void(0);"> Display the details LectEx03Q1.html Demo <input type="button" value="Invitation" /> Please come to my birthday party on May 18, See you! Yours, Helena LectEx03Q2.html

Page 2 Lecture Exercise CS1301 Introduction To Computer Programming (07-08 Semester B) if pink say “put it on” else say “pass to sister” if yellow say “put it on” else say “pass to sister” if blue say “put it on” else say “pass to sister” Mother will give Mary a hat. The hat has one single color. But Mary likes pink, yellow, and blue only. For any other color she will pass it to her sister. Mary writes the “code” below. However, the code is often confusing : - Sometimes it says “put it on” but then it will say “pass to sister”. - Sometimes it says “pass to sister” but then it will say “put it on”. Use flowchart to analyze it. Design the correct one. (She should say one single decision only.) When Mary chooses a boy friend, she wants him to be kind, polite and hardworking. She rejects those who are not kind, or not polite, or not hardworking. Which one(s) of the below is/are correct (or confusing)? if kind and polite and hardworking say “let's be friends” else say “please go away”  Correct  Wrong  Confusing if kind or polite or hardworking say “let's be friends” else say “please go away”  Correct  Wrong  Confusing if kind say “Let's be friends!” else if polite say “Let's be friends!” else if hardworking say “Let's be friends!” else say “Great! Let's be friends!”  Correct  Wrong  Confusing if kind if polite if hardworking say “Great! Let's be friends!” say “please go away”  Correct  Wrong  Confusing if not kind say “please go away” else if not polite say “please go away” else if not hardworking say “please go away” else say “Great! Let's be friends!”  Correct  Wrong  Confusing