More on Conditionals: if-elif-else, Boolean Expressions

Size: px
Start display at page:

Download "More on Conditionals: if-elif-else, Boolean Expressions"

Transcription

1 CptS 111 Lab #6 More on Conditionals: if-elif-else, Boolean Expressions Learning Objectives: By the end of this lab you should: be comfortable using if-elif-else constructs be comfortable using logical/boolean operators and expressions Prerequisites: Before starting this lab, you should be familiar with: branching constructs relational operators logical/boolean operators logical/boolean expressions Task 1: Grades Revisited In Lab #1 you wrote a program to calculate your score for this class. Recall that scoring is done as follows: score = 0.17 exam exam+0.18 final +0.5 prog assign zypa+0.0 zyca+0.1 lab where exam1 and exam are your scores on the two midterms, final is your score on the final exam,prog assign is your programming assignments score, zypa is your zybooks participation activities score, zyca is your zybooks challenge activities score, andlab is your labs score. CptS 111 grades are assigned as follows: : A 90-94: A : B : B 75-79: B : C : C 60-64: C : D < 50: F For this task write a program with four functions as follows: get scores(): Called from main() with no parameters. Prompts user for all their scores and returns them tomain(). 1

2 calc score(): Called from main() with all scores as parameters. Returns score to main(). calc grade(): Called from main() with score as parameter. Returns grade to main(). Use theif-elif-else construct together with Boolean expressions with relational operators. main(): Calls the three functions and prints yourscore andgrade to the screen. Here are examples of the output. Boldface font is text that is entered. 1 Please enter the following information: Exam 1 score: Exam score: Final exam score: Programming assignments score: 0 7 zybooks participation activities score: zybooks challenge activities score: Labs score: Your score for CptS 111 is: Your grade for CptS 111 is: B- 1 Please enter the following information: Exam 1 score: 8 4 Exam score: 84 5 Final exam score: 84 6 Programming assignments score: zybooks participation activities score: zybooks challenge activities score: Labs score: Your score for CptS 111 is: Your grade for CptS 111 is: A- After your program is working properly, demonstrate it to your TA to get credit. Task : Baseball Bonuses Write a program to calculate and display a professional baseball player s bonus at the end of a season. The bonus is calculated as follows: 1. All-Star Game appearance = $5,000. Regular season MVP = $75,000. World Series MVP = $100, Gold Glove award = $50,000

3 5. Silver Slugger award = $5, Home run champ = $5, Batting average champ = $5,000 Prompt the user with a question related to each of the above categories using successiveif statements and augmented assignment. If the response is y for yes, add the bonus to the total; otherwise, if the response is n, move to the next question. You can do everything in the function main() and then use a function call tomain(). The following shows the proper behavior of the program: 1 For each of the following, enter y for yes and n for no. All-Star Game appearance? y Regular season MVP? n 4 World Series MVP? n 5 Gold Glove award? n 6 Silver Slugger award? y 7 Home run champ? y 8 Batting average champ? n 9 This baseball player s bonus was $ After your program is working correctly, show it to your TA for credit. Task : Politics A person is eligible to be a US senator if they are least 0 years old and have been a US citizen for at least 9 years. To be a US representative, these numbers are 5 and 7, respectively. Write a program that prompts the user for their age in years and their number of years of citizenship. Display the user s eligibility for the Senate and the House. For this task write a program with three functions as follows: run4senate(): Called from main() with two parameters, a person s age and years of citizenship. Prints the person s eligibility. run4house(): Called from main() with two parameters, a person s age and years of citizenship. Prints the person s eligibility. main(): Prompts the user for their age and years of US citizenship and calls the two functions. Example of output with entered text in boldface font. 1 Enter your age in years: 8 Enter the number of years you have been a US citizen: 8 4 You re not eligible to run for the Senate, but maybe you can run for 5 the House of Representatives. 6 You re eligible to run for the House of Representatives!

4 After your program is working correctly, show it to your TA for credit. Task 4: Income Tax Bracket A new tax law was approved in 018 with new tax rates for different incomes. For a person filing as a single taxpayer, the new marginal rates for the given ranges of income are: $0 - $9,55: 10% $9,56 - $8,700: 1% $8,701 - $8,500: % $8,501 - $157,500: 4% $157,501 - $00,000: % $00,000 - $500,000: 5% > $500,000: 7% Write a program with two functions that lets the user know their marginal tax rate. get rate(): A void function called from main() with one parameter, a person s income. Uses if-elif-else construct together with Boolean and relational operators. Prints the marginal tax rate. main(): Prompts the user for their income and callsget rate(). Example of output with entered text in boldface font. 1 Enter your annual income: Your marginal tax rate is %. When your function is working properly, show it to your TA for credit. Task 5: Doomsday Algorithm, Yet Again A year s Doomsday is given by the equation: Doomsday = (((yr // 1)+(yr %1)+(yr %1)// 4)%7+anchor) %7 (1) where yr is the last two digits of the year and the anchor day is an integer between 0 and 6 with 0 corresponding to Sunday and 6 to Saturday. Previously you ve written three functions for the Doomsday algorithm, set anchor(), which takes as its parameter the first two digits of the year and returns a if the digits are0 and a if the digits are 19, calc doom(), which calculates the doomsday using the algorithm given above, and amain() function, which prompts for a four-digit integer year, extracts the first two and last two digits, calls the two functions previously described, and then prints out the Doomsday. Today you ll finish up the Doomsday algorithm by writing one more function and altering main(). Thus, for this task: Write a non-void function get day() that takes as its parameter the doomsday calculated by calc doom(), determines which day of the week it represents (0=Sunday), and returns this day tomain(). Use theif-elif-else construct. 4

5 Alter yourmain() function for Lab #5 so that it prompts the user for a four-digit integer year, extracts the first two and last two digits of the year, callsset anchor which returns the anchor, calls calc doom() which returns the doomsday, and finally calls get day() to determine the day of the week which it then prints as the Doomsday. Anchor days for are Tuesday (=) and for Wednesday (=). Example results are shown below. 1 Enter the year in four digits: 1966 Doomsday: Monday 4 Enter the year in four digits: Doomsday: Wednesday Run the program for your TA to get credit. 5

Practice with Functions

Practice with Functions CptS 111 Lab # Practice with Functions Learning Objectives: Be able to define functions Be able to call functions Be able to pass arguments into functions Be able to return values from functions Be able

More information

Exploring Python Basics

Exploring Python Basics CptS 111 Lab #1 Exploring Python Basics Learning Objectives: - Use the IDLE Shell window to run Python interactively - Use the IDLE Editor window to write a Python program (script) - Run Python programs

More information

Exploring Python Basics

Exploring Python Basics CptS 111 Lab #1 Fall 2017 Exploring Python Basics Learning Objectives: - Use the IDLE Shell window to run Python interactively - Use the IDLE Editor window to write a Python program (script) - Run Python

More information

Comp 151. Control structures.

Comp 151. Control structures. Comp 151 Control structures. admin For these slides read chapter 7 Yes out of order. Simple Decisions So far, we ve viewed programs as sequences of instructions that are followed one after the other. While

More information

Comp 151. Control structures.

Comp 151. Control structures. Comp 151 Control structures. admin quiz this week believe it or not only 2 weeks from exam. one a week each week after that. idle debugger Debugger: program that will let you look at the program as it

More information

CS 106B, Lecture 1 Introduction to C++

CS 106B, Lecture 1 Introduction to C++ CS 106B, Lecture 1 Introduction to C++ reading: Programming Abstractions in C++, Chapters 1 & 2 This document is copyright (C) Stanford Computer Science and Ashley Marty Stepp, Taylor, licensed under Creative

More information

Question 2. [2 points] True False By default, structures are passed-by-reference.

Question 2. [2 points] True False By default, structures are passed-by-reference. CS 101, Spring 2016 May 5th Exam 4 Name: For Questions 1 5, circle True or False. Question 1. [2 points] True False A structure is a user-defined data type. Question 2. [2 points] True False By default,

More information

CS150 - Assignment 5 Data For Everyone Due: Wednesday Oct. 16, at the beginning of class

CS150 - Assignment 5 Data For Everyone Due: Wednesday Oct. 16, at the beginning of class CS10 - Assignment Data For Everyone Due: Wednesday Oct. 16, at the beginning of class http://dilbert.com/fast/2008-0-08/ For this assignment we re going to implement some initial data analysis functions

More information

Name CptS 111, Spring 2018 Programming Assignment #5 Date Name of program Brief description and/or purpose of the program; include sources

Name CptS 111, Spring 2018 Programming Assignment #5 Date Name of program Brief description and/or purpose of the program; include sources CptS 111 PA #5 Due Tuesday, Mar. 20, 2018 for-loops, FIBONACCI, AND A STATISTICS PROGRAM This assignment has two parts and isn t nearly as formidable as it looks (although you shouldn t wait until the

More information

Physics 2660: Fundamentals of Scientific Computing. Lecture 7 Instructor: Prof. Chris Neu

Physics 2660: Fundamentals of Scientific Computing. Lecture 7 Instructor: Prof. Chris Neu Physics 2660: Fundamentals of Scientific Computing Lecture 7 Instructor: Prof. Chris Neu (chris.neu@virginia.edu) Reminder HW06 due Thursday 15 March electronically by noon HW grades are starting to appear!

More information

Important Notes: For this course you must check the Regis Bookstore: for the most current online course material information.

Important Notes: For this course you must check the Regis Bookstore:   for the most current online course material information. Online Course Syllabus CS445 Database Management Important Notes: This document provides an overview of expectations for this online course and is subject to change prior to the term start. Changes may

More information

Final Exam Practice. Partial credit will be awarded.

Final Exam Practice. Partial credit will be awarded. Please note that this problem set is intended for practice, and does not fully represent the entire scope covered in the final exam, neither the range of the types of problems that may be included in the

More information

Introduction to Computer Systems

Introduction to Computer Systems Introduction to Computer Systems Web Page http://pdinda.org/ics Syllabus See the web page for more information. Class discussions are on Piazza We will make only minimal use of Canvas (grade reports, perhaps

More information

Practice Problems. Review, with SOME solutions

Practice Problems. Review, with SOME solutions Practice Problems Review, with SOME solutions Multiple Choice 1. Select the best functional requirement from the list of requirements below. a) A warning dialog should pop up if the student s assignment

More information

Assessment - Unit 3 lessons 16-21

Assessment - Unit 3 lessons 16-21 Name(s) Period Date Assessment - Unit 3 lessons 16-21 1. Which of the following statements about strings in JavaScript is FALSE? a. Strings consist of a sequence of concatenated ASCII characters. b. Strings

More information

In this course, you need to use Pearson etext. Go to "Pearson etext and Video Notes".

In this course, you need to use Pearson etext. Go to Pearson etext and Video Notes. **Disclaimer** This syllabus is to be used as a guideline only. The information provided is a summary of topics to be covered in the class. Information contained in this document such as assignments, grading

More information

Due Date: Two Program Demonstrations (Testing and Debugging): End of Lab

Due Date: Two Program Demonstrations (Testing and Debugging): End of Lab CSC 111 Fall 2005 Lab 6: Methods and Debugging Due Date: Two Program Demonstrations (Testing and Debugging): End of Lab Documented GameMethods file and Corrected HighLow game: Uploaded by midnight of lab

More information

Introduction to Programming

Introduction to Programming Introduction to Programming ( 數 ) Lecture 4 Spring 2005 March 11, 2005 Topics Review of if statement The switch statement Repetition and Loop Statements For-Loop Condition-Loop Reading: Chap. 5.7~ Chap.

More information

In this course, you need to use Pearson etext. Go to "Pearson etext and Video Notes".

In this course, you need to use Pearson etext. Go to Pearson etext and Video Notes. **Disclaimer** This syllabus is to be used as a guideline only. The information provided is a summary of topics to be covered in the class. Information contained in this document such as assignments, grading

More information

Conditionals: Making Choices

Conditionals: Making Choices Announcements ry to get help from me and tutors Reading assignment for this week: Chapters 5 and 6 of Downey Conditionals: Making Choices When you see a page on the web, be sure to reload it to see the

More information

Course: Honors AP Computer Science Instructor: Mr. Jason A. Townsend

Course: Honors AP Computer Science Instructor: Mr. Jason A. Townsend Course: Honors AP Computer Science Instructor: Mr. Jason A. Townsend Email: jtownsend@pkwy.k12.mo.us Course Description: The material for this course is the equivalent of one to two semesters of an entry

More information

Preparing for the Assistant Laboratory Animal Technician (ALAT) Certification Exam. University Laboratory Animal Resources

Preparing for the Assistant Laboratory Animal Technician (ALAT) Certification Exam. University Laboratory Animal Resources Preparing for the Assistant Laboratory Animal Technician (ALAT) Certification Exam University Laboratory Animal Resources Materials Covered Today ALAT Class Syllabus ALAT class schedule 2013 AALAS Certification

More information

Announcements. 1. Forms to return today after class:

Announcements. 1. Forms to return today after class: Announcements Handouts (3) to pick up 1. Forms to return today after class: Pretest (take during class later) Laptop information form (fill out during class later) Academic honesty form (must sign) 2.

More information

Digital Lab Reports. Guide for 1250 Students

Digital Lab Reports. Guide for 1250 Students Digital Lab Reports Guide for 1250 Students 1 Use Microsoft Word to prepare your report. Some requirements: Word files (.docx) or PDFs (.pdf) are required. The Office of the CIO offers a free download

More information

T A X W A R E. Proforma New Wintax Renewing an ITIN Release Schedule Annual Seminar Support Tips. N e w s - N o v e m b e r

T A X W A R E. Proforma New Wintax Renewing an ITIN Release Schedule Annual Seminar Support Tips. N e w s - N o v e m b e r C o n t e n t s Proforma New Wintax - 1040 Renewing an ITIN Release Schedule Annual Seminar Support Tips We have been hard at work since the end of the 2015 filing season. Many enhancements and improvements

More information

Boolean Data-Type. Boolean Data Type (false, true) i.e. 3/6/2018. The type bool is also described as being an integer: bool bflag; bflag = true;

Boolean Data-Type. Boolean Data Type (false, true) i.e. 3/6/2018. The type bool is also described as being an integer: bool bflag; bflag = true; Programming in C++ If Statements If the sun is shining Choice Statements if (the sun is shining) go to the beach; True Beach False Class go to class; End If 2 1 Boolean Data Type (false, ) i.e. bool bflag;

More information

EECS 211 Lab 2. Getting Started. Getting the code. Windows. Mac/Linux

EECS 211 Lab 2. Getting Started. Getting the code. Windows. Mac/Linux EECS 211 Lab 2 Control Statements, Functions and Structures Winter 2017 Today we are going to practice navigating in the shell and writing basic C++ code. Getting Started Let s get started by logging into

More information

I2204 ImperativeProgramming Semester: 1 Academic Year: 2018/2019 Credits: 5 Dr Antoun Yaacoub

I2204 ImperativeProgramming Semester: 1 Academic Year: 2018/2019 Credits: 5 Dr Antoun Yaacoub Lebanese University Faculty of Science Computer Science BS Degree I2204 ImperativeProgramming Semester: 1 Academic Year: 2018/2019 Credits: 5 Dr Antoun Yaacoub I2204- Imperative Programming Schedule 08h00-09h40

More information

CSCI 111 First Midterm Exam Fall Solutions 09.00am 09.50am, Wednesday, October 18, 2017

CSCI 111 First Midterm Exam Fall Solutions 09.00am 09.50am, Wednesday, October 18, 2017 QUEENS COLLEGE Department of Computer Science CSCI 111 First Midterm Exam Fall 2017 10.18.17 Solutions 09.00am 09.50am, Wednesday, October 18, 2017 Problem 1 (10 points) The following C++ program has errors

More information

CSCI 136 Data Structures & Advanced Programming. Fall 2018 Instructors Bill Lenhart & Bill Jannen

CSCI 136 Data Structures & Advanced Programming. Fall 2018 Instructors Bill Lenhart & Bill Jannen CSCI 136 Data Structures & Advanced Programming Fall 2018 Instructors Bill Lenhart & Bill Jannen Administrative Details Class roster: Who s here? And who s trying to get in? Handout: Class syllabus Lecture

More information

CREATE YOUR CONTENT STRATEGY & LAUNCH PLAN Amanda Genther Inc. & Irresistible Offerings

CREATE YOUR CONTENT STRATEGY & LAUNCH PLAN Amanda Genther Inc. & Irresistible Offerings CREATE YOUR CONTENT STRATEGY & LAUNCH PLAN WHAT WE RE GOING TO TALK ABOUT» How to create content that entices your prospects to buy» How to create a content marketing plan that can be put on autopilot

More information

Programming Karel the Robot

Programming Karel the Robot Programming Karel the Robot Announcements Five Handouts Today: Honor Code Downloading Eclipse Running Karel Programs in Eclipse Programming Assignment #1 Submitting Programming Assignments Please only

More information

Making Decisions In Python

Making Decisions In Python Making Decisions In Python In this section of notes you will learn how to have your programs choose between alternative courses of action. Decision Making Is All About Choices My next vacation? Images:

More information

Welcome to CSL 201 Data Structures

Welcome to CSL 201 Data Structures Welcome to CSL 201 Data Structures Narayanan (CK) C Krishnan Department of Computer Science and Engineering IIT Ropar Administrative Trivia Course Structure n 3-0-4 (5 credits) Class Timings n Monday 9.55-10.45

More information

CS 241 Data Organization using C

CS 241 Data Organization using C CS 241 Data Organization using C Fall 2018 Instructor Name: Dr. Marie Vasek Contact: Private message me on the course Piazza page. Office: Farris 2120 Office Hours: Tuesday 2-4pm and Thursday 9:30-11am

More information

CSE 115. Introduction to Computer Science I

CSE 115. Introduction to Computer Science I CSE 115 Introduction to Computer Science I Announcements Lab activites/lab exams submit regularly to autograder.cse.buffalo.edu Announcements Lab activites/lab exams submit regularly to autograder.cse.buffalo.edu

More information

ECOR Come to the PASS workshop with your mock exam complete. During the workshop you can work with other students to review your work.

ECOR Come to the PASS workshop with your mock exam complete. During the workshop you can work with other students to review your work. It is most beneficial to you to write this mock midterm UNDER EXAM CONDITIONS. This means: Complete the midterm in 1.5 hour(s). Work on your own. Keep your notes and textbook closed. Attempt every question.

More information

CSC258: Computer Organization. Memory Systems

CSC258: Computer Organization. Memory Systems CSC258: Computer Organization Memory Systems 1 Summer Independent Studies I m looking for a few students who will be working on campus this summer. In addition to the paid positions posted earlier, I have

More information

Numerical Conversions Intro to Strings in C/C++ CS 16: Solving Problems with Computers I Lecture #8

Numerical Conversions Intro to Strings in C/C++ CS 16: Solving Problems with Computers I Lecture #8 Numerical Conversions Intro to Strings in C/C++ CS 16: Solving Problems with Computers I Lecture #8 Ziad Matni Dept. of Computer Science, UCSB Announcements We are grading your midterms this week! Grades

More information

CS 121 Intro to Programming:Java - Lecture 2. Professor Robert Moll (+ TAs) CS BLDG

CS 121 Intro to Programming:Java - Lecture 2. Professor Robert Moll (+ TAs) CS BLDG CS 121 Intro to Programming:Java - Lecture 2 Course home page: Professor Robert Moll (+ TAs) CS BLDG 276-545-4315 moll@cs.umass.edu http://twiki-edlab.cs.umass.edu/bin/view/moll121/webhome Read text chapters

More information

Orange Coast College BUSINESS & COMPUTING DIVISION EVENING, WEEKEND & ONLINE COURSES. that fit your schedule and goals!

Orange Coast College BUSINESS & COMPUTING DIVISION EVENING, WEEKEND & ONLINE COURSES. that fit your schedule and goals! Orange Coast College BUSINESS & COMPUTING DIVISION EVENING, WEEKEND & ONLINE COURSES that fit your schedule and goals! FALL 2018 term begins August 27, 2018 8 and 16 week courses are available ACCOUNTING

More information

6.S189 Homework 1. What to turn in. Exercise 1.1 Installing Python. Exercise 1.2 Hello, world!

6.S189 Homework 1. What to turn in. Exercise 1.1 Installing Python. Exercise 1.2 Hello, world! 6.S189 Homework 1 http://web.mit.edu/6.189/www/materials.html What to turn in Do the warm-up problems for Days 1 & 2 on the online tutor. Complete the problems below on your computer and get a checkoff

More information

York University AK/ITEC OBJECT-BASED PROGRAMMING. Midterm Test Sample. Examiner: S.Y. Chen Duration: One Hour and Fifteen Minutes

York University AK/ITEC OBJECT-BASED PROGRAMMING. Midterm Test Sample. Examiner: S.Y. Chen Duration: One Hour and Fifteen Minutes York University AK/ITEC 1620 3.0 OBJECT-BASED PROGRAMMING Midterm Test Sample Examiner: S.Y. Chen Duration: One Hour and Fifteen Minutes This exam is closed textbook(s) and closed notes. Use of any electronic

More information

Math 152: Applicable Mathematics and Computing

Math 152: Applicable Mathematics and Computing Math 152: Applicable Mathematics and Computing April 10, 2017 April 10, 2017 1 / 12 Announcements Don t forget, first homework is due on Wednesday. Each TA has their own drop-box. Please provide justification

More information

Vertex Certified Achieve the highest standard to maximize your value Program Guide Vertex Indirect Tax O Series North America - Sales Tax Version 7.

Vertex Certified Achieve the highest standard to maximize your value Program Guide Vertex Indirect Tax O Series North America - Sales Tax Version 7. Vertex Certified Achieve the highest standard to maximize your value Program Guide Vertex Indirect Tax O Series North America - Sales Tax Version 7.x Copyright and legal notices Copyright 2016 Vertex Global

More information

2005 University of California Undergraduate Experience Survey

2005 University of California Undergraduate Experience Survey 2005 University of California Undergraduate Experience Survey This year's survey has three parts: I. Time use and overall satisfaction II. Your background III. Rotating modules PART I: TIME USE and OVERALL

More information

CS 170 Java Programming 1. Week 7: More on Logic

CS 170 Java Programming 1. Week 7: More on Logic CS 170 Java Programming 1 Week 7: More on Logic What s the Plan? Topic 1: A Little Review Use relational operators to compare values Write functions using if and else to make decisions Topic 2: New Logical

More information

More Examples Using Functions and Command-Line Arguments in C++ CS 16: Solving Problems with Computers I Lecture #6

More Examples Using Functions and Command-Line Arguments in C++ CS 16: Solving Problems with Computers I Lecture #6 More Examples Using Functions and Command-Line Arguments in C++ CS 16: Solving Problems with Computers I Lecture #6 Ziad Matni Dept. of Computer Science, UCSB Administrative CHANGED T.A. OFFICE/OPEN LAB

More information

61A Lecture 7. Monday, September 16

61A Lecture 7. Monday, September 16 61A Lecture 7 Monday, September 16 Announcements Homework 2 due Tuesday at 11:59pm Project 1 due Thursday at 11:59pm Extra debugging office hours in Soda 405: Tuesday 6-8, Wednesday 6-7, Thursday 5-7 Readers

More information

Campus Networking Workshop CIS 399. Dale Smith University of Oregon & NSRC

Campus Networking Workshop CIS 399. Dale Smith University of Oregon & NSRC Campus Networking Workshop CIS 399 Dale Smith University of Oregon & NSRC dsmith@uoregon.edu Course Participants: Course Notes US Computer Science Students Undergraduate students from China Network and

More information

Angle CGH = K. Pass on the sum of the digits of K.

Angle CGH = K. Pass on the sum of the digits of K. A1 In the diagram, lines AD and EH are parallel. The lengths of FB and FG are equal and the lengths of BG and GC are equal. Angle ABF is 50. A B C D 50 K E F G H Angle CGH = K. Pass on the sum of the digits

More information

STUDENT INSTRUCTIONS FOR KENT STATE UNIVERSITY S PSYCHOLOGY RESEARCH WEBSITE (http://kentstate.sona-systems.com)

STUDENT INSTRUCTIONS FOR KENT STATE UNIVERSITY S PSYCHOLOGY RESEARCH WEBSITE (http://kentstate.sona-systems.com) STUDENT INSTRUCTIONS FOR KENT STATE UNIVERSITY S PSYCHOLOGY RESEARCH WEBSITE (http://kentstate.sona-systems.com) Introduction The Psychology Research website provides an easy method for you to sign up

More information

10/9/2012. Comparison and Logical Operators The if Statement The if else Statement Nested if Statements The switch case. switch case Statement

10/9/2012. Comparison and Logical Operators The if Statement The if else Statement Nested if Statements The switch case. switch case Statement 1. 2. 3. 4. I l Implementing ti Control C t ll Logic i iin C# 5 5. Comparison and Logical Operators The if Statement The if Statement Nested if Statements The switch case switch case Statement 2 Operator

More information

New York University Introduction to Computer Science Midterm2 Sample Problems 2013 Andrew I. Case. Instructions:

New York University Introduction to Computer Science Midterm2 Sample Problems 2013 Andrew I. Case. Instructions: Name: New York University Introduction to Computer Science Midterm2 Sample Problems 2013 Andrew I. Case Instructions: KEEP TEST BOOKLET CLOSED UNTIL YOU ARE INSTRUCTED TO BEGIN. This exam is double sided

More information

CSci 4211: Introduction to Computer Networks. Time: Monday and Wednesday 2:30 to 3:45 pm Location: Smith Hall 231 Fall 2018, 3 Credits

CSci 4211: Introduction to Computer Networks. Time: Monday and Wednesday 2:30 to 3:45 pm Location: Smith Hall 231 Fall 2018, 3 Credits CSci 4211: Introduction to Computer Networks Time: Monday and Wednesday 2:30 to 3:45 pm Location: Smith Hall 231 Fall 2018, 3 Credits 1 Instructor David Hung-Chang Du Email: du@cs.umn.edu Office: Keller

More information

Tutorials. Tutorial every Friday at 11:30 AM in Toldo 204 * discuss the next lab assignment

Tutorials. Tutorial every Friday at 11:30 AM in Toldo 204 * discuss the next lab assignment 60-212 subir@cs.uwindsor.ca Phone # 253-3000 Ext. 2999 web site for course www.cs.uwindsor.ca/60-212 Dr. Subir Bandyopadhayay Website has detailed rules and regulations All assignments and labs will be

More information

if Statement Numeric Rela5onal Operators The if Statement Flow of Control: Branching (Savitch, Chapter 3)

if Statement Numeric Rela5onal Operators The if Statement Flow of Control: Branching (Savitch, Chapter 3) if Statement Flow of Control: Branching (Savitch, Chapter 3) TOPICS Conditional Execution if and Statement Boolean Data switch Statement Ensures that a statement is executed only when some condi5on is

More information

CSE 113. Announcements

CSE 113. Announcements CSE 113 September 20, 2010 Lab 3 posted Announcements Grades for all labs are still not being computed because of problem with Web-CAT s grading module hopefully we will get to a resolution this week Exam

More information

Lecture 8. Conditionals & Control Flow

Lecture 8. Conditionals & Control Flow Lecture 8 Conditionals & Control Flow Announcements For This Lecture Readings Sections 5.1-5.7 today Chapter 4 for Tuesday Assignment 2 Posted Today Written assignment Do while revising A1 Assignment 1

More information

JavaScript. Like PHP, JavaScript is a modern programming language that is derived from the syntax at C.

JavaScript. Like PHP, JavaScript is a modern programming language that is derived from the syntax at C. Like PHP, JavaScript is a modern programming language that is derived from the syntax at C. It has been around just about as long as PHP, also having been invented in 1995. JavaScript, HTML, and CSS make

More information

CS 221 Lecture. Tuesday, 4 October There are 10 kinds of people in this world: those who know how to count in binary, and those who don t.

CS 221 Lecture. Tuesday, 4 October There are 10 kinds of people in this world: those who know how to count in binary, and those who don t. CS 221 Lecture Tuesday, 4 October 2011 There are 10 kinds of people in this world: those who know how to count in binary, and those who don t. Today s Agenda 1. Announcements 2. You Can Define New Functions

More information

if Statement Numeric Rela7onal Operators The if Statement Flow of Control: Branching (Savitch, Chapter 3)

if Statement Numeric Rela7onal Operators The if Statement Flow of Control: Branching (Savitch, Chapter 3) if Statement Flow of Control: Branching (Savitch, Chapter 3) TOPICS Conditional Execution if,, and if boolean data switch statements CS 160, Fall Semester 2015 1 Programs o-en contain statements that may

More information

Assignment: 2. CS 135 Winter 2018 Graham, Nijjar

Assignment: 2. CS 135 Winter 2018 Graham, Nijjar Assignment: 2 CS 135 Winter 2018 Graham, Nijjar Due: Tuesday, January 23, 9:00 pm Language level: Beginning Student Files to submit: resistance.rkt, immigration.rkt, fridge-foods.rkt, bonus.rkt Warmup

More information

Armstrong State University Engineering Studies MATLAB Marina Switch-Case Statements Primer

Armstrong State University Engineering Studies MATLAB Marina Switch-Case Statements Primer Armstrong State University Engineering Studies MATLAB Marina Switch-Case Statements Primer Prerequisites The Switch-Case Statements Primer assumes knowledge of the MATLAB IDE, MATLAB help, arithmetic operations,

More information

How To: This document covers how to perform several common tasks in eservices from the Student Center. eservices Self Service Help for Students

How To: This document covers how to perform several common tasks in eservices from the Student Center. eservices Self Service Help for Students This document covers how to perform several common tasks in eservices from the Student Center. How To: Find User ID/Username Forgot My Password Browse Schedule or Course Catalog Enroll Add Classes Enroll

More information

Introduction to Data Structures

Introduction to Data Structures 15-121 Introduction to Data Structures Lecture #1 Introduction 28 August 2019 Margaret Reid-Miller Today Course Administration Overview of Course A (very basic) Java introduction Course website: www.cs.cmu.edu/~mrmiller/15-121

More information

Lab 2: Booleans, Strings, Random Numbers, Recursion, Variables, Input function

Lab 2: Booleans, Strings, Random Numbers, Recursion, Variables, Input function Lab 2: Booleans, Strings, Random Numbers, Recursion, Variables, Input function Due: Mar25 (Note that this is a 2-week lab) This lab must be done using paired partners. You should choose a different partner

More information

PRIOR TO SET UP, YOU MUST HAVE ACCESS TO YOUR ACCOUNT

PRIOR TO SET UP, YOU MUST HAVE ACCESS TO YOUR  ACCOUNT Tea Gardens Soccer Club 2019 Season - Self Registration Guide If you are eligible, please proceed to the Active Kids page to obtain your $100 Active Kids Voucher before you commence registration you cannot

More information

Software Testing Laboratory Lab Assignments

Software Testing Laboratory Lab Assignments Problem Statement 01 (Week 01) Software Testing Laboratory Lab Assignments Consider an automated banking application. The user can dial the bank from a personal computer, provide a six-digit password,

More information

Outline. Announcements. Homework 2. Boolean expressions 10/12/2007. Announcements Homework 2 questions. Boolean expression

Outline. 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 information

CSC 172 Data Structures and Algorithms. Fall 2017 TuTh 3:25 pm 4:40 pm Aug 30- Dec 22 Hoyt Auditorium

CSC 172 Data Structures and Algorithms. Fall 2017 TuTh 3:25 pm 4:40 pm Aug 30- Dec 22 Hoyt Auditorium CSC 172 Data Structures and Algorithms Fall 2017 TuTh 3:25 pm 4:40 pm Aug 30- Dec 22 Hoyt Auditorium Agenda Administrative aspects Brief overview of the course Hello world in Java CSC 172, Fall 2017, UR

More information

Internet Web Technologies ITP 104 (2 Units)

Internet Web Technologies ITP 104 (2 Units) Internet Web Technologies ITP 104 (2 Units) Spring 2011 Objective This course is intended to teach the basics involved in publishing content on the World Wide Web. This includes the language of the Web

More information

CSE 142, Autumn 2008 Midterm Exam, Friday, October 31, 2008

CSE 142, Autumn 2008 Midterm Exam, Friday, October 31, 2008 CSE 142, Autumn 2008 Midterm Exam, Friday, October 31, 2008 Name: Section: Student ID #: TA: You have 50 minutes to complete this exam. You may receive a deduction if you keep working after the instructor

More information

CAPP Certification Program Frequently Asked Questions

CAPP Certification Program Frequently Asked Questions CAPP Certification Program Frequently Asked Questions For Potential CAPP Candidates - Now & Beyond July 1, 2014 Q: I am interested in submitting my application for consideration in the CAPP Program. What

More information

The University of Jordan

The University of Jordan The University of Jordan Faculty: Business Department: Management Information Systems Semester: 1 st and 2 nd Academic Year: Each academic year Database Management Systems (2) [1605440] -----------------------------------------------------------------------------------------------------------

More information

CS31 Discussion 1E. Jie(Jay) Wang Week1 Sept. 30

CS31 Discussion 1E. Jie(Jay) Wang Week1 Sept. 30 CS31 Discussion 1E Jie(Jay) Wang Week1 Sept. 30 About me Jie Wang E-mail: holawj@gmail.com Office hour: Wednesday 3:30 5:30 BH2432 Thursday 12:30 1:30 BH2432 Slides of discussion will be uploaded to the

More information

CMSC 201 Fall 2018 Lab 04 While Loops

CMSC 201 Fall 2018 Lab 04 While Loops CMSC 201 Fall 2018 Lab 04 While Loops Assignment: Lab 04 While Loops Due Date: During discussion, September 24 th through September 27 th Value: 10 points (8 points during lab, 2 points for Pre Lab quiz)

More information

61A Lecture 7. Monday, September 15

61A Lecture 7. Monday, September 15 61A Lecture 7 Monday, September 15 Announcements Homework 2 due Monday 9/15 at 11:59pm Project 1 deadline extended, due Thursday 9/18 at 11:59pm! Extra credit point if you submit by Wednesday 9/17 at 11:59pm

More information

KOMAR UNIVERSITY OF SCIENCE AND TECHNOLOGY (KUST)

KOMAR UNIVERSITY OF SCIENCE AND TECHNOLOGY (KUST) Programming Concepts & Algorithms Course Syllabus Course Title Course Code Computer Department Pre-requisites Course Code Course Instructor Programming Concepts & Algorithms + lab CPE 405C Computer Department

More information

I. PREREQUISITE For information regarding prerequisites for this course, please refer to the Academic Course Catalog.

I. PREREQUISITE For information regarding prerequisites for this course, please refer to the Academic Course Catalog. CSCI 611 Note: Course content may be changed, term to term, without notice. The information below is provided as a guide for course selection and is not binding in any form, and should not be used to purchase

More information

Administration. Objects and Arrays. Objects. Agenda. What is an Object? What is a Class?

Administration. Objects and Arrays. Objects. Agenda. What is an Object? What is a Class? Administration Objects and Arrays CS 99 Summer 2000 Michael Clarkson Lecture 6 Read clarified grading policies Lab 6 due tomorrow Submit.java files in a folder named Lab6 Lab 7 Posted today Upson Lab closed

More information

UNDERSTANDING LEED LEADERSHIP IN ENERGY & ENVIRONMENTAL DESIGN

UNDERSTANDING LEED LEADERSHIP IN ENERGY & ENVIRONMENTAL DESIGN UNDERSTANDING LEED LEADERSHIP IN ENERGY & ENVIRONMENTAL DESIGN LEED is a building certification program created by the U.S. Green Building Council (USGBC). LEED Rating Systems LEED Certification is achieved

More information

FND Math Orientation MATH TEAM

FND Math Orientation MATH TEAM FND Math Orientation MATH TEAM Key Goals of Foundation Math Build strong Foundation in Mathematics Improve motivation to learn Inculcate good study habits Enhance independent & mobile learning skills Improve

More information

CIMA study resources for CIMA professional examinations. November 2010 examinations

CIMA study resources for CIMA professional examinations. November 2010 examinations CIMA study resources for CIMA professional examinations November 2010 examinations Introduction The CIMA professional qualification is taken by many working adults as a business qualification and the qualification

More information

CSC209. Software Tools and Systems Programming. https://mcs.utm.utoronto.ca/~209

CSC209. Software Tools and Systems Programming. https://mcs.utm.utoronto.ca/~209 CSC209 Software Tools and Systems Programming https://mcs.utm.utoronto.ca/~209 What is this Course About? Software Tools Using them Building them Systems Programming Quirks of C The file system System

More information

AQA Decision 1 Algorithms. Section 1: Communicating an algorithm

AQA Decision 1 Algorithms. Section 1: Communicating an algorithm AQA Decision 1 Algorithms Section 1: Communicating an algorithm Notes and Examples These notes contain subsections on Flow charts Pseudo code Loops in algorithms Programs for the TI-83 graphical calculator

More information

CPSC 211 Introduction to Software Development

CPSC 211 Introduction to Software Development CPSC 211 duction to Software Development Winter 2010-2011 Term 2 Instructor Name: Dr. Kimberly Voll Office: ICCS 241 Email: kvoll@cs.ubc.ca Please put CS211: in the heading of every message,

More information

Introduction to Information Technology ITP 101x (4 Units)

Introduction to Information Technology ITP 101x (4 Units) Objective Concepts Introduction to Information Technology ITP 101x (4 Units) Upon completing this course, students will: - Understand the fundamentals of information technology - Learn core concepts of

More information

Computer Science Technology Department

Computer Science Technology Department Computer Science Technology Department Houston Community College Department Phone Number: ab Houston Community College ITMT 1370 Windows Client Operating System - Windows 10 Course Syllabus Summer 2017

More information

General course information

General course information General Instructor: B. Hyle Park (MSE 243 / Bourns B207, hylepark@engr.ucr.edu) Teaching assistant: Junchao Wang (MSE 217, jwang071@ucr.edu) Reader: Michael Xiong (MSE 217, zhehao.xiong@email.ucr.edu)

More information

Intensive Introduction to Computer Science. Course Overview Programming in Scratch

Intensive Introduction to Computer Science. Course Overview Programming in Scratch Unit 1, Part 1 Intensive Introduction to Computer Science Course Overview Programming in Scratch Computer Science S-111 Harvard University David G. Sullivan, Ph.D. Welcome to CS S-111! Computer science

More information

CS18000: Problem Solving And Object-Oriented Programming

CS18000: Problem Solving And Object-Oriented Programming CS18000: Problem Solving And Object-Oriented Programming Data Abstraction: Inheritance 7 March 2011 Prof. Chris Clifton Data Abstraction Continued Abstract data type provides Well-defined interface Separation

More information

Introduction to Functional Programming. Slides by Koen Claessen and Emil Axelsson

Introduction to Functional Programming. Slides by Koen Claessen and Emil Axelsson Introduction to Functional Programming Slides by Koen Claessen and Emil Axelsson Goal of the Course Start from the basics Learn to write small-to-medium sized programs in Haskell Introduce basic concepts

More information

CS 4349 Lecture August 21st, 2017

CS 4349 Lecture August 21st, 2017 CS 4349 Lecture August 21st, 2017 Main topics for #lecture include #administrivia, #algorithms, #asymptotic_notation. Welcome and Administrivia Hi, I m Kyle! Welcome to CS 4349. This a class about algorithms.

More information

FREQUENTLY ASKED QUESTIONS

FREQUENTLY ASKED QUESTIONS FREQUENTLY ASKED QUESTIONS WHAT IS PIGSKIN PICK EM? Pigskin Pick Em is a season-long contest in which participants pick the winners or losers of the Sunday and early Monday night games each week, attempting

More information

NEW ONLINE MEMBERSHIP FEATURES

NEW ONLINE MEMBERSHIP FEATURES 2018 UPDATE NEW ONLINE MEMBERSHIP FEATURES 1 setting up your logins step 1: how to access club information The most up-to-date club information can be accessed anytime through your exclusive Member Site

More information

Private Swimming Lessons

Private Swimming Lessons Private Swimming Lessons Private Lessons Designed for participants who would like a 1:1 ratio. Participants will receive individual attention to improve their swimming technique and have the convenience

More information

Topic 4 Expressions and variables

Topic 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 information

Introduction to Computer Systems

Introduction to Computer Systems Introduction to Computer Systems Syllabus Web Page http://www.cs.northwestern.edu/~pdinda/icsclass Instructor Peter A. Dinda 1890 Maple Avenue, Room 338 847-467-7859 pdinda@cs.northwestern.edu Office hours:

More information

Loops. GEEN163 Introduction to Computer Programming

Loops. GEEN163 Introduction to Computer Programming Loops GEEN163 Introduction to Computer Programming Simplicity is prerequisite for reliability. Edsger W. Dijkstra Programming Assignment A new programming assignment has been posted on Blackboard for this

More information