METHODS EXERCISES GuessNumber and Sample run SumAll Sample Run
|
|
- Albert Marshall
- 6 years ago
- Views:
Transcription
1 METHODS EXERCISES Write a method called GuessNumber that receives nothing and returns back nothing. The method first picks a random number from The user then keeps guessing as long as their guess is wrong, and they've guessed less than 7 times. If their guess is higher than the number, say "Too high." If their guess is lower than the number, say "Too low." When they get it right, the game stops. Or, if they hit seven guesses, the game stops even if they never got it right and display a message for that. Sample run I'm thinking of a number between You have 7 guesses. First guess: 50 Sorry, you are too low. Guess # 2: 75 Sorry, you are too low. Guess # 3: 87 Sorry, that guess is too high. Guess # 4: 82 Sorry, you are too low. Guess # 5: 84 You guessed it! What are the odds?!? Write a method called SumAll that receives one parameter and it returns back an integer value. The method asks the user to input several integer numbers limited by the parameter value or when the user input 0-. The method has to sum up all the integers they give you. The method returns back the total at the end. Sample Run I will add up the numbers you give me. Number: 6 The total so far is 6 Number: 9 The total so far is 15 Number: -3 The total so far is 12 Number: 2
2 The total so far is 14 Number: 0 The total is 14. Write a method called BankATM that mimic the Bank s ATM machine login process. The method takes no parameters and it returns back a string. You have to ask the user to input his PIN account, the user has a maximum of 3 tries to guess a PIN. If he failed to guess the PIN then you have to return a message that telling him that his bank account is locked, otherwise, return a message that welcome the user to the main menu. Write a method called Total that receives one int parameter and it returns back a long value. The method calculates the sum of 1, 2, 3,..., to an upper bound (the passed parameter) and returns it back. Write a method called Average that receives one integer parameter that represents number of items. The method returns back a double value that represents the average total over items-. The total can be calculated using a call to the method Total above. Sample output The sum is 5050 The average is 50.5 A positive integer is a prime if it is divisible by 1 and itself only. Write a method called isprime that takes a positive integer and returns true if the number is a prime or false otherwise. Write a method called PrimeList that takes no parameters and it returns back a double. The method prompts the user for an upper bound (a positive integer), and lists-outputs- all the primes less than or equal to it. Also the
3 method calculates the percentage of prime numbers among the whole numbers (up to 2 decimal places). Sample output Please enter the upper bound: [1230 primes found (12.30%)] Write a method isproductofprimefactors that takes a positive integer, and it returns true if the product of all its prime factors (excluding 1 and the number itself) is equal to its value. For example, the method returns true for 30 (30=2 3 5) and false for 20 (20 2 5). You may need to use the isprime method in the previous exercise. Write a program called PerfectPrimeFactorList that receives an integer parameter which represents an upper bound and it returns nothing. The method shall display all the numbers (less than or equal to the upper bound) that meets the above criteria - isproductofprimefactors-. The method also finds out how many prime numbers that satisfy the criteria and their percentage. Sample output Enter the upper bound: 100 These numbers are equal to the product of prime factors: [36 numbers found (36.00%)
4 (Conversions between Celsius and Fahrenheit) Write a project that has a class which contains the following two methods: /** Convert from Celsius to Fahrenheit */ public static double celsiustofahrenheit (double celsius) /** Convert from Fahrenheit to Celsius */ public static double fahrenheittocelsius (double fahrenheit) The formula for the conversion is: fahrenheit = (9.0 / 5) * celsius + 32 celsius = (5.0 / 9) * (fahrenheit 32)
5 Source: Check the following website.
6 Monthly Budget Write a method called MonthlyBudget that receives one double parameter which represent the user budgeted for a month and it returns back a boolean value. Inside the method, write a loop that prompts-asks- the user to enter each of his or her expenses for the month Think about what could break this loop?-. During the reading of the expenses calculate the expenses total. When the loop finishes, the method returns back a true if the user over the budget, or false if his expenses is under budget. Book Club Reward Serendipity Booksellers has a book club that awards points to its customers based on the number of books purchased each month. The points are awarded as follows: If a customer purchases 0 books, he or she earns 0 points. If a customer purchases 1 book, he or she earns 5 points. If a customer purchases 2 books, he or she earns 15 points. If a customer purchases 3 books, he or she earns 30 points. If a customer purchases 4 or more books, he or she earns 60 points. Write a method called BookClubReward that takes no parameters and it returns back an integer. Inside the method, asks the user to enter the number of books that he or she has purchased from January to December. The method then returns back the number of points awarded during the whole year. Bank Fees A bank account charges $10 per month plus the following check fees for a commercial checking account: $.10 each for fewer than 20 checks $.08 each for checks $.06 each for checks $.04 each for 60 or more checks Write a method called BankFees that takes no parameter and it returns back a double. The method asks the client for the number of checks written for the month. The method should then calculate and returns back the bank's services fees for the month. Sales Write a program that asks the user to input how many weeks first. After that the program iterates over these weeks week by week- and asks the user to input the dollar amount of sales of every week. The program should display the following:
7 The average daily sales for each week The total sales for all of the weeks The average weekly sales The week number that had the highest amount of sales The week number that had the lowest amount of sales Sample output: Enter how many weeks: 3 Enter Week #1 sales: $ Average daily sales for week #1: $ Enter Week #2 sales: $ Average daily sales for week #2: $ Week #3 sales: $ Average daily sales for week #3: $ Total sales for all weeks: $ Average weekly sales: $ The highest sales was: $ The lowest sales were made during Source:
8 Method with Strings (Not covered yet) Exercise WordGuess: Write a method called WordGuess that receives one parameter of data type string. The method try guess the word by trying to guess the individual characters. Your program shall look like: Key in one character or your guess word: t Trail 1: t t Key in one character or your guess word: g
9 Trail 2: t t g Key in one character or your guess word: e Trail 3: te_t g Key in one character or your guess word: testing Trail 4: Congratulation! You got in 4 trials Method with Arrays (Not covered yet) The "key" array is an array containing the correct answers to an exam, like {"a", "a", "b", "b"}. the "answers" array contains a student's answers, with "?" representing a question left blank. The two arrays are not empty and are the same length. Return the score for this array of answers, giving +4 for each correct answer, -1 for each incorrect answer, and +0 for each blank answer. scoreup(["a", "a", "b", "b"], ["a", "c", "b", "c"]) 6 scoreup(["a", "a", "b", "b"], ["a", "a", "b", "c"]) 11 scoreup(["a", "a", "b", "b"], ["a", "a", "b", "b"]) 16 You can try that using eclipse or the click this link Given an array of strings, return a new List (e.g. an ArrayList) where all the strings of the given length are omitted. See wordswithout() below which is more difficult because it uses arrays. wordswithoutlist(["a", "bb", "b", "ccc"], 1) ["bb", "ccc"] wordswithoutlist(["a", "bb", "b", "ccc"], 3) ["a", "bb", "b"] wordswithoutlist(["a", "bb", "b", "ccc"], 4) ["a", "bb", "b", "ccc"] You can try that using eclipse or the click this link Given an array of positive ints, return a new array of length "count" containing the first even numbers from the original array. The original array will contain at least "count" even numbers. copyevens([3, 2, 4, 5, 8], 2) [2, 4] copyevens([3, 2, 4, 5, 8], 3) [2, 4, 8] copyevens([6, 1, 2, 4, 5, 8], 3) [6, 2, 4]
10 You can try that using eclipse or the click this link
Condition Controlled Loops. Introduction to Programming - Python
+ Condition Controlled Loops Introduction to Programming - Python + Repetition Structures n Programmers commonly find that they need to write code that performs the same task over and over again + Example:
More informationCONDITION CONTROLLED LOOPS. Introduction to Programming - Python
CONDITION CONTROLLED LOOPS Introduction to Programming - Python Generating Random Numbers Generating a random integer Sometimes you need your program to generate information that isn t available when you
More informationModule Certification and Testing
Module 20 Certification and Testing Certification and Testing Certification requirements The certification exam Online Timed Instant scoring Score required for certification Taking the exam Receiving your
More informationLab ACN : C++ Programming Exercises
Lab ACN : C++ Programming Exercises ------------------------------------------------------------------------------------------------------------------- Exercise 1 Write a temperature conversion program
More informationi) Natural numbers: Counting numbers, i.e, 1, 2, 3, 4,. are called natural numbers.
Chapter 1 Integers Types of Numbers i) Natural numbers: Counting numbers, i.e, 1, 2, 3, 4,. are called natural numbers. ii) Whole numbers: Counting numbers and 0, i.e., 0, 1, 2, 3, 4, 5,.. are called whole
More informationMicrosoft Excel 2016 LEVEL 3
TECH TUTOR ONE-ON-ONE COMPUTER HELP COMPUTER CLASSES Microsoft Excel 2016 LEVEL 3 kcls.org/techtutor Microsoft Excel 2016 Level 3 Manual Rev 11/2017 instruction@kcls.org Microsoft Excel 2016 Level 3 Welcome
More informationObjectives/Outcomes. Introduction: If we have a set "collection" of fruits : Banana, Apple and Grapes.
1 September 26 September One: Sets Introduction to Sets Define a set Introduction: If we have a set "collection" of fruits : Banana, Apple Grapes. 4 F={,, } Banana is member "an element" of the set F.
More informationLOOPS. 1- Write a program that prompts user to enter an integer N and determines and prints the sum of cubes from 5 to N (i.e. sum of 5 3 to N 3 ).
LOOPS 1- Write a program that prompts user to enter an integer N and determines and prints the sum of cubes from 5 to N (i.e. sum of 5 3 to N 3 ). 2-Give the result of the following program: #include
More informationRoberto Clemente Middle School
Roberto Clemente Middle School For Students Entering Investigations into Mathematics Name: Rename Fractions, Percents, and Decimals To convert fractions into decimals, we start with a fraction, such as,
More informationTypes, lists & functions
Week 2 Types, lists & functions Data types If you want to write a program that allows the user to input something, you can use the command input: name = input (" What is your name? ") print (" Hello "+
More informationWhat two elements are usually present for calculating a total of a series of numbers?
Dec. 12 Running Totals and Sentinel Values What is a running total? What is an accumulator? What is a sentinel? What two elements are usually present for calculating a total of a series of numbers? Running
More informationFinal Exam Review (Revised 3/16) Math MULTIPLE CHOICE. Choose the one alternative that best completes the statement or answers the question.
Final Exam Review (Revised 3/16) Math 0001 Name MULTIPLE CHOICE. Choose the one alternative that best completes the statement or answers the question. Evaluate. 1) 1 14 1) A) 1 B) 114 C) 14 D) undefined
More informationDOING MORE WITH EXCEL: MICROSOFT OFFICE 2013
DOING MORE WITH EXCEL: MICROSOFT OFFICE 2013 GETTING STARTED PAGE 02 Prerequisites What You Will Learn MORE TASKS IN MICROSOFT EXCEL PAGE 03 Cutting, Copying, and Pasting Data Basic Formulas Filling Data
More informationCondition Controlled Loops. Introduction to Programming - Python
Condition Controlled Loops Introduction to Programming - Python Decision Structures Review Programming Challenge: Review Ask the user for a number from 1 to 7. Tell the user which day of the week was selected!
More informationRepetition Structures
Repetition Structures Chapter 5 Fall 2016, CSUS Introduction to Repetition Structures Chapter 5.1 1 Introduction to Repetition Structures A repetition structure causes a statement or set of statements
More informationCSE 131 Introduction to Computer Science Fall 2016 Exam I. Print clearly the following information:
CSE 131 Introduction to Computer Science Fall 2016 Given: 29 September 2016 Exam I Due: End of Exam Session This exam is closed-book, closed-notes, no electronic devices allowed The exception is the "sage
More informationCondition-Controlled Loop. Condition-Controlled Loop. If Statement. Various Forms. Conditional-Controlled Loop. Loop Caution.
Repetition Structures Introduction to Repetition Structures Chapter 5 Spring 2016, CSUS Chapter 5.1 Introduction to Repetition Structures The Problems with Duplicate Code A repetition structure causes
More informationlyndaclassroom Getting Started Guide
lyndaclassroom Getting Started Guide This document explains Why lyndaclassroom might be right for you and your students How to register as an approved educator with lynda.com How to set up and submit your
More informationText Input and Conditionals
Text Input and Conditionals Text Input Many programs allow the user to enter information, like a username and password. Python makes taking input from the user seamless with a single line of code: input()
More informationOther operators. Some times a simple comparison is not enough to determine if our criteria has been met.
Lecture 6 Other operators Some times a simple comparison is not enough to determine if our criteria has been met. For example: (and operation) If a person wants to login to bank account, the user name
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 informationMAT 142 College Mathematics. Module ST. Statistics. Terri Miller revised July 14, 2015
MAT 142 College Mathematics Statistics Module ST Terri Miller revised July 14, 2015 2 Statistics Data Organization and Visualization Basic Terms. A population is the set of all objects under study, a sample
More informationStudent Outcomes. Lesson Notes. Classwork. Discussion (4 minutes)
Student Outcomes Students write mathematical statements using symbols to represent numbers. Students know that written statements can be written as more than one correct mathematical sentence. Lesson Notes
More information3.2-Measures of Center
3.2-Measures of Center Characteristics of Center: Measures of center, including mean, median, and mode are tools for analyzing data which reflect the value at the center or middle of a set of data. We
More information//If target was found, then //found == true and a[index] == target.
230 CHAPTER 5 Arrays //If target was found, then //found == true and a[index] == target. } if (found) where = index; return found; 20. 0 1 2 3 0 1 2 3 0 1 2 3 0 1 2 3 21. int a[4][5]; int index1, index2;
More informationVocabulary: Bits and Pieces III
Vocabulary: Bits and Pieces III Concept Example Meaning of decimal There are two ways to think of a decimal: As a number whose value is signaled by place value, or as a representation of a fraction.. 43
More information7 th Pre-AP REVIEW for TEST1 1 st Six Weeks
Name: Period: Date: 7 th Pre-AP REVIEW for TEST1 1 st Six Weeks Linear Functions 1. Complete the table of values for the equation and graph the line of the equation on the coordinate plane. Is it proportional
More informationMicrosoft Excel 2010 Handout
Microsoft Excel 2010 Handout Excel is an electronic spreadsheet program you can use to enter and organize data, and perform a wide variety of number crunching tasks. Excel helps you organize and track
More information1. Managing Information in Table
1. Managing Information in Table Spreadsheets are great for making lists (such as phone lists, client lists). The researchers discovered that not only was list management the number one spreadsheet activity,
More informationreview for 3rd 9 weeks test
Class: Date: review for 3rd 9 weeks test What are the variables in each graph? Describe how the variables are related at various points on the graph. 1. Lena makes home deliveries of groceries for a supermarket.
More informationExponents. Although exponents can be negative as well as positive numbers, this chapter will only address the use of positive exponents.
Section 6.2 PRE-ACTIVITY PREPARATION Exponents Exponents enable you to simplify the presentation of a numerical expression containing repeated multiplication into a concise form that is easier to read
More informationDEFECT TESTING. Since the goal of each test run is to uncover another error, a successful test run is one that causes your program to fail.
DEFECT TESTING Defect testing involves finding errors in a computer program by running it. On each run you enter input and study the program s output to determine if it is correct. If not, you debug the
More informationACM Pacific NW Region Programming Contest 13 November 2004 Problem A: Mersenne Composite Numbers
Problem A: Mersenne Composite Numbers One of the world-wide cooperative computing tasks is the Grand Internet Mersenne Prime Search GIMPS striving to find ever-larger prime numbers by examining a particular
More informationStratford upon Avon School Mathematics Homework Booklet
Stratford upon Avon School Mathematics Homework Booklet Year: 7 Scheme: 1 Term: 1 Name: Show your working out here Homework Sheet 1 1: Write 7:43 pm using the 24 hour clock 11: Find the area of this shape.
More informationMATH 099 HOMEWORK TWO
MATH 099 HOMEWORK TWO STUDENT S NAME 1) Matthew needs to rent a car for 1 day. He will be charged a daily fee of $30.00 in addition to 5 cents for every mile he drives. Assign the variable by letting x
More informationHSBC Security Device: Troubleshooting guide
HSBC Security Device: Troubleshooting guide If you're having difficulty with your HSBC Security Device, choose the relevant screen display below for information to help you log on. NEW PIN You will need
More informationCrude Video Game Simulator Algorithm
Crude Video Game Simulator Algorithm The following program will simulate free games at an arcade. The player will enter his/her score for 5 levels of play. The sum of these is their game score. If this
More informationDept. of CSE, IIT KGP
Control Flow: Looping CS10001: Programming & Data Structures Pallab Dasgupta Professor, Dept. of Computer Sc. & Engg., Indian Institute of Technology Kharagpur Types of Repeated Execution Loop: Group of
More information1. Managing Information in Table
1. Managing Information in Table Spreadsheets are great for making lists (such as phone lists, client lists). The researchers discovered that not only was list management the number one spreadsheet activity,
More informationCSE 131 Introduction to Computer Science Fall Exam I
CSE 131 Introduction to Computer Science Fall 2013 Given: 30 September 2013 Exam I Due: End of session This exam is closed-book, closed-notes, no electronic devices allowed. The exception is the cheat
More informationExcel Functions & Tables
Excel Functions & Tables Fall 2014 Fall 2014 CS130 - Excel Functions & Tables 1 Review of Functions Quick Mathematics Review As it turns out, some of the most important mathematics for this course revolves
More informationWorlframalpha.com Facebook Report
Worlframalpha.com Facebook Report For Tuesday: have read up through chapter 2 Next week will start chapter 3 New lab today: Simple Programs Integer division? o 1//3 o - 1//3 Range start at something other
More informationTopic 1. Mrs. Daniel Algebra 1
Topic 1 Mrs. Daniel Algebra 1 Table of Contents 1.1: Solving Equations 2.1: Modeling with Expressions 2.2: Creating & Solving Equations 2.3: Solving for Variable 2.4: Creating & Solving Inequalities 2.5:
More informationSUMMER REVIEW PACKET 2 FOR STUDENTS ENTERING ALGEBRA 1
SUMMER REVIEW PACKET FOR STUDENTS ENTERING ALGEBRA Dear Students, Welcome to Ma ayanot. We are very happy that you will be with us in the Fall. The Math department is looking forward to working with you
More informationAssignment 2.4: Loops
Writing Programs that Use the Terminal 0. Writing to the Terminal Assignment 2.4: Loops In this project, we will be sending our answers to the terminal for the user to see. To write numbers and text to
More informationOther Loop Options EXAMPLE
C++ 14 By EXAMPLE Other Loop Options Now that you have mastered the looping constructs, you should learn some loop-related statements. This chapter teaches the concepts of timing loops, which enable you
More informationChapter 5 : Repetition (pp )
Page 1 of 41 Printer Friendly Version User Name: Stephen Castleberry email Id: scastleberry@rivercityscience.org Book: A First Book of C++ 2007 Cengage Learning Inc. All rights reserved. No part of this
More informationIntegrated Algebra Regents Exam 0109 Page 1
Integrated Algebra Regents Exam 0109 Page 1 1. 010901ia, P.I. A.M. On a certain day in Toronto, Canada, the temperature was 15 Celsius (C). Using the 9 formula F C3, Peter converts this 5 temperature to
More informationG.CO.C.9: Compound Statements
Regents Exam Questions G.CO.C.9: Compound Statements www.jmap.org Name: G.CO.C.9: Compound Statements 1 The statement "x is a multiple of 3, and x is an even integer" is true when x is equal to 1) 9 2)
More informationCS3 Midterm 1 Fall 2007 Standards and solutions
CS3 Midterm 1 Fall 2007 Standards and solutions Problem 1. And the return value is... ( 9 points) For problems 1-7, write the result of evaluating the Scheme expression that comes before the. If the Scheme
More informationGeometric Probabiltiy
Geometric Probabiltiy Reteaching 101 Math Course 3, Lesson 101 Geometric Probability: The probability based on the area of the regions Probability = Formula: area of included region area of known region
More informationSection 3.2 Measures of Central Tendency MDM4U Jensen
Section 3.2 Measures of Central Tendency MDM4U Jensen Part 1: Video This video will review shape of distributions and introduce measures of central tendency. Answer the following questions while watching.
More informationGrade 5 Mathematics MCA-III Item Sampler Teacher Guide
Grade 5 Mathematics MCA-III Item Sampler Teacher Guide Grade 5 Mathematics MCA Item Sampler Teacher Guide Overview of Item Samplers Item samplers are one type of student resource provided to help students
More informationAP Computer Science Homework Set 1 Fundamentals
AP Computer Science Homework Set 1 Fundamentals P1A. Using MyFirstApp.java as a model, write a similar program, MySecondApp.java, that prints your favorites. Your program should do the following: a. create
More informationToday in CS161. Lecture #7. Learn about. Rewrite our First Program. Create new Graphics Demos. If and else statements. Using if and else statements
Today in CS161 Lecture #7 Learn about If and else statements Rewrite our First Program Using if and else statements Create new Graphics Demos Using if and else statements CS161 Lecture #7 1 Selective Execution
More information4. Use a loop to print the first 25 Fibonacci numbers. Do you need to store these values in a data structure such as an array or list?
1 Practice problems Here is a collection of some relatively straightforward problems that let you practice simple nuts and bolts of programming. Each problem is intended to be a separate program. 1. Write
More informationAlgebra I Semester 1 Study Guide Create a sequence that has a common difference of 3
Algebra I Semester 1 Study Guide 2017-2018 Name: 1. Create a sequence that has a common difference of 3 Create a sequence that has a common difference of 6 2. The table displays the hourly rental cost
More informationControl Statements: Part 1
4 Let s all move one place on. Lewis Carroll Control Statements: Part 1 The wheel is come full circle. William Shakespeare How many apples fell on Newton s head before he took the hint! Robert Frost All
More informationComputer Programming, I. Laboratory Manual. Experiment #3. Selections
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 #3
More informationSubject: Computer Science
Subject: Computer Science Topic: Data Types, Variables & Operators 1 Write a program to print HELLO WORLD on screen. 2 Write a program to display output using a single cout statement. 3 Write a program
More informationOutline. Announcements. Homework 2. Boolean expressions 10/12/2007. Announcements Homework 2 questions. Boolean expression
Outline ECS 10 10/8 Announcements Homework 2 questions Boolean expressions If/else statements State variables and avoiding sys.exit( ) Example: Coin flipping (if time permits) Announcements Professor Amenta
More information2-2 Adding Integers. Warm Up Problem of the Day Lesson Presentation Lesson Quizzes
Warm Up Problem of the Day Lesson Presentation Lesson Quizzes Warm Up Find each absolute value. 1. 8 2. 6 3. 9 4. 7 5. 12 6. 53 Problem of the Day Jan s yearly salary is $30,000, and it will be increased
More informationCS 303E Fall 2011 Exam 2 Solutions and Criteria November 2, Good Luck!
CS 303E Fall 2011 Exam 2 Solutions and Criteria November 2, 2011 Name: EID: Section Number: Friday discussion time (circle one): 9-10 10-11 11-12 12-1 2-3 Friday discussion TA(circle one): Wei Ashley Answer
More informationVARIABLE, OPERATOR AND EXPRESSION [SET 1]
VARIABLE, OPERATOR AND EXPRESSION Question 1 Write a program to print HELLO WORLD on screen. Write a program to display the following output using a single cout statement. Subject Marks Mathematics 90
More information[Page 177 (continued)] a. if ( age >= 65 ); cout << "Age is greater than or equal to 65" << endl; else cout << "Age is less than 65 << endl";
Page 1 of 10 [Page 177 (continued)] Exercises 4.11 Identify and correct the error(s) in each of the following: a. if ( age >= 65 ); cout
More informationProperties of Operations
" Properties of Operations When you learn new types of numbers, you want to know what properties apply to them. You know that rational numbers are commutative for addition and multiplication. 1 1 1 1 +
More information82 2 Loops and Lists. Exercise 2.6: Compute energy levels in an atom The n-th energy level for an electron in a Hydrogen atom is given by
82 2 Loops and Lists 2.7 Exercises Exercise 2.1: Make a Fahrenheit-Celsius conversion table Write a Python program that prints out a table with Fahrenheit degrees 0; 10; 20; : : : ; 100 in the first column
More informationFinal Examination Semester 2 / Year 2010
Southern College Kolej Selatan 南方学院 Final Examination Semester 2 / Year 2010 COURSE : PROGRAMMING LOGIC AND DESIGN COURSE CODE : CCIS1003 TIME : 2 1/2 HOURS DEPARTMENT : COMPUTER SCIENCE LECTURER : LIM
More information4. Assignment statements Give an assignment statement that sets the value of a variable called total to 20: Answer: total = 20;
First Exam Review, Thursday, February 6, 2014 Note: Do not hand in this lab; but use it for review. Review all materials from notes, slides, examples and labs. Here is an overview of topics with some example
More informationComputer Science Foundation Exam
Computer Science Foundation Exam August 6, 017 Section I A DATA STRUCTURES SOLUTIONS NO books, notes, or calculators may be used, and you must work entirely on your own. Question # Max Pts Category Passing
More informationHomework Set 1- Fundamentals
1 Homework Set 1- Fundamentals Topics if statements with ints if-else statements with Strings if statements with multiple boolean statements for loops and arrays while loops String ".equals()" method "=="
More informationCSI Lab 02. Tuesday, January 21st
CSI Lab 02 Tuesday, January 21st Objectives: Explore some basic functionality of python Introduction Last week we talked about the fact that a computer is, among other things, a tool to perform high speed
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 informationQuestions Frequently Asked by Consumers PartyLite Preferred Program Consumer Questions
Questions Frequently Asked by Consumers PartyLite Preferred Program Consumer Questions 1. What is PartyLite Preferred? PartyLite Preferred is an online loyalty program that is FREE to join! Members of
More informationB.2 Measures of Central Tendency and Dispersion
Appendix B. Measures of Central Tendency and Dispersion B B. Measures of Central Tendency and Dispersion What you should learn Find and interpret the mean, median, and mode of a set of data. Determine
More informationPage 1 CCM6+ Unit 10 Graphing UNIT 10 COORDINATE PLANE. CCM Name: Math Teacher: Projected Test Date:
Page 1 CCM6+ Unit 10 Graphing UNIT 10 COORDINATE PLANE CCM6+ 2015-16 Name: Math Teacher: Projected Test Date: Main Concept Page(s) Vocabulary 2 Coordinate Plane Introduction graph and 3-6 label Reflect
More informationmirosoft.
77-882 mirosoft Number: 77-882 Passing Score: 800 Time Limit: 120 min File Version: 0.0 http://www.gratisexam.com Exam A QUESTION 1 You work as a Sales Manager for Rainbow Inc. Your responsibility includes
More informationPLEXUS PAY PORTAL YOUR HOW-TO GUIDE
PLEXUS PAY PORTAL YOUR HOW-TO GUIDE - 1 - Table of Contents Activate Account Activating Your Pay Portal Account 3 Navigating your Plexus Pay Portal 8 Managing your funds 17 Activating your Prepaid Card
More informationEXAM Computer Science 1 Part 1
Maastricht University Faculty of Humanities and Science Department of Knowledge Engineering EXAM Computer Science 1 Part 1 Block 1.1: Computer Science 1 Code: KEN1120 Examiner: Kurt Driessens Date: Januari
More informationReviewing all Topics this term
Today in CS161 Prepare for the Final Reviewing all Topics this term Variables If Statements Loops (do while, while, for) Functions (pass by value, pass by reference) Arrays (specifically arrays of characters)
More informationQ1: Functions / 33 Q2: Arrays / 47 Q3: Multiple choice / 20 TOTAL SCORE / 100 Q4: EXTRA CREDIT / 10
EECE.2160: ECE Application Programming Spring 2018 Exam 2 March 30, 2018 Name: Lecture time (circle 1): 8-8:50 (Sec. 201) 12-12:50 (Sec. 202) For this exam, you may use only one 8.5 x 11 double-sided page
More informationMath 20 Practice Exam #2 Problems and Their Solutions!
Math 20 Practice Exam #2 Problems and Their Solutions! #1) Solve the linear system by graphing: Isolate for in both equations. Graph the two lines using the slope-intercept method. The two lines intersect
More informationCOURSE: Introduction to JAVA Programming GRADE(S): UNIT 1: Introduction to Applets NATIONAL STANDARDS: ALL STUDENTS
UNIT 1: Introduction to Applets 1.1 Use graphics objects to generate output on screen 1.2 1.3 1.4 Write and run applets Accepting input and manipulating numbers Write and run applets using graphics to
More informationIdentifying Slope and y-intercept slope y = mx + b
Practice 1 Identifying m and b Identifying Slope and y-intercept slope y = mx + b y-intercept 1 1. For each of the following, identify the slope and y-intercept, OR use the slope and y-intercept to write
More informationTask 1: Print a series of random integers between 0 and 99 until the value 77 is printed. Use the Random class to generate random numbers.
Task 1: Print a series of random integers between 0 and 99 until the value 77 is printed. Use the Random class to generate random numbers. Task 2: Print a series of random integers between 50 and 99 until
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 informationLesson 9: An Application of Linear Equations
Classwork Exercises 1. Write the equation for the 15 th step. 2. How many people would see the photo after 15 steps? Use a calculator if needed. S.30 3. Marvin paid an entrance fee of $5 plus an additional
More informationPython lab session 1
Python lab session 1 Dr Ben Dudson, Department of Physics, University of York 28th January 2011 Python labs Before we can start using Python, first make sure: ˆ You can log into a computer using your username
More informationHonors Computer Science Python Mr. Clausen Programs 4A, 4B, 4C, 4D, 4E, 4F
PROGRAM 4A Full Names (25 points) Honors Computer Science Python Mr. Clausen Programs 4A, 4B, 4C, 4D, 4E, 4F This program should ask the user for their full name: first name, a space, middle name, a space,
More informationHow to request, find and cancel room bookings in Resource Booker
How to request, find and cancel room bookings in Resource Booker Before You Log Into Resource Booker How To Log Into Resource Booker Making a booking request To book by Date and Time To book by room Rules
More informationStudent Learning Center
Student Learning Center Pass Assured, LLC www.passassured.com Contents Overview... 2 Login... 3 Message Center... 3 Section Tutorials... 5 Study Aids... 8 Videos and Law... 9 Quizzes and Section Tests...
More informationKharagpur Site Online Problems 2013
Kharagpur Site Online Problems 013 Problem #1: List Editing At the ACME University, as part of the Graduate course work, each student is required to undergo project work. The authorities always make an
More informationAbsolute C++ 6th Edition Savitch TEST BANK Full download at: https://testbankreal.com/download/absolute-c-6th-edition-savitch-test-bank/
Absolute C++ 6th Edition Savitch SOLUTIONS MANUAL Full download at: https://testbankreal.com/download/absolute-c-6th-edition-savitch-solutionsmanual/ Absolute C++ 6th Edition Savitch TEST BANK Full download
More informationIntroduction to Object Oriented Systems Development. Practical Session (Week 2)
This practical session consists of three parts. Practical Session (Week 2) Part 1 (Tutorial). Starting with NetBeans In this module, we will use NetBeans IDE (Integrated Development Environment) for Java
More informationCreate your first workbook
Create your first workbook You've been asked to enter data in Excel, but you've never worked with Excel. Where do you begin? Or perhaps you have worked in Excel a time or two, but you still wonder how
More informationMICROSOFT DYNAMICS GP GENERAL LEDGER YEAR-END CLOSING PROCEDURES
GENERAL LEDGER YEAR-END CLOSING PROCEDURES Before you perform year-end closing procedures, you will need to: complete the posting of all entries and adjusting entries to reflect the transactions for the
More informationDistrict 5910 Website Quick Start Manual Let s Roll Rotarians!
District 5910 Website Quick Start Manual Let s Roll Rotarians! All Rotarians in District 5910 have access to the Members Section of the District Website THE BASICS After logging on to the system, members
More informationProblem Solving for Intro to Computer Science
Problem Solving for Intro to Computer Science The purpose of this document is to review some principles for problem solving that are relevant to Intro to Computer Science course. Introduction: A Sample
More informationMidterm Exam Solutions March 7, 2001 CS162 Operating Systems
University of California, Berkeley College of Engineering Computer Science Division EECS Spring 2001 Anthony D. Joseph Midterm Exam March 7, 2001 CS162 Operating Systems Your Name: SID AND 162 Login: TA:
More information/ / / x means sum of scores and n =/ f is the number of scores. J 14. Data. Knowing More. Mean, Median, Mode
Mean, Median, Mode The mean of a data set is written as xr (pronounced x-bar ). It is the arithmetic average of the data set. sumofscores x x x r = or xr = = number of scores n f where x means sum of scores
More information