1. Look carefully at the program shown below and answer the questions that follow.
|
|
- Doris Barton
- 6 years ago
- Views:
Transcription
1 1. Look carefully at the program shown below and answer the questions that follow. a. What is the name of the class of this program? BillClass b. Identify one variable that holds a String. item c. What data type is variable quantity declared? int (of type integer) d. In which line is a constant variable declared? Line 6 e. To what value is the constant variable initiated? 18 f. Identify one line which outputs a prompt. Line 8/10/12/18/21/24 g. Why is VAT declared as a constant and what is the advantage of doing this? VAT still holds a place in memory just like a variable. However, the value of constants do not change during program execution and we want the value of VAT to remain the same. ADV: if the VAT value changes, you just need to 1 Margaret Bajada (2017) replace it with the new value once. 1 Margaret Bajada (2017)
2 h. Which line is outputting the cost of the items bought including the VAT? Line 24 i. What is the difference between the + shown in line 21 and the + in line 23? The + in line 21 - concatenation of strings The + in line 23 - performs addition j. Identify one line in which automatic type conversion is taking place. Line 20 k. Write down the lines where input from the user is requested. Lines 9, 11, 13 l. Write down the statement that prints a blank line. System.out.println(); m. What is the difference between Keyboard.readString(), Keyboard.readInt() and Keyboard.readDouble()? Keyboard.readString(); - accepts a String from the user. Keyboard.readInt(); - accepts an integer from the user. Keyboard.readDouble(); - accepts a number of type double from the user. n. Which is the class and which is the method in Keyboard.readString()? Class: Keyboard Method: readstring() o. How do we distinguish between a class and a method? Class: Starts with an uppercase letter. Method: Starts with a lowercase letter and includes parentheses at the end (). p. Write down all the classes and the methods that you see in the program. Classes: BillClass, String, System, Keyboard Methods: readstring(), readint(), readdouble(), println() 2 Margaret Bajada (2017) 2 Margaret Bajada (2017)
3 2. Create a class named SimpleCalc where the user is asked to enter two integers. You then need to output their: addition, subtraction, multiplication (using *) and division (using /). 3 Margaret Bajada (2017) 3 Margaret Bajada (2017)
4 3. Create a class named NumAvg where the user is asked to enter three numbers of type double and output their average. 4 Margaret Bajada (2017) 4 Margaret Bajada (2017)
5 4. Create a class named Rectangle where the user is asked to enter the length and breadth of a rectangle. You are then to calculate and print the perimeter and area of the rectangle. 5 Margaret Bajada (2017) 5 Margaret Bajada (2017)
6 5. Create a class named VolCuboid where the user is asked to input the length, breadth and height of a cuboid. You are then to calculate and output the volume of the cuboid. 6 Margaret Bajada (2017) 6 Margaret Bajada (2017)
7 6. Create a class named CircleArea where the user is asked to enter the radius for a circle. You are then to calculate and output the area for the circle. NOTE: take the value of PI as a constant whose value is Margaret Bajada (2017) 7 Margaret Bajada (2017)
8 7. Create a class named MyParticulars where you ask a user to enter his/her name, surname, and three examination marks. You are then to output back the particulars of the student together with the average of the examination marks. 8 Margaret Bajada (2017) 8 Margaret Bajada (2017)
9 8. Create a class named SphereVol where the user is asked to enter the radius of a sphere. You are then to calculate and output the volume of the sphere. NOTE: V = 4/3 x PI x r 3 9 Margaret Bajada (2017) 9 Margaret Bajada (2017)
10 9. Create a class named CylinderTSA where the user is asked to enter the radius and height for a cylinder. You are then to calculate and output the total surface area for the cylinder. NOTE: TSA = (2 x PI x r 2 ) + (2 x PI x h) 10 Margaret Bajada (2017) 10 Margaret Bajada (2017)
11 10. Create a class named ConversionCtoF where the user enters a temperature in degrees Celsius and then you convert and print the temperature in Fahrenheit using the following formula: F = (1.8 x C) Margaret Bajada (2017) 11 Margaret Bajada (2017)
12 11. Find the syntax errors in the following programs and suggest a solution to solve the errors. Error/s: Variables length and breadth and area were not declared to int. Declare variables at the beginning of the program. int length, breadth, area Solution: Keyboard.readInt() were not corresponded to any variable. Error/s: length = Keyboard.readInt(); breadth = Keyboard.readInt(); Solution: breadth is an int so it should be assigned to the readint() method. Error/s: Keyboard is a class so it should start with an uppercase letter. Solution: breadth = Keyboard.readInt(); 12 Margaret Bajada (2017) 12 Margaret Bajada (2017)
AP Computer Science Unit 1. Writing Programs Using BlueJ
AP Computer Science Unit 1. Writing Programs Using BlueJ 1. Open up BlueJ. Click on the Project menu and select New Project. You should see the window on the right. Navigate to wherever you plan to save
More informationAP Computer Science Unit 1. Writing Programs Using BlueJ
AP Computer Science Unit 1. Writing Programs Using BlueJ 1. Open up BlueJ. Click on the Project menu and select New Project. You should see the window on the right. Navigate to wherever you plan to save
More informationComputer Programming, I. Laboratory Manual. Experiment #2. Elementary Programming
Think Twice Code Once The Islamic University of Gaza Engineering Faculty Department of Computer Engineering Fall 2017 ECOM 2005 Khaleel I. Shaheen Computer Programming, I Laboratory Manual Experiment #2
More informationIntroduction to Java Unit 1. Using BlueJ to Write Programs
Introduction to Java Unit 1. Using BlueJ to Write Programs 1. Open up BlueJ. Click on the Project menu and select New Project. You should see the window on the right. Navigate to wherever you plan to save
More informationData Types and the while Statement
Session 2 Student Name Other Identification Data Types and the while Statement In this laboratory you will: 1. Learn about three of the primitive data types in Java, int, double, char. 2. Learn about the
More informationCEN 414 Java Programming
CEN 414 Java Programming Instructor: H. Esin ÜNAL SPRING 2017 Slides are modified from original slides of Y. Daniel Liang WEEK 2 ELEMENTARY PROGRAMMING 2 Computing the Area of a Circle public class ComputeArea
More informationDatatypes, Variables, and Operations
Datatypes, Variables, and Operations 1 Primitive Type Classification 2 Numerical Data Types Name Range Storage Size byte 2 7 to 2 7 1 (-128 to 127) 8-bit signed short 2 15 to 2 15 1 (-32768 to 32767) 16-bit
More informationChapter 3 Syntax, Errors, and Debugging. Fundamentals of Java
Chapter 3 Syntax, Errors, and Debugging Objectives Construct and use numeric and string literals. Name and use variables and constants. Create arithmetic expressions. Understand the precedence of different
More informationFull file at
Java Programming: From Problem Analysis to Program Design, 3 rd Edition 2-1 Chapter 2 Basic Elements of Java At a Glance Instructor s Manual Table of Contents Overview Objectives s Quick Quizzes Class
More informationThe Hyderabad Public School, Begumpet, Hyderabad, A.P
The Hyderabad Public School, Begumpet, Hyderabad, A.P. 500 016 2012-13 Department of Computer Science Class 8 Worksheet 3 1) How many times will the following statement execute? ( ) int a=5; while(a>6)
More informationLecture Notes. System.out.println( Circle radius: + radius + area: + area); radius radius area area value
Lecture Notes 1. Comments a. /* */ b. // 2. Program Structures a. public class ComputeArea { public static void main(string[ ] args) { // input radius // compute area algorithm // output area Actions to
More informationLAB 2.1 INTRODUCTION TO C PROGRAMMING
LAB 2.1 INTRODUCTION TO C PROGRAMMING School of Computer and Communication Engineering Universiti Malaysia Perlis 1 1. OBJECTIVES: 1.1 To be able to apply basic rules and structures of C in writing a simple
More informationCSE 142, Summer 2014
CSE 142, Summer 2014 Lecture 2: Static Methods Expressions reading: 1.4 2.1 Algorithms algorithm: A list of steps for solving a problem. Example algorithm: "Bake sugar cookies" Mix the dry ingredients.
More informationBuilding Java Programs
Building Java Programs Chapter 2 Lecture 2-1: Expressions and Variables reading: 2.1-2.2 1 2 Data and expressions reading: 2.1 3 The computer s view Internally, computers store everything as 1 s and 0
More informationCOMP 202 Java in one week
COMP 202 Java in one week... Continued CONTENTS: Return to material from previous lecture At-home programming exercises Please Do Ask Questions It's perfectly normal not to understand everything Most of
More informationINDIAN SCHOOL MUSCAT COMPUTER SCIENCE(083) CLASS XI
INDIAN SCHOOL MUSCAT COMPUTER SCIENCE(083) CLASS XI 2017-2018 Worksheet No. 1 Topic : Getting Started With C++ 1. Write a program to generate the following output: Year Profit% 2011 18 2012 27 2013 32
More informationA triangle that has three acute angles Example:
1. acute angle : An angle that measures less than a right angle (90 ). 2. acute triangle : A triangle that has three acute angles 3. angle : A figure formed by two rays that meet at a common endpoint 4.
More informationChapter 2 ELEMENTARY PROGRAMMING
Chapter 2 ELEMENTARY PROGRAMMING Lecture notes for computer programming 1 Faculty of Engineering and Information Technology Prepared by: Iyad Albayouk ١ Objectives To write Java programs to perform simple
More informationComputer Programming : C++
The Islamic University of Gaza Engineering Faculty Department of Computer Engineering Fall 2017 ECOM 2003 Muath i.alnabris Computer Programming : C++ Experiment #1 Basics Contents Structure of a program
More informationIntroduction to FORTRAN
Introduction to by Dr. Ibrahim A. Assakkaf Spring 2000 Department of Civil and Environmental Engineering University of Maryland Slide No. 1 Introduction = FORmula TRANslation Developed for the IBM 704
More informationLesson 02 Data Types and Statements. MIT 12043, Fundamentals of Programming By: S. Sabraz Nawaz Senior Lecturer in MIT Department of MIT FMC, SEUSL
Lesson 02 Data Types and Statements MIT 12043, Fundamentals of Programming By: S. Sabraz Nawaz Senior Lecturer in MIT Department of MIT FMC, SEUSL Topics Covered Statements Variables Constants Data Types
More information2.1. Chapter 2: Parts of a C++ Program. Parts of a C++ Program. Introduction to C++ Parts of a C++ Program
Chapter 2: Introduction to C++ 2.1 Parts of a C++ Program Copyright 2009 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 2-1 Parts of a C++ Program Parts of a C++ Program // sample C++ program
More informationChapter 2. Elementary Programming
Chapter 2 Elementary Programming 1 Objectives To write Java programs to perform simple calculations To obtain input from the console using the Scanner class To use identifiers to name variables, constants,
More informationCSE 142, Summer 2015
CSE 142, Summer 2015 Lecture 2: Static Methods Expressions reading: 1.4 2.1 The Mechanical Turk 2 Escape Characters System.out.println( ab\ \\\\\\/\td ); Output: ab \\\/ d 3 Algorithms algorithm: A list
More informationChapter 2 Elementary Programming. Liang, Introduction to Java Programming, Tenth Edition, (c) 2015 Pearson Education, Inc. All rights reserved.
Chapter 2 Elementary Programming 1 Motivations In the preceding chapter, you learned how to create, compile, and run a Java program. Starting from this chapter, you will learn how to solve practical problems
More informationTAKS Mathematics Practice Tests Grade 6, Test B
Question TAKS Objectives TEKS Student Expectations 1 Obj. 4 The student will demonstrate an uses of measurement. (6.8) (A) estimate measurements and evaluate reasonableness of results. 2 Obj. 3 The student
More informationCSCI 2010 Principles of Computer Science. Data and Expressions 08/09/2013 CSCI
CSCI 2010 Principles of Computer Science Data and Expressions 08/09/2013 CSCI 2010 1 Data Types, Variables and Expressions in Java We look at the primitive data types, strings and expressions that are
More informationExample: Tax year 2000
Introductory Programming Imperative Programming I, sections 2.0-2.9 Anne Haxthausen a IMM, DTU 1. Values and types (e.g. char, boolean, int, double) (section 2.4) 2. Variables and constants (section 2.3)
More informationPerimeter, Area, Surface Area, & Volume
Additional Options: Hide Multiple Choice Answers (Written Response) Open in Microsoft Word (add page breaks and/or edit questions) Generation Date: 11/25/2009 Generated By: Margaret Buell Copyright 2009
More informationMotivations. Chapter 2: Elementary Programming 8/24/18. Introducing Programming with an Example. Trace a Program Execution. Trace a Program Execution
Chapter 2: Elementary Programming CS1: Java Programming Colorado State University Original slides by Daniel Liang Modified slides by Chris Wilcox Motivations In the preceding chapter, you learned how to
More informationPROGRAMMING IN C AND C++:
PROGRAMMING IN C AND C++: Week 1 1. Introductions 2. Using Dos commands, make a directory: C:\users\YearOfJoining\Sectionx\USERNAME\CS101 3. Getting started with Visual C++. 4. Write a program to print
More informationBuilding Java Programs
Building Java Programs Chapter 2 Lecture 2-1: Expressions and Variables reading: 2.1-2.2 1 Data and expressions reading: 2.1 self-check: 1-4 videos: Ch. 2 #1 2 Data types type: A category or set of data
More informationBuilding Java Programs. Chapter 2: Primitive Data and Definite Loops
Building Java Programs Chapter 2: Primitive Data and Definite Loops Copyright 2008 2006 by Pearson Education 1 Lecture outline data concepts Primitive types: int, double, char (for now) Expressions: operators,
More informationSummer Packet 7 th into 8 th grade. Name. Integer Operations = 2. (-7)(6)(-4) = = = = 6.
Integer Operations Name Adding Integers If the signs are the same, add the numbers and keep the sign. 7 + 9 = 16 - + -6 = -8 If the signs are different, find the difference between the numbers and keep
More informationLearning objectives: Objects and Primitive Data. Introduction to Objects. A Predefined Object. The print versus the println Methods
CSI1102 Introduction to Software Design Chapter 2: Objects and Primitive Data Learning objectives: Objects and Primitive Data Introducing objects and their properties Predefined objects: System.out Variables
More informationBuilding Java Programs
Building Java Programs Chapter 2 Lecture 2-1: Expressions and Variables reading: 2.1-2.2 Copyright 2009 by Pearson Education Data and expressions reading: 2.1 self-check: 1-4 videos: Ch. 2 #1 Copyright
More informationActivity 1: Introduction
Activity 1: Introduction In this course, you will work in teams of 3 4 students to learn new concepts. This activity will introduce you to the process. We ll also take a first look at how to store data
More informationFlorida Math 0018 Correlation of the ALEKS course Florida Math 0018 to the Florida Mathematics Competencies - Lower
Florida Math 0018 Correlation of the ALEKS course Florida Math 0018 to the Florida Mathematics Competencies - Lower Whole Numbers MDECL1: Perform operations on whole numbers (with applications, including
More informationMore Data Types. The Char Data Type. Variable Declaration. CS200: Computer Science I. Module 14 More Data Types
datatype CS200: Computer Science I Module 14 More Data Types Kevin Sahr, PhD Department of Computer Science Southern Oregon University 1 More Data Types in addition to the data types double and int we
More informationChapter 2: Data and Expressions
Chapter 2: Data and Expressions CS 121 Department of Computer Science College of Engineering Boise State University January 15, 2015 Chapter 2: Data and Expressions CS 121 1 / 1 Chapter 2 Part 1: Data
More informationYear 7 Curriculum Map
Year 7 Curriculum Map Place value, addition and subtraction Place value, multiplication and division Geometry: 2D shape in a 3D world Fractions Applications of algebra Percentages and pie charts Place
More informationChapter 4: Basic C Operators
Chapter 4: Basic C Operators In this chapter, you will learn about: Arithmetic operators Unary operators Binary operators Assignment operators Equalities and relational operators Logical operators Conditional
More informationBasic Programming Elements
Chapter 2 Basic Programming Elements Lecture slides for: Java Actually: A Comprehensive Primer in Programming Khalid Azim Mughal, Torill Hamre, Rolf W. Rasmussen Cengage Learning, 2008. ISBN: 978-1-844480-933-2
More informationChapter 5 Lab Methods
Chapter 5 Lab Methods Lab Objectives Be able to write methods Be able to call methods Be able to write javadoc comments Be able to create HTML documentation for our Java class using javadoc Introduction
More informationTopic 4 Expressions and variables
Topic 4 Expressions and variables "Once a person has understood the way variables are used in programming, he has understood the quintessence of programming." -Professor Edsger W. Dijkstra Based on slides
More informationWhole Numbers. Integers and Temperature
Whole Numbers Know the meaning of count and be able to count Know that a whole number is a normal counting number such as 0, 1, 2, 3, 4, Know the meanings of even number and odd number Know that approximating
More informationIntroduction to Computer Programming
Introduction to Computer Programming Lecture 2- Primitive Data and Stepwise Refinement Data Types Type - A category or set of data values. Constrains the operations that can be performed on data Many languages
More informationCOMP2421 COMPUTER ORGANZATION. Lab 3
Lab 3 Objectives: This lab shows you some basic techniques and syntax to write a MIPS program. Syntax includes system calls, load address instruction, load integer instruction, and arithmetic instructions
More informationChapter 5 Lab Methods
Chapter 5 Lab Methods Lab Objectives Be able to write methods Be able to call methods Be able to write javadoc comments Be able to create HTML documentation using the javadoc utility Introduction Methods
More informationData and Expressions. Outline. Data and Expressions 12/18/2010. Let's explore some other fundamental programming concepts. Chapter 2 focuses on:
Data and Expressions Data and Expressions Let's explore some other fundamental programming concepts Chapter 2 focuses on: Character Strings Primitive Data The Declaration And Use Of Variables Expressions
More informationJAVA Programming Concepts
JAVA Programming Concepts M. G. Abbas Malik Assistant Professor Faculty of Computing and Information Technology University of Jeddah, Jeddah, KSA mgmalik@uj.edu.sa Programming is the art of Problem Solving
More information1.1 Count, read, and write whole numbers to
Correlation of Moving with Math Foundations-by-Topic Grade 3 To California Standards NUMBER SENSE 1.0 Students understand the place value of whole numbers: 1.1 Count, read, and write whole numbers to 10,000.
More informationWhat we will do today Explain and look at examples of. Programs that examine data. Data types. Topic 4. variables. expressions. assignment statements
Topic 4 Variables Once a programmer has understood the use of variables, he has understood the essence of programming -Edsger Dijkstra What we will do today Explain and look at examples of primitive data
More informationVariables and Constants
87 Chapter 5 Variables and Constants 5.1 Storing Information in the Computer 5.2 Declaring Variables 5.3 Inputting Character Strings 5.4 Mistakes in Programs 5.5 Inputting Numbers 5.6 Inputting Real Numbers
More informationSHARDAYATAN -E.M STD-10 C-PROGRAMS
PROGRAM -1 //PROGRAM TO DISPLAY YOUR SCHOOL NAME, ADDRESS int main() printf("\n ***************************"); printf("\n * SHARDAYATAN SCHOOL *"); printf("\n * OPP. LAKEVIEW GARDEN, *"); printf("\n *
More informationVariable and Data Type I
Islamic University Of Gaza Faculty of Engineering Computer Engineering Department Lab 2 Variable and Data Type I Eng. Ibraheem Lubbad September 24, 2016 Variable is reserved a location in memory to store
More informationYear 6 Step 1 Step 2 Step 3 End of Year Expectations Using and Applying I can solve number problems and practical problems involving a range of ideas
Year 6 Step 1 Step 2 Step 3 End of Year Expectations Using and Applying I can solve number problems and practical problems involving a range of ideas Number Number system and counting Fractions and decimals
More informationYear 6 Step 1 Step 2 Step 3 End of Year Expectations Using and Applying I can solve number problems and practical problems involving a range of ideas
Year 6 Step 1 Step 2 Step 3 End of Year Expectations Using and Applying I can solve number problems and practical problems involving a range of ideas Number Number system and counting Fractions and decimals
More informationTOPIC 2 INTRODUCTION TO JAVA AND DR JAVA
1 TOPIC 2 INTRODUCTION TO JAVA AND DR JAVA Notes adapted from Introduction to Computing and Programming with Java: A Multimedia Approach by M. Guzdial and B. Ericson, and instructor materials prepared
More informationChapter 2: Data and Expressions
Chapter 2: Data and Expressions CS 121 Department of Computer Science College of Engineering Boise State University April 21, 2015 Chapter 2: Data and Expressions CS 121 1 / 53 Chapter 2 Part 1: Data Types
More information12/22/11. Java How to Program, 9/e. Help you get started with Eclipse and NetBeans integrated development environments.
Java How to Program, 9/e Education, Inc. All Rights Reserved. } Java application programming } Use tools from the JDK to compile and run programs. } Videos at www.deitel.com/books/jhtp9/ Help you get started
More informationCS313D: ADVANCED PROGRAMMING LANGUAGE
CS313D: ADVANCED PROGRAMMING LANGUAGE Computer Science department Lecture 2 : C# Language Basics Lecture Contents 2 The C# language First program Variables and constants Input/output Expressions and casting
More informationChapter 5 Lab Methods
Gaddis_516907_Java 4/10/07 2:10 PM Page 41 Chapter 5 Lab Methods Objectives Be able to write methods Be able to call methods Be able to write javadoc comments Be able to create HTML documentation for our
More informationPython Input, output and variables. Lecture 23 COMPSCI111/111G SS 2018
Python Input, output and variables Lecture 23 COMPSCI111/111G SS 2018 1 Today s lecture What is Python? Displaying text on screen using print() Variables Numbers and basic arithmetic Getting input from
More informationBuilding Java Programs
Building Java Programs Chapter 1 Lecture 2: Static Methods reading: 1.4-1.5 (Slides adapted from Stuart Reges, Hélène Martin, and Marty Stepp) 2 Recall: structure, syntax class: a program public class
More informationStructured programming
Exercises 2 Version 1.0, 22 September, 2016 Table of Contents 1. Simple C program structure................................................... 1 2. C Functions..................................................................
More informationSupplement D: Expanded Guidelines on Programming Style and Documentation
Page 1 of 5 Introduction Supplement D: Expanded Guidelines on Programming Style and Documentation For Introduction to Java Programming Y. Daniel Liang mailto:liang@armstrong.edu Programming style deals
More informationPython Input, output and variables
Today s lecture Python Input, output and variables Lecture 22 COMPSCI111/111G SS 2016! What is Python?! Displaying text on screen using print()! Variables! Numbers and basic arithmetic! Getting input from
More informationINDEX. Sl. No. Programs Page No. Procedure 2. 1 To check whether person is eligible for vote or not. 2 To find the given number is even or odd 6-8
INDEX Sl. No. Programs Page No. Procedure 2 1 To check whether person is eligible for vote or not 3-5 2 To find the given number is even or odd 6-8 3 To find the given year is leap year or not 9-11 4 To
More informationMensuration: Basic Concepts and Important Formulas
Equilateral Triangle: All the three sides are equal and each angle is equal to. Height (Altitude) = 3(side) Isosceles Triangle: Two sides and two angles are equal and altitude drawn on nonequal side bisects
More informationLab Session # 1 Introduction to C Language. ALQUDS University Department of Computer Engineering
2013/2014 Programming Fundamentals for Engineers Lab Lab Session # 1 Introduction to C Language ALQUDS University Department of Computer Engineering Objective: Our objective for today s lab session is
More informationLAB: INTRODUCTION TO FUNCTIONS IN C++
LAB: INTRODUCTION TO FUNCTIONS IN C++ MODULE 2 JEFFREY A. STONE and TRICIA K. CLARK COPYRIGHT 2014 VERSION 4.0 PALMS MODULE 2 LAB: FUNCTIONS IN C++ 2 Introduction This lab will provide students with an
More informationAlgebra Summer Math HW check
Lesson Practice 1 a) Integers, rational numbers, real numbers b) Rational numbers, real numbers c) Irrational numbers, real numbers Whole numbers; Sample: There can be d) no people or any number of people.
More information! A program is a set of instructions that the. ! It must be translated. ! Variable: portion of memory that stores a value. char
Week 1 Operators, Data Types & I/O Gaddis: Chapters 1, 2, 3 CS 5301 Fall 2016 Jill Seaman Programming A program is a set of instructions that the computer follows to perform a task It must be translated
More informationUnderstand the concept of volume M.TE Build solids with unit cubes and state their volumes.
Strand II: Geometry and Measurement Standard 1: Shape and Shape Relationships - Students develop spatial sense, use shape as an analytic and descriptive tool, identify characteristics and define shapes,
More informationFundamentals of Programming
Fundamentals of Programming Lecture 3 - Constants, Variables, Data Types, And Operations Lecturer : Ebrahim Jahandar Borrowed from lecturer notes by Omid Jafarinezhad Outline C Program Data types Variables
More informationPython Input, output and variables. Lecture 22 COMPSCI111/111G SS 2016
Python Input, output and variables Lecture 22 COMPSCI111/111G SS 2016 Today s lecture u What is Python? u Displaying text on screen using print() u Variables u Numbers and basic arithmetic u Getting input
More informationSolve 3-D problems using Pythagoras theorem and trigonometric ratios (A*) Solve more complex 2-D problems using Pythagoras theorem & trigonometry (A)
Moving from A to A* Solve 3-D problems using Pythagoras theorem and trigonometric ratios (A*) A* Use the sine & cosine rules to solve more complex problems involving non right-angled triangles (A*) Find
More informationCS125 : Introduction to Computer Science. Lecture Notes #4 Type Checking, Input/Output, and Programming Style
CS125 : Introduction to Computer Science Lecture Notes #4 Type Checking, Input/Output, and Programming Style c 2005, 2004, 2002, 2001, 2000 Jason Zych 1 Lecture 4 : Type Checking, Input/Output, and Programming
More informationProgram Elements -- Introduction
Program Elements -- Introduction We can now examine the core elements of programming Chapter 3 focuses on: data types variable declaration and use operators and expressions decisions and loops input and
More informationComputer Programming CS F111
Computer Programming CS F111 BITS Pilani Dubai Campus NAND KUMAR Basics of C Programming BITS Pilani Dubai Campus Write a program that 1. Asks 5 marks from the user, find the average of the marks and print
More informationVariable and Data Type I
The Islamic University of Gaza Faculty of Engineering Dept. of Computer Engineering Intro. To Computers (LNGG 1003) Lab 2 Variable and Data Type I Eng. Ibraheem Lubbad February 18, 2017 Variable is reserved
More informationChapter 3 Problem Solving and the Computer
Chapter 3 Problem Solving and the Computer An algorithm is a step-by-step operations that the CPU must execute in order to solve a problem, or to perform that task. A program is the specification of an
More informationPRE-ALGEBRA PREP. Textbook: The University of Chicago School Mathematics Project. Transition Mathematics, Second Edition, Prentice-Hall, Inc., 2002.
PRE-ALGEBRA PREP Textbook: The University of Chicago School Mathematics Project. Transition Mathematics, Second Edition, Prentice-Hall, Inc., 2002. Course Description: The students entering prep year have
More informationCS 115 Exam 1, Fall 2015 Thu. 09/24/2015
CS 115 Exam 1, Fall 2015 Thu. 09/24/2015 Name: Section: Rules and Hints You may use one handwritten 8.5 11 cheat sheet (front and back). This is the only additional resource you may consult during this
More informationChapter 2: Data and Expressions
Chapter 2: Data and Expressions CS 121 Department of Computer Science College of Engineering Boise State University August 21, 2017 Chapter 2: Data and Expressions CS 121 1 / 51 Chapter 1 Terminology Review
More informationS8.6 Volume. Section 1. Surface area of cuboids: Q1. Work out the surface area of each cuboid shown below:
Things to Learn (Key words, Notation & Formulae) Complete from your notes Radius- Diameter- Surface Area- Volume- Capacity- Prism- Cross-section- Surface area of a prism- Surface area of a cylinder- Volume
More informationAPS Sixth Grade Math District Benchmark Assessment NM Math Standards Alignment
SIXTH GRADE NM STANDARDS Strand: NUMBER AND OPERATIONS Standard: Students will understand numerical concepts and mathematical operations. 5-8 Benchmark N.: Understand numbers, ways of representing numbers,
More informationLecture 6. Assignments. Summary - Variables. Summary Program Parts 1/29/18. Reading: 3.1, 3.2, 3.3, 3.4
Assignments Lecture 6 Complete for Project 1 Reading: 3.1, 3.2, 3.3, 3.4 Summary Program Parts Summary - Variables Class Header (class name matches the file name prefix) Class Body Because this is a program,
More informationMathematics - LV 6 Correlation of the ALEKS course Mathematics MS/LV 6 to the State of Texas Assessments of Academic Readiness (STAAR) for Grade 6
Mathematics - LV 6 Correlation of the ALEKS course Mathematics MS/LV 6 to the State of Texas Assessments of Academic Readiness (STAAR) for Grade 6 Number, Operation, and Quantitative Reasoning. 6.1.A:
More informationWeekly Syllabus Class VII Subject: Maths. Chapter-1 Integers-Properties of addition, Subtraction, Ex 1.1., 1.
Weekly Syllabus 2014-15 Class VII Subject: Maths Period April 1-5 Contents Chapter-1 Integers-Properties of addition, Subtraction, Ex 1.1., 1.2 Mental Maths, Activity- Addition and Subtraction of integers
More informationJAMAICA_9th Grade Math Table of Content
1. Number System 1.1 Introduction 1.2 Real Numbers and their Decimal Expansions 1.3 Representing real numbers on the number line 1.4 Laws of Exponents for Real Numbers 1.5 Expressing Numbers in the Standard
More informationMcGill University School of Computer Science COMP-202A Introduction to Computing 1
McGill University School of Computer Science COMP-202A Introduction to Computing 1 Midterm Exam Thursday, October 26, 2006, 18:00-20:00 (6:00 8:00 PM) Instructors: Mathieu Petitpas, Shah Asaduzzaman, Sherif
More informationIn Maths, each class is allocated to a grade. The work for each grade for this half term is outlined on the following slides.
In Maths, each class is allocated to a grade. The work for each grade for this half term is outlined on the following slides. You need to know which grade you are learning about to know which section to
More informationStudyHub+ 1. StudyHub: AP Java. Semester One Final Review
StudyHub+ 1 StudyHub: AP Java Semester One Final Review StudyHub+ 2 Terminology: Primitive Data Type: Most basic data types in the Java language. The eight primitive data types are: Char: A single character
More informationCOMP 202 Java in one week
CONTENTS: Basics of Programming Variables and Assignment Data Types: int, float, (string) Example: Implementing a calculator COMP 202 Java in one week The Java Programming Language A programming language
More informationAdvanced Computer Programming
Programming in the Small I: Names and Things (Part II) 188230 Advanced Computer Programming Asst. Prof. Dr. Kanda Runapongsa Saikaew (krunapon@kku.ac.th) Department of Computer Engineering Khon Kaen University
More informationADW GRADE 3 Math Standards, revised 2017 NUMBER SENSE (NS)
NUMBER SENSE (NS) Students understand the relationships among the numbers, quantities and place value in whole numbers up to 1,000. They understand the relationship among whole numbers, simple fractions
More informationObjective 1 : The student will demonstrate an understanding of numbers, operations, and quantitative reasoning.
Essential Mathematics (with QuickTables) Correlation of the ALEKS course Essential Mathematics to the Texas Assessment of Knowledge and Skills (TAKS) for Grade 6 Objective 1 : The student will demonstrate
More informationChapter 2: Review Exercise Solutions R2.1
Chapter 2: Review Exercise Solutions R2.1 The value of mystery is equal to 0 after the statements are executed. In the first statement (line 1), mystery is initialized to a value of 1. In the assignment
More information