jarviscodinghub

  • $ 0.00 0 items

web222 assignment 1

WEB222 Assignment 1 – Sections A, B, C solved

$ 24.99

Description

Objective: Practice JavaScript basic syntax, built‐in functions, and user defined functions. Specification: Write a JavaScript program assignment01.js to perform the following tasks. No validation is required for user input – assume that the user will enter valid information. Open a Firefox Scratchpad. Create comment line(s) for each of the Tasks using block comments, indicating the start point of each Task. e.g. /***************************** * Task 1 *****************************/ To run part (e.g. the code for Task 1) of your JavaScript code in Scratchpad, you need to highlight that part of code and click on the Run button. Variable values will be kept in memory after a piece of code is run. So (usually) you need to initialize variables to ensure the part of code can repeatedly give the same result. Task 1: Student Info (use your information) a) Store the following information in variables: student name, number of courses (currently taking), program, having a part‐time job (true/false). b) Output your student info to the browser console as: “My name is ??? and I’m in ??? program. I’m taking ??? course in this semester.” (NOTE: The “???”s should be replaced with variable or calculated values ‐ this also applies to all other outputs containing ??? listed in this assignment). c) Store the string “have” or “don’t have” into a variable based on the value of the variable storing whether or not you have a part‐time job (true/false). d) Output your updated student info to the console as: “My name is ??? and I’m in ??? program. I’m taking ??? course in this semester and I ??? a part‐time job now.” Task 2: Birth and graduate year a) Store the current year in a variable. b) Prompt to user “Please enter your age:” and store the input value in a variable. c) Output the birth year to the console as: “You were born in the year of ???.” d) Prompt to user “Enter the number of years you expect to study in the college:” and store the input value in a variable. e) Output the graduate year to the console as: “You will graduate from Seneca college in the year of ???.” Note: you may need to do some research on JS prompt() method to find out how it works. Task 3: Celsius and Fahrenheit temperatures a) Store a Celsius temperature in a variable. b) Convert it to Fahrenheit and output: “???°C is ???°F”. c) Store a Fahrenheit temperature into a variable. d) Convert it to Celsius and output: “???°F is ???°C.” Note: visit www.manuelsweb.com/temp.htm for temperature conversion formula. Task 4: Even and odd numbers a) Write a for loop that will iterate from 0 to 10. For each iteration, your code should check if the current number is even or odd, and output that information to the browser console (e.g. “5 is odd”). Task 5: Larger or largest number a) Write a function named largerNum using the declaration approach, the function: takes 2 arguments, both numbers, returns the larger (greater) one of the 2 numbers. b) Write a function named greaterNum using the expression approach, the function: takes 2 arguments, both numbers, returns the greater (larger) one of the 2 numbers. c) Call these functions twice with different number parameters, and log the output to the web console with descriptive outputs each time (e.g. “The larger number of 5 and 12 is 12.”). Task 6: Evaluator a) Write a function named Evaluator using the declaration approach, the function: takes unknown number of arguments which are all number scores, returns true if the average of these number scores is greater than or equal to 50. Otherwise return false. b) Call this function 3 times with different number parameters, and log the output to the web console with descriptive outputs each time (e.g. “Average grater than or equal to 50: false”); Task 7: Grader a) Write a function named Grader using the expression approach, the function: takes a single argument which is a number score, returns a grade for the score ‐ “A”, “B”, “C”, “D”, or “F”. (refer to course outline for grading memo) b) Call these functions 3 times with different number score, and log the output to the web console with descriptive outputs each time. Task 8: ShowMultiples a) Write a function called showMultiples using the declaration approach, the function: Takes 2 numeric arguments (num, numMultiples) – assume the user is entering valid (positive) whole numbers Outputs all of the multiples of the num argument from 1 to numMultiples: for example: if num = 5 and numMultiples = 4, the function would output: 5 x 1 = 5 5 x 2 = 10 5 x 3 = 15 5 x 4 = 20 b) Call this function 3 times with different number parameters, and log the output to the web console with descriptive outputs each time. Lab Submission: Save your file as assignment01.js. add the following comment declaration with your info at the top of your code (failure to do so will result in zero mark for the entire assignment): /********************************************************************************* * WEB222 – Assignment 01 * I declare that this assignment is my own work in accordance with Seneca Academic Policy. No part of * this assignment has been copied manually or electronically from any other source (including web sites) * or distributed to other students. * * Name: ______________________ Student ID: ______________ Date: ________________ * ********************************************************************************/ Submit your assignment01.js to the Blackboard / My.Seneca (zip and upload in case my.seneca does not allow uploading plain js file. In the worst case, i.e., you do not know how to zip, you may change the js extension to txt, but you must learn how to zip files for later assignments) Important Note: NO LATE SUBMISSIONS for assignments. Late submissions will not be accepted and will receive a grade of zero (0). After the end (11:00PM) of the due date/time, the assignment submission link on the Blackboard will no longer be available. Allow enough time to upload. Do not wait for the last moment since there are transmission time/queuing delay/processing time etc. from your machine to the blackboard server.

Related products

web222 assignment 1

WEB222 Assignment 4 Styling elements with CSS solution

web222 assignment 1

WEB222 Assignment 1 solution

Web222 assignment 1 – section d, g solution.

web222 assignment 1

Navigation Menu

Search code, repositories, users, issues, pull requests..., provide feedback.

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly.

To see all available qualifiers, see our documentation .

  • Notifications You must be signed in to change notification settings

Festus-Osayi/WEB222-assignment-1

Folders and files.

NameName
1 Commit

Repository files navigation

  • JavaScript 100.0%

COMMENTS

  1. WEB222 assignment 1

    WEB222 assignment 1 observations file and solution assignment declare that this assignment is my own work in accordance with seneca academic policy. no part of

  2. GitHub

    WEB-222 assignment-1. Contribute to wise-introvert/web222-a1 development by creating an account on GitHub.

  3. WEB222 Week 02 Part 4

    Demo of how to get started on Assignment 1 using npm, prettier, eslint, and jest.

  4. A1

    Recommended for you 16 WEB222 assignment 1 Principles of Web Programming Mandatory assignments 100% (2) 6 WEB222 Assignment 3 Index.HTML Principles of Web Programming Practical 100% (4) 12 WEEK 12 WEB 322 Notes Principles of Web Programming Lecture notes 100% (2) 17 WEEK 1 WEB 322 Notes Principles of Web Programming Lecture notes 100% (2) 12 ...

  5. GitHub

    Contribute to helenagomez1211/solved-web222-assignment-1 development by creating an account on GitHub.

  6. DevS0ni/WEB222-Web-Programming-Principles

    This repository contains all the course assignments and notes; all the work I have completed while pursuing the WEB222 course from the Seneca College. - DevS0ni/WEB222-Web-Programming-Principles

  7. WEB222-Assignment 1

    WEB222-Assignment 1 - Free download as PDF File (.pdf), Text File (.txt) or read online for free. The document provides instructions for Assignment 1 which involves creating a flight reservation application using JavaScript. Students are told to create an array of flight objects with details like carrier, flight number, cities, and seats. They must also create functions to calculate flight ...

  8. Assignment-1

    This is a Premium Document. Some documents on Studocu are Premium. Upgrade to Premium to unlock it. Assignment-1 - work Course: Principles of Web Programming (WEB222) 87Documents Students shared 87 documents in this course

  9. GitHub

    No part of this assignment has been copied manually or electronically from any other source (including web sites) except for the information supplied by the WEB222 instructor and / or made available in this assignment for my use.

  10. WEB222 Test 1N

    Related documents Web222ZDD Addendum 2241 Political Science 1AA3 Self Peer Group Assignment Participation Rubric WEB322 In-class Assignment Week10 2237 WEB422 Assignment 1 - Tagged Assignments-js-fundamentals Assignment-1 - Web assignment 11

  11. WEB222 Assignment 1

    WEB222 Assignment 1 - Sections A, B, C solved jarviscodinghub.com Add a Comment

  12. WEB222 Assignment 1

    Task 1: Student Info (use your information) a) Store the following information in variables: student name, number of courses (currently taking), program, having a part‐time job (true/false). b) Output your student info to the browser console as: "My name is ??? and I'm in ??? program.

  13. Gulshanpreet-singh/WEB222-Learning-and-Assignments

    This repository contains all the WEB222 (Web Programming Principles) assignments that I have done as a student at Seneca College. This repo also contains all the notes and the learning material tha...

  14. Assignment-1

    Web assignment 11 assignment instructions introduction this assignment will help you learn and practice javascript syntax, and use and userdefined functions. it

  15. WEB322-Assignment 1

    Related documents Assignment 2 Web222ZDD Addendum 2241 WEB422 Week 2 In-class Assignment WEB422 Week 5 In-class Assignment WEB422 Assignment 2 - assingment WEB222 Assignment 3 Index.HTML

  16. GitHub

    Contribute to Festus-Osayi/WEB222-assignment-1 development by creating an account on GitHub.

  17. Assignment 1

    Principles of Web Programming (WEB222) 104Documents Students shared 104 documents in this course University