Hello, World! EMT1111: Logic and Problem Solving Fall 2016 Dr. Mendoza

Size: px
Start display at page:

Download "Hello, World! EMT1111: Logic and Problem Solving Fall 2016 Dr. Mendoza"

Transcription

1 Hello, World! EMT1111: Logic and Problem Solving Fall 2016 Dr. Mendoza

2 LESSON 4 (Labs): Python Overview IV SIMPLE PYTHON PROGRAMS II

3 Lab Assignment 1 (poem2.py) Put the blocks below into the correct order to print a famous poem.

4 Lab Assignment 2 (mcdonalds.py) Put the blocks on the right into the correct order to declare the variables first and then print a following famous song.

5 Lab Assignment 3 (identity.py) Write a Python program to ask the user to enter his/her name, school, city, state, and country. Then the program should print a message like the following (using the values entered by the user): Alex is a student at CITY TECH in the city of Brooklyn on New York state. He is a citizen of the great country USA

6 Input and numeric values length = int(input("what is the length?")) width = int(input("what is the height?")) area = length * width print("area of a rectangle with dimensions", length, "x", width, "is:") print(area) What is the length? 3 What is the height? 4 Area of a rectangle with dimensions 3 x 4 is: 12 What is the length? 12 What is the height? 4 Area of a rectangle with dimensions 3 x 4 is: 48

7 Lab Assignment 4 (age.py) Modify the program to make it generic so that it will ask the user to input his/her name and birth year. Then it will calculate and print the age. name = "Zion" print (name) birthyear = 2000 age = birthyear print (age)

8 Lab Assignment 5 (weight.py) Write a Python program that will ask the user to enter his/her weight in pounds. Then it will convert the user s weight to kilograms and display it. To convert from pounds to kilograms, use the following formula: weightinpounds *

9 if Statement: Example age = 18 if age < 21: print ("You cannot drink yet") print ("You can t drive either") print ("Goodbye") age = 25 if age < 21: print ("You cannot drink yet") print ("You can t drive either") print ("Goodbye") You cannot drink yet You cannot drive yet Goodbye Goodbye

10 Logical Expressions

11 else Statement age = 18 if age < 21: print ("You cannot drink yet") print ("You can t drive either") else: print("drive responsibly") print ("Goodbye") age = 25 if age < 21: print ("You cannot drink yet") print ("You can t drive either") else: print ("Drink responsibly") print ("Drive responsibly") print ("Goodbye") You cannot drink yet You cannot drive yet Goodbye Drink responsibly Drive responsibly Goodbye

12 Lab Assignment 6 (price.py) Write a Python program to ask the user for the price of an item. Then, depending on the price entered by the user, the program should display one of the following messages: "Good price!", if the price is less than 50 "Regular price", otherwise (price is greater than or equal to 50)

13 Lab Assignment 7 (adult.py) Write a Python program to ask the user for his/her birth year. Based on the year entered, the program will calculate the user s age. Finally, depending on the user s age, the program should display one of the following messages: You are a minor, if the user is under 18 years of age You are an adult. Be responsible., otherwise

14 Lab Assignment 8 (today.py) Write a Python program to ask the user for the day of the week. Then, depending on the day entered by the user, the program should display one of the following messages: You have your EMT1111 class today. That means lots of Python programming!, if the day is Tuesday No Python programming today. Of course you can always practice at home., otherwise

15 Lab Assignment 9 (evenorodd.py) Write a program that ask the user for a number. The program should print out whether the input number is even or odd. HINT: Determine if the number is divisible using the modulus operator, that is %. The % operator returns the reminder of the integer division of two numbers. For example, 21%4 would result in 1 and 9%3 would evaluate to 0. Examples: >>> Give me an integer number --> 7 The number 7 is an odd number >>> Give me an integer number --> 20 The number 20 is an even number

Hello, World! EMT1111: Logic and Problem Solving Spring 2016 Dr. Mendoza

Hello, World! EMT1111: Logic and Problem Solving Spring 2016 Dr. Mendoza Hello, World! EMT1111: Logic and Problem Solving Spring 2016 Dr. Mendoza LESSON 7 (Labs): Complex Boolean Expressions and Loops Temperature with a function (temperature2.py) Write a Python program to ask

More information

Introduction to: Computers & Programming: Review prior to 1 st Midterm

Introduction to: Computers & Programming: Review prior to 1 st Midterm Introduction to: Computers & Programming: Review prior to 1 st Midterm Adam Meyers New York University Summary Some Procedural Matters Summary of what you need to Know For the Test and To Go Further in

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

BB4W. KS3 Programming Workbook INTRODUCTION TO. BBC BASIC for Windows. Name: Class:

BB4W. KS3 Programming Workbook INTRODUCTION TO. BBC BASIC for Windows. Name: Class: KS3 Programming Workbook INTRODUCTION TO BB4W BBC BASIC for Windows Name: Class: Resource created by Lin White www.coinlea.co.uk This resource may be photocopied for educational purposes Introducing BBC

More information

Computer Engineering Department CMPE110 Midterm Sample Questions, 2017/ Fall

Computer Engineering Department CMPE110 Midterm Sample Questions, 2017/ Fall Computer Engineering Department CMPE110 Midterm Sample Questions, 2017/2018 - Fall Q1) Give the correct answer for following: 1. What is the value of x after the following statement? double x; x = 3.0

More information

AP Computer Science Homework Set 1 Fundamentals

AP 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 print your food, your favorite

More information

Lecture 3. Program Development. Computer Science, CMU Introduction to Computer 1

Lecture 3. Program Development. Computer Science, CMU Introduction to Computer 1 Lecture 3 Program Development 204101 Introduction to Computer 1 Outline Program Development Cycle 1. Problem Analyses 2. Program Design 3. Coding 4. Debugging 5. (Input) Validation 6. Documentation 7.

More information

February 8 th February 12 th. Unit 6: Polynomials & Introduction to Quadratics

February 8 th February 12 th. Unit 6: Polynomials & Introduction to Quadratics Algebra I February 8 th February 12 th Unit 6: Polynomials & Introduction to Quadratics Jump Start 1) Use the elimination method to solve the system of equations below. x + y = 2 3x + y = 8 2) Solve: 13

More information

Basic Input and Output

Basic Input and Output Basic Input and Output CSE 120 Spring 2017 Instructor: Justin Hsia Teaching Assistants: Anupam Gupta, Braydon Hall, Eugene Oh, Savanna Yee How airlines like United choose who to kick off a flight On Sunday

More information

Introduction to Computer Programming

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

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

Python Programming Challenges

Python Programming Challenges Python Programming Challenges Name Complete the tasks enclosed and complete a self review for each task. Eg: Yes or no errors? Yes syntax errors (write in the error) or No your errors/solve the problem?

More information

My First Python Program

My First Python Program My First Python Program Last Updated: Tuesday, January 22, 2019 Page 2 Objective, Overview Introduction Now that we have learned about the Python Shell, you will now put it all together and write a python

More information

CISC 181 Lab 2 (100 pts) Due: March 7 at midnight (This is a two-week lab)

CISC 181 Lab 2 (100 pts) Due: March 7 at midnight (This is a two-week lab) CISC 181 Lab 2 (100 pts) Due: March 7 at midnight (This is a two-week lab) This lab may be done individually or with a partner. Working with a partner DOES NOT mean, you do the evens, and I ll do the odds.

More information

Lecture 4: Conditionals

Lecture 4: Conditionals Lecture 4: Conditionals Building Java Programs: A Back to Basics Approach by Stuart Reges and Marty Stepp Copyright (c) Pearson 2013. All rights reserved. Type boolean Type boolean boolean: A logical type

More information

CHARMS ASSIGNMENT. Complete by Tuesday, 9/4 100 points!

CHARMS ASSIGNMENT. Complete by Tuesday, 9/4 100 points! CHARMS ASSIGNMENT Complete by Tuesday, 9/4 100 points! Charms is a web-based management system for music teachers. One of the great features of Charms is its ability to make it easy and efficient for me

More information

Hello, World! EMT1111: Logic and Problem Solving Fall 2016 Dr. Mendoza

Hello, World! EMT1111: Logic and Problem Solving Fall 2016 Dr. Mendoza Hello, World! EMT1111: Logic and Problem Solving Fall 2016 Dr. Mendoza LESSON 6 (Labs): Python Functions FUNCTION DEFINITION AND CALLS Functions Terminology Function A piece of code that can be called

More information

Hacettepe University Computer Engineering Department. Programming in. BBM103 Introduction to Programming Lab 1 Week 4. Fall 2018

Hacettepe University Computer Engineering Department. Programming in. BBM103 Introduction to Programming Lab 1 Week 4. Fall 2018 Hacettepe University Computer Engineering Department Programming in BBM103 Introduction to Programming Lab 1 Week 4 Fall 2018 Install PyCharm Download Link : https://www.jetbrains.com/pycharm-edu/download/#section=windows

More information

Chapter 3 Problem Solving and the Computer

Chapter 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 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

Variables, Data Types, and Arithmetic Expressions Learning Objectives:

Variables, Data Types, and Arithmetic Expressions Learning Objectives: Variables, Data Types, and Arithmetic Expressions Learning Objectives: Printing more than one variable in one printf() Printing formatting characters in printf Declaring and initializing variables A couple

More information

How to Do Word Problems. Study of Integers

How to Do Word Problems. Study of Integers Study of Integers In this chapter, we are are going to closely look at the number line system and study integers. -3-2 -1 0 1 2 3 4 5 6 An integer is simply a number like 0, 1, 2, 3, and 4, but unlike

More information

Conditionals/Branching

Conditionals/Branching Conditionals/Branching exam1 = int(input("what is your first exam score? ")) exam2 = int(input("what is your second exam score? ")) exam3 = int(input("what is your third exam score? ")) average = (exam1

More information

Chapter 2 Input, Processing and Output. Hong Sun COSC 1436 Spring 2017 Jan 30, 2017

Chapter 2 Input, Processing and Output. Hong Sun COSC 1436 Spring 2017 Jan 30, 2017 Chapter 2 Input, Processing and Output Hong Sun COSC 1436 Spring 2017 Jan 30, 2017 Designing a Program Designing a Program o Programs must be carefully designed before they are written. Before beginning

More information

Question 2. [2 points] Which of the following is a correct statement to obtain user input? (Assume that fleems is an int variable.

Question 2. [2 points] Which of the following is a correct statement to obtain user input? (Assume that fleems is an int variable. CS 101, Spring 2016 Feb 23rd Exam 1 Name: Question 1. [2 points] Write a statement(s) to declare a variable named num students that will be used to store the number of students and set the value of the

More information

1-3 Variables and Algebraic Expressions. Warm Up Problem of the Day Lesson Presentation Lesson Quizzes

1-3 Variables and Algebraic Expressions. Warm Up Problem of the Day Lesson Presentation Lesson Quizzes Warm Up Problem of the Day Lesson Presentation Lesson Quizzes Warm Up Evaluate. 1. 5(7) 1 2. 7(18 11) 3. 22 + 17 8 + 3 4. 36 + 15(40 35) 5. 3 3 + 7(12 4) Problem of the Day If charged per cut, how much

More information

Measures of Dispersion

Measures of Dispersion Lesson 7.6 Objectives Find the variance of a set of data. Calculate standard deviation for a set of data. Read data from a normal curve. Estimate the area under a curve. Variance Measures of Dispersion

More information

CS 115 Exam 1, Fall 2015 Thu. 09/24/2015

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

CSCE 110: Programming I

CSCE 110: Programming I CSCE 110: Programming I Sample Questions for Exam #1 February 17, 2013 Below are sample questions to help you prepare for Exam #1. Make sure you can solve all of these problems by hand. For most of the

More information

Lesson 16: Applying the Properties of Operations to Multiply and Divide Rational Numbers

Lesson 16: Applying the Properties of Operations to Multiply and Divide Rational Numbers Lesson 16: Applying the Properties of Operations to Multiply and Divide Rational Student Outcomes Students use properties of operations to multiply and divide rational numbers without the use of a calculator.

More information

CISC 181 Lab 2 (100 pts) Due: March 4 at midnight (This is a two-week lab)

CISC 181 Lab 2 (100 pts) Due: March 4 at midnight (This is a two-week lab) CISC 181 Lab 2 (100 pts) Due: March 4 at midnight (This is a two-week lab) This lab should be done individually. Labs are to be turned in via Sakai by midnight on Tuesday, March 4 (the midnight between

More information

Computer Programming, I. Laboratory Manual. Experiment #2. Elementary Programming

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

Ceng 111 Fall 2015 Week 8a

Ceng 111 Fall 2015 Week 8a Ceng 111 Fall 2015 Week 8a Container data and Actions Credit: Some slides are from the Invitation to Computer Science book by G. M. Schneider, J. L. Gersting and some from the Digital Design book by M.

More information

LAB 6 FUNCTIONS I School of Computer and Communication Engineering

LAB 6 FUNCTIONS I School of Computer and Communication Engineering LAB 6 FUNCTIONS I School of Computer and Communication Engineering 1 Universiti Malaysia Perlis 1. OBJECTIVES: 1.1 To apply functions as building blocks of programs. 1.2 To write C programs using functions.

More information

Python Input, output and variables

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

Basic Input and Output

Basic Input and Output Basic Input and Output CSE 120 Spring 2017 Instructor: Justin Hsia Teaching Assistants: Anupam Gupta, Braydon Hall, Eugene Oh, Savanna Yee Administrivia Assignments: Animal Functions due today (4/12) Reading

More information

Python Input, output and variables. Lecture 22 COMPSCI111/111G SS 2016

Python 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 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

CpSc 111 Lab 5 Conditional Statements, Loops, the Math Library, and Redirecting Input

CpSc 111 Lab 5 Conditional Statements, Loops, the Math Library, and Redirecting Input CpSc Lab 5 Conditional Statements, Loops, the Math Library, and Redirecting Input Overview For this lab, you will use: one or more of the conditional statements explained below scanf() or fscanf() to read

More information

Unit 4, Lesson 14: Fractional Lengths in Triangles and Prisms

Unit 4, Lesson 14: Fractional Lengths in Triangles and Prisms Unit 4, Lesson 14: Fractional Lengths in Triangles and Prisms Lesson Goals Use multiplication and division to solve problems involving fractional areas and lengths in triangles. cubes with fractional edge

More information

AP Computer Science Summer Work Mrs. Kaelin

AP Computer Science Summer Work Mrs. Kaelin AP Computer Science Summer Work 2018-2019 Mrs. Kaelin jkaelin@pasco.k12.fl.us Welcome future 2018 2019 AP Computer Science Students! I am so excited that you have decided to embark on this journey with

More information

CS Lab 8. Part 1 - Basics of File I/O

CS Lab 8. Part 1 - Basics of File I/O CS 105 - Lab 8 Today, you will be doing a lot with files! We will start with the basics of reading and writing and then expand upon the pixel value work that you did in a previous lab by working on image

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

Text 1 Cell Phones Raise Security Concerns at School

Text 1 Cell Phones Raise Security Concerns at School Text 1 Cell Phones Raise Security Concerns at School Many people think that students having cell phones in school is a great idea 1 idea. Many parents feel that they don t have to worry as much about their

More information

25 Questions EOG Review #1 EOG REVIEW

25 Questions EOG Review #1 EOG REVIEW Questions EOG Review # EOG REVIEW Solve each: Give the BEST Answer. Name Period 9. Represent as a percent: 8% b. 80% c..4% d..8%. A rectangle is 4 meters long. It has a diagonal that is meters. How wide

More information

MIT AITI Python Software Development

MIT AITI Python Software Development MIT AITI Python Software Development PYTHON L02: In this lab we practice all that we have learned on variables (lack of types), naming conventions, numeric types and coercion, strings, booleans, operator

More information

CS2500 Exam 2 Fall 2011

CS2500 Exam 2 Fall 2011 CS2500 Exam 2 Fall 2011 Name: Student Id (last 4 digits): Section (morning, honors or afternoon): Write down the answers in the space provided. You may use the usual primitives and expression forms, including

More information

Lesson 9: An Application of Linear Equations

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

Circuits and Paths. April 13, 2014

Circuits and Paths. April 13, 2014 Circuits and Paths April 13, 2014 Warm Up Problem Quandroland is an insect country that has four cities. Draw all possible ways tunnels can join the cities in Quadroland. (Remember that some cities might

More information

CSCI 111 First Midterm Exam Spring Solutions 09.05am 09.55am, Wednesday, March 14, 2018

CSCI 111 First Midterm Exam Spring Solutions 09.05am 09.55am, Wednesday, March 14, 2018 QUEENS COLLEGE Department of Computer Science CSCI 111 First Midterm Exam Spring 2018 03.14.18 Solutions 09.05am 09.55am, Wednesday, March 14, 2018 Problem 1 Write a complete C++ program that asks the

More information

CSCI 111 Midterm 1, version A Exam Fall Solutions 09.00am 09.50am, Tuesday, October 13, 2015

CSCI 111 Midterm 1, version A Exam Fall Solutions 09.00am 09.50am, Tuesday, October 13, 2015 QUEENS COLLEGE Department of Computer Science CSCI 111 Midterm 1, version A Exam Fall 2015 10.13.15 Solutions 09.00am 09.50am, Tuesday, October 13, 2015 Problem 1 Write a complete C++ program that does

More information

Course Outlines. Elementary Mathematics (Grades K-5) Kids and Numbers (Recommended for K-1 students)

Course Outlines. Elementary Mathematics (Grades K-5) Kids and Numbers (Recommended for K-1 students) Course Outlines Elementary Mathematics (Grades K-5) Kids and Numbers (Recommended for K-1 students) Shapes and Patterns. Grouping objects by similar properties. Identifying simple figures within a complex

More information

Professor: Sana Odeh Lecture 3 Python 3.1 Variables, Primitive Data Types & arithmetic operators

Professor: Sana Odeh Lecture 3 Python 3.1 Variables, Primitive Data Types & arithmetic operators 1 Professor: Sana Odeh odeh@courant.nyu.edu Lecture 3 Python 3.1 Variables, Primitive Data Types & arithmetic operators Review What s wrong with this line of code? print( He said Hello ) What s wrong with

More information

The Hyderabad Public School, Begumpet, Hyderabad, A.P

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

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 ).

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

Lab01: C++ Expressions ES036a: Programming Fundamentals Fall 2007

Lab01: C++ Expressions ES036a: Programming Fundamentals Fall 2007 Lab01: C++ Expressions ES036a: Programming undamentals all 2007 A. Rationale and Background Welcome to ES036b Lab01. In Lab00 we learned how to create a solution and then a project within this solution

More information

Stratford upon Avon School Mathematics Homework Booklet

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

CSI Lab 02. Tuesday, January 21st

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

Follow this and additional works at: https://surface.syr.edu/cbp Part of the Public Affairs, Public Policy and Public Administration Commons

Follow this and additional works at: https://surface.syr.edu/cbp Part of the Public Affairs, Public Policy and Public Administration Commons Syracuse University SURFACE Community Benchmarks Program Maxwell School of Citizenship and Public Affairs Fall 2003 How to take attendance using Microsoft Excel : attendance proposal for Southwest Community

More information

Software Development Techniques. December Sample Examination Paper. Time: 3 hours

Software Development Techniques. December Sample Examination Paper. Time: 3 hours Software Development Techniques December 2015 Sample Examination Paper Answer ALL questions. Clearly cross out surplus answers. Time: 3 hours The maximum mark for this paper is 100. Any reference material

More information

Lab Session # 3 Conditional Statements. ALQUDS University Department of Computer Engineering

Lab Session # 3 Conditional Statements. ALQUDS University Department of Computer Engineering 2013/2014 Programming Fundamentals for Engineers Lab Lab Session # 3 Conditional Statements ALQUDS University Department of Computer Engineering Objective: Our objective for today s lab session is to introduce

More information

Honors Algebra 2 Summer Packet

Honors Algebra 2 Summer Packet Honors Algebra Summer Packet Name Algebra 1 Teacher Geometry Teacher The start of Algebra is just around the corner, and after finishing a great year in Geometry, there are probably some Algebra skills

More information

Introduction to computers and Python. Matthieu Choplin

Introduction to computers and Python. Matthieu Choplin Introduction to computers and Python Matthieu Choplin matthieu.choplin@city.ac.uk http://moodle.city.ac.uk/ 1 Objectives To get a brief overview of what Python is To understand computer basics and programs

More information

RETURN X return X Returning a value from within a function: computes the value of variable exits the function and returns the value of the variable

RETURN X return X Returning a value from within a function: computes the value of variable exits the function and returns the value of the variable STUDENT TEACHER CLASS WORKING AT GRADE TERM TARGET YEAR TARGET Pseudocode Python Description BEGIN END Identifies the start of a program Identifies the end of a program READ X, Y, Z input() Identifies

More information

CMSC201 Computer Science I for Majors

CMSC201 Computer Science I for Majors CMSC201 Computer Science I for Majors Lecture 03 Operators All materials copyright UMBC and Dr. Katherine Gibson unless otherwise noted Variables Last Class We Covered Rules for naming Different types

More information

download instant at Introduction to C++

download instant at  Introduction to C++ Introduction to C++ 2 Programming: Solutions What s in a name? that which we call a rose By any other name would smell as sweet. William Shakespeare When faced with a decision, I always ask, What would

More information

Algebra 1 (ACP1) Summer Refresher Assignment

Algebra 1 (ACP1) Summer Refresher Assignment Algebra 1 (ACP1) Summer Refresher Assignment This summer bridge assignment represents topics from the first chapter of the text. These topics will not be taught in class. However, please go to http://www.glencoe.com/sec/math/algebra/algebra1/algebra1_05/index.php4/oh

More information

Lab ACN : C++ Programming Exercises

Lab ACN : C++ Programming Exercises Lab ACN : C++ Programming Exercises ------------------------------------------------------------------------------------------------------------------- Exercise 1 Write a temperature conversion program

More information

Pseudocode syntax, descriptions and examples

Pseudocode syntax, descriptions and examples Pseudocode syntax, descriptions and examples Overview: This table provides a reference for commonly used pseudocode for introductory computer program design courses. You should use this as your reference

More information

Guided Problem Solving

Guided Problem Solving -1 Guided Problem Solving GPS Student Page 57, Exercises 1 1: Match each rule with the correct translation. A. (x, y) (x, y 1 ) I. P(, 1) P (3, ) B. (x, y) (x 1 3, y) II. Q(3, 0) Q (3, ) C. (x, y) (x 1,

More information

Chapter 2 Conceptual Modeling. Objectives

Chapter 2 Conceptual Modeling. Objectives Chapter 2 Conceptual Modeling Basic Entity Relationship Diagrams 1 Objectives Definition of terms Importance of data modeling Write good names and definitions for entities, relationships, and attributes

More information

Introduction to Java Unit 1. Using BlueJ to Write Programs

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

Sports Carnival Program Swimming Championships School Entry Instructions

Sports Carnival Program Swimming Championships School Entry Instructions Sports Carnival Program Swimming Championships School Entry Instructions Go to CEO website (http://www.ceo.woll.catholic.edu.au/) and look for the swimmer. Click on the swimmer to access information about

More information

Python Tutorial Exercises with Answers

Python Tutorial Exercises with Answers Learn Coding, The Most Intuitive Way Python Tutorial Exercises with Answers Youtube: https://www.youtube.com/channel/uch9nvjowxmfb7slapwgclpq Website: https://www.codebasicshub.com Facebook: https://www.facebook.com/codebasicshub

More information

STEAM Clown Productions. Python lab. Binary Register. STEAM Clown & Productions Copyright 2017 STEAM Clown. Page 1

STEAM Clown Productions. Python lab. Binary Register. STEAM Clown & Productions Copyright 2017 STEAM Clown. Page 1 Python lab Binary Register Page 1 Copyright 2017 Overview Introduction Task: Get an input string from the user in the form of 1 s and 0 s and convert it to a list of Integers, and then an actual binary

More information

What is the Best Way for Children to Learn Computer Programming?

What is the Best Way for Children to Learn Computer Programming? What is the Best Way for Children to Learn Computer Programming? Dr Alex Davidovic One of the defining characteristics of today s society is that the computers and mobile devices are the integral and natural

More information

Virginia - Mathematics Standards of Learning (2009): 6.10d Virginia - Mathematics Standards of Learning (2016): 5.8.a, 5.8.b,

Virginia - Mathematics Standards of Learning (2009): 6.10d Virginia - Mathematics Standards of Learning (2016): 5.8.a, 5.8.b, 1 Lesson Plan Volume of a Rectangular Prism Age group: 5 t h Grade, 6t h Grade Virginia - Mathematics Standards of Learning (2009): 6.10d Virginia - Mathematics Standards of Learning (2016): 5.8.a, 5.8.b,

More information

Review for Elementary Algebra Final Exam

Review for Elementary Algebra Final Exam Review for Elementary Algebra Final Exam The quadratic formula will be provided on the final exam. Students are expected to know from memory all other relevant formulas, including: - Sum of the angles

More information

23.2 Normal Distributions

23.2 Normal Distributions 1_ Locker LESSON 23.2 Normal Distributions Common Core Math Standards The student is expected to: S-ID.4 Use the mean and standard deviation of a data set to fit it to a normal distribution and to estimate

More information

Decisions, Decisions. Testing, testing C H A P T E R 7

Decisions, Decisions. Testing, testing C H A P T E R 7 C H A P T E R 7 In the first few chapters, we saw some of the basic building blocks of a program. We can now make a program with input, processing, and output. We can even make our input and output a little

More information

D. 90% 2. You need of a can of paint to paint one bench. How many cans would you need to paint 8 benches of equal size?

D. 90% 2. You need of a can of paint to paint one bench. How many cans would you need to paint 8 benches of equal size? . You are writing a report on video games. You are including the fact that a specific video game has been downloaded 90,000,000 times. Write this number in scientific notation.. You need of a can of paint

More information

Activity Parametric Constraints

Activity Parametric Constraints Activity 2.3.2 Parametric Constraints Introduction Have you ever received an advertisement in the mail that looked like it was tailored specifically for you? How could the company afford to spend so much

More information

CS 1301 Exam 1 Fall 2010

CS 1301 Exam 1 Fall 2010 CS 1301 Exam 1 Fall 2010 Name : Grading TA: Integrity: By taking this exam, you pledge that this is your work and you have neither given nor received inappropriate help during the taking of this exam in

More information

Hello, World! An Easy Intro to Python & Programming. Jack Rosenthal

Hello, World! An Easy Intro to Python & Programming. Jack Rosenthal An Easy Intro to Python & Programming Don t just buy a new video game, make one. Don t just download the latest app, help design it. Don t just play on your phone, program it. No one is born a computer

More information

Data Description Measures of central tendency

Data Description Measures of central tendency Data Description Measures of central tendency Measures of average are called measures of central tendency and include the mean, median, mode, and midrange. Measures taken by using all the data values in

More information

How to apply to take IU courses through ACP. Application Overview. IU Bloomington Application Deadline: September 12, 5 PM EDT

How to apply to take IU courses through ACP. Application Overview. IU Bloomington Application Deadline: September 12, 5 PM EDT How to apply to take IU courses through ACP Application Overview IU Bloomington Application Deadline: September 12, 5 PM EDT Taking an IU course through ACP at your school this fall involves four steps:

More information

Unit 6 - Software Design and Development LESSON 4 DATA TYPES

Unit 6 - Software Design and Development LESSON 4 DATA TYPES Unit 6 - Software Design and Development LESSON 4 DATA TYPES Previously Paradigms Choice of languages Key features of programming languages sequence; selection eg case, if then else; iteration eg repeat

More information

Mobile App:IT. Methods & Classes

Mobile App:IT. Methods & Classes Mobile App:IT Methods & Classes WHAT IS A METHOD? - A method is a set of code which is referred to by name and can be called (invoked) at any point in a program simply by utilizing the method's name. -

More information

END-TERM EXAMINATION

END-TERM EXAMINATION (Please Write your Exam Roll No. immediately) END-TERM EXAMINATION DECEMBER 2006 Exam. Roll No... Exam Series code: 100274DEC06200274 Paper Code : MCA-207 Subject: Front End Design Tools Time: 3 Hours

More information

Worlframalpha.com Facebook Report

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

CMSC201 Computer Science I for Majors

CMSC201 Computer Science I for Majors CMSC201 Computer Science I for Majors Lecture 07 While Loops (cont) Last Class We Covered Using while loops Syntax of a while loop Interactive loops Infinite loops and other problems Practice with while

More information

Honors Algebra 2 Summer Packet

Honors Algebra 2 Summer Packet Honors Algebra Summer Packet Name Algebra 1 Teacher Geometry Teacher The start of Algebra is just around the corner, and after finishing a great year in Geometry, there are probably some Algebra skills

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

PAF Chapter Prep Section Mathematics Class 6 Worksheets for Intervention Classes

PAF Chapter Prep Section Mathematics Class 6 Worksheets for Intervention Classes The City School PAF Chapter Prep Section Mathematics Class 6 Worksheets for Intervention Classes Topic: Percentage Q1. Convert it into fractions and its lowest term: a) 25% b) 75% c) 37% Q2. Convert the

More information

Homework Set 1- Fundamentals

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

2. Write a program to convert 69F into its equivalent centigrade temperature.

2. Write a program to convert 69F into its equivalent centigrade temperature. Java lab Assignment (By Mr. Sachin Patil SinceTechnologies.com, info@sincetechnologies.com) 1. Print a triangular multiplication table as shown below: 0 0 2 0 3 6 0 4 8 12 0 5 10 15 20 0 6 12 18 24 30

More information

Key Concept: all programs can be broken down to a combination of one of the six instructions Assignment Statements can create variables to represent

Key Concept: all programs can be broken down to a combination of one of the six instructions Assignment Statements can create variables to represent Programming 2 Key Concept: all programs can be broken down to a combination of one of the six instructions Assignment Statements can create variables to represent information Input can receive information

More information

UNIVERSITY OF PITTSBURGH DEPARTMENT OF COMPUTER SCIENCE

UNIVERSITY OF PITTSBURGH DEPARTMENT OF COMPUTER SCIENCE UNIVERSITY OF PITTSBURGH DEPARTMENT OF COMPUTER SCIENCE CS 2310: MULTIMEDIA SOFTWARE ENGINEERING FINAL PROJECT REPORT BLOOD DONOR -WEB APPLICATION Instructor: Prof. S. K. Chang (chang@cs.pitt.edu) Student:

More information

2-1 Inductive Reasoning and Conjecture

2-1 Inductive Reasoning and Conjecture Write a conjecture that describes the pattern in each sequence. Then use your conjecture to find the next item in the sequence. 15. 3, 6, 9, 12, 15 6 = 3 + 3 9 = 3 + 6 12 = 3 +9 15 = 3 +12 Each element

More information

CS 105 Introduction to Computer Programming in JavaScript Midterm Exam Review

CS 105 Introduction to Computer Programming in JavaScript Midterm Exam Review CS 105 Introduction to Computer Programming in JavaScript Midterm Exam Review Instructor: Joel Castellanos e-mail: joel@unm.edu Web: http://cs.unm.edu/~joel/ 10/18/2017 Schedule Lecture Class Tuesday,

More information