CS 1150 – JavaScript Programming Lab TA – Sanjaya Wijeratne – Web Page -

Slides:



Advertisements
Similar presentations
CS 1150 – Lab #4 – Logic Circuits TA – Sanjaya Wijeratne – Web Page -
Advertisements

CS 1150 – Lab #15 – Networking TA – Sanjaya Wijeratne – Web Page -
CS 1150 – Lab #13 – Artificial Intelligence TA – Sanjaya Wijeratne – Web Page -
CS 1150 – Lab #16A & 16B – HTML TA – Sanjaya Wijeratne – Web Page -
CS 1150 – Lab #16A & 16B – HTML TA – Sanjaya Wijeratne – Web Page -
CS 1150 – Lab #2 – Exploring Number Systems TA – Sanjaya Wijeratne – Web Page -
Lesson 4: Formatting Input Data for Arithmetic
Zhang Hongyi CSCI2100B Data Structures Tutorial 2
Computer Science 103 Chapter 3 Introduction to JavaScript.
Computer Applications for Business CS 170 Yang Yu
CIS101 Introduction to Computing Week 11. Agenda Your questions Copy and Paste Assignment Practice Test JavaScript: Functions and Selection Lesson 06,
CS 299 – Web Programming and Design Overview of JavaScript and DOM Instructor: Dr. Fang (Daisy) Tang.
2012 •••••••••••••••••••••••••••••••••• Summer WorkShop Mostafa Badr
CS 1150 – Lab #2 – Exploring Number Systems TA – Sanjaya Wijeratne – Web Page -
CS 1150 – JavaScript Programming Lab TA – Sanjaya Wijeratne – Web Page -
Introduction to JavaScript. Aim To enable you to write you first JavaScript.
 2004 Prentice Hall, Inc. All rights reserved. Chapter 7 - JavaScript: Introduction to Scripting Outline 7.1 Introduction 7.2 Simple Program: Printing.
WEB DESIGN AND PROGRAMMING Introduction to Javascript.
Course Introduction CS 2302 SPRING Course Introduction In this part we'll discuss course mechanics. Most of this will apply to all sections of the.
 2003 Prentice Hall, Inc. All rights reserved. CHAPTER 3 JavaScript 1.
INE1020 Introduction to Internet Engineering Tutorial 8 All about Lab 6.
Welcome to CS 3260 Dennis A. Fairclough. Overview Course Canvas Web Site Course Materials Lab Assignments Homework Grading Exams Withdrawing from Class.
SEG3210 DHTML Tutorial. DHTML DHTML is a combination of technologies used to create dynamic and interactive Web sites. –HTML - For creating text and image.
CS 1150 – Lab #3 – Representing Numbers TA – Sanjaya Wijeratne – Web Page -
Client Scripting1 Internet Systems Design. Client Scripting2 n “A scripting language is a programming language that is used to manipulate, customize,
Topic: An Introduction to JavaScript - from Beginning JavaScript by Wilton (WROX)
 2003 Prentice Hall, Inc. All rights reserved. CHAPTER 3 JavaScript 1.
Welcome to CS 115! Introduction to Programming. Class URL Write this down!
Introduction.  The scripting language most often used for client-side web development.  Influenced by many programming languages, easier for nonprogrammers.
VBScript. Introduction Visual Basic scripting language is client side scripting language. It is developed by Microsoft VBScript is subset of VB language.
CS 1150 – Lab #3 – Representing Numbers TA – Sanjaya Wijeratne – Web Page -
Software Development CSCI-1302 Lakshmish Ramaswamy.
Welcome to the MTLC MATH 115 Spring MTLC Information  Hours of Operation  Sunday:4:00pm – 10:00pm  Monday – Thursday: 8:00am – 10:00pm  Friday:8:00am.
CS 1150 – Lab #8 – Using Algorithms for Painting TA – Sanjaya Wijeratne – Web Page -
1 JavaScript
Overview of Form and Javascript fundamentals. Brief matching exercise 1. This is the software that allows a user to access and view HTML documents 2.
Internet & World Wide Web How to Program, 5/e © by Pearson Education, Inc. All Rights Reserved.
COMP403 Web Design JAVA SCRİPTS Tolgay KARANFİLLER.
 2008 Pearson Education, Inc. All rights reserved JavaScript: Introduction to Scripting.
HTML Overview Part 5 – JavaScript 1. Scripts 2  Scripts are used to add dynamic content to a web page.  Scripts consist of a list of commands that execute.
Javascript JavaScript is what is called a client-side scripting language:  a programming language that runs inside an Internet browser (a browser is also.
 2003 Prentice Hall, Inc. All rights reserved. Chapter 7 - JavaScript: Introduction to Scripting Outline 7.1 Introduction 7.2 Simple Program: Printing.
CST336, Dr. Krzysztof Pietroszek Week 2: PHP. 1.Introduction to PHP 2.Embed PHP code into an HTML web page 3.Generate (output HTML) web page using PHP.
Chapter 2 Murach's JavaScript and jQuery, C2© 2012, Mike Murach & Associates, Inc.Slide 1.
Introduction to JavaScript CSc 2320 Fall 2014 Disclaimer: All words, pictures are adopted from “Simple JavaScript”by Kevin Yank and Cameron Adams and also.
1 CS 1430: Programming in C++. 2 Input: Input ends with -1 Sentinel-Controlled Loop Input: Input begins with.
CS 1150 – Lab #12B – Databases TA – Sanjaya Wijeratne – Web Page -
Internet & World Wide Web How to Program, 5/e © by Pearson Education, Inc. All Rights Reserved.
Course Information CSE 2031 Fall Instructor U. T. Nguyen /new-yen/ Office: CSEB Office hours:  Tuesday,
CS 160 and CMPE/SE 131 Software Engineering February 11 Class Meeting Department of Computer Science Department of Computer Engineering San José State.
CSC 121 Computers and Scientific Thinking Fall Event-Driven Programming.
Course Information CSE 2031 Fall Instructor U.T. Nguyen Office: CSE Home page:
JavaScript Tutorial First lecture 19/2/2016. Javascript is a dynamic computer programming language. It is lightweight and most commonly used as a part.
 2001 Prentice Hall, Inc. All rights reserved. Outline 1 JavaScript.
CS 1150 – Lab #4 – Logic Circuits TA – Sanjaya Wijeratne – Web Page -
Chapter 6 JavaScript: Introduction to Scripting
CS 1150 – Lab #8 – Using Algorithms for Painting
Introduction to Scripting
Welcome to CS 1010! Algorithmic Problem Solving.
Chapter 7 - JavaScript: Introduction to Scripting
Preparation for Entry into .NET Bridging Program (Databases)
JavaScript: Introduction to Scripting
CS105 Introduction to Computer Concepts
Accelerated Introduction to Computer Science
JavaScript: Introduction to Scripting
Chapter 7 - JavaScript: Introduction to Scripting
Chapter 7 - JavaScript: Introduction to Scripting
CS105 Introduction to Computer Concepts JavaScript
Chapter 7 - JavaScript: Introduction to Scripting
Presentation transcript:

CS 1150 – JavaScript Programming Lab TA – Sanjaya Wijeratne – Web Page -

TA Labs, Office Hours Laboratory Polices Lab Hours 2:30 PM - 4:20 PM, Monday and Friday at Room Oelman Hall TA Office Hours 4:40 PM - 5:40 PM, Monday and Friday at Room Russ Engineer Center By appointment – Please to Refer to CS 1150 Course Syllabus for Class and Laboratory Policies Zero tolerance policy for Academic Misconduct – All parties will get 0% marks CS Lab 2 - Exploring Number Systems2

JavaScript Programming Lab Overview Learn how to write Output Statements, use Message Boxes and Variables Gain an understanding of Conditional Statements Complete Part 1, 2, 3, 4 and 5 (Required for all Students) Extra Credit Question at the End (Worth 3 Points) Lab Due Date - Oct 28, :30 PM CS Lab 2 - Exploring Number Systems3

How to Submit JavaScript Programming Lab Use Pilot Page for this Weeks’s Submission Go to Pilot Course Page and Use Dropbox Submission Link to upload your files I should be able to run your programs. Please submit all your html files and answers/screenshots to pilot Use the checklist to make sure you submitted all files CS Lab 2 - Exploring Number Systems4

What is JavaScript CS Lab 2 - Exploring Number Systems5 Client-side Scripting Language Used to create Dynamic Web Pages Three ways to write JavaScript Code In HTML Header, within Tags In HTML Body, within Tags In Separate.JS file, within Tags

Writing Your First JavaScript Code CS Lab 2 - Exploring Number Systems6 document.write("Hello World"); alert("Hello World"); HTML Code HTML Header Code SCRIPT Tags HTML Body Writes in to HTML File Writes in to a Message Box

Helper HTML Code CS Lab 2 - Exploring Number Systems7 Use a new copy of this template for every section (part 1 – 4)

Part 2 Help CS Lab 2 - Exploring Number Systems8 Input you read through prompt boxes are Strings To perform arithmetic operations on numbers you read through prompt boxes, you need to first convert them to proper data types. var x = 1 – Define variable x and sets its value to 1 x = parseInt(x) – Converts the value stored in variable x to an Integer and stores it in variable x.

Part 3 Help CS Lab 2 - Exploring Number Systems9 var x = 1; if (x== 1) { document.write("x is " + x); } else { document.write("x is not 1"); } Simple conditional (if- else) statement written in JavaScript Run this to see how a conditional (if-else) statement works in JavaScript

Part 4 Help CS Lab 2 - Exploring Number Systems10 You Need to Do Two Tasks Task 1 – Write a Psudo-code or a Flow Chart to Convert Temperature from Celsius to Fahrenheit or from Fahrenheit to Celsius Task 2 – Write a JavaScript Program to Convert Temperature from Celsius to Fahrenheit or from Fahrenheit to Celsius

Part 4 Help Cont. CS Lab 2 - Exploring Number Systems11 You need minimum of three variables Look at the screenshots given at the end to have an idea about the inputs and the output You need to change the variables in the equations given in part 4 using the variables you defined to make temperature calculation work

Part 5 Help CS Lab 2 - Exploring Number Systems12 for (var i=0; i<2; i++) { alert("Hello " + i); } Simple for loop written in JavaScript Run this to see how a for loop works in JavaScript

Part 5 Help Cont. CS Lab 2 - Exploring Number Systems13 var counter = 0; document.write("Starting Loop" + " "); while (counter < 5) { document.write("Current Count : " + counter + " "); counter++; } document.write("Loop stopped"); Copy the code shown Identify what is; Loop initialization step Looping condition (test) Loop update statement Now replace the while loop with a for loop

Extra Credit Help CS Lab 2 - Exploring Number Systems14 Think the following three steps when writing the loop What number should you use at the loop initialization step What should be the loop test or looping condition What should be the loop updating statement Should you increase the loop condition variable or decrease it?

Questions ? If you have questions, please raise your hand, Colin or myself will come to help you CS Lab 2 - Exploring Number Systems15