COSC 235: Programming and Problem Solving Chapter 3: Arithmetic vs Numerics Instructor: Dr. X 1.

Slides:



Advertisements
Similar presentations
Computer Science 1620 Math Library. Remember this program? suppose that I invest $25000 into a mutual fund that returns 8% per year. Write a program to.
Advertisements

1 “Introduction to Modern Power Electronics”, 2 nd Ed., John Wiley 2010 by Andrzej M. Trzynadlowski.
Chapter 6: User-Defined Functions I
MATH How to be A Great Student. How to Make a List of Topics That Might Be Covered on the Test NEXT.
General Computer Science for Engineers CISC 106 Lecture 25 Dr. John Cavazos Computer and Information Sciences 04/20/2009.
CS 106 Introduction to Computer Science I 04 / 09 / 2008 Instructor: Michael Eckmann.
Chapter 2 Writing Simple Programs
Chapter 3 Supplementary Components and Systems
© T Madas Finding the amount before a Percentage Change.
Maths & Computer Science MATTHEW FAIRBAIRN, 10 JUNE
Welcome Course name Faculty name. YOUR COURSE MATERIALS Roger Arnold: Economics, 8th Ed. You will… — be tested — receive homework assignments — have reading.
Chapter 23 Review Adv. Math. Find the % of the number. 75% of 120.
Used Book LL Text + Connect Access Code + Student Solutions Manual eBook Access Code Does NOT include Connect Before buying a used book, try the Connect.
Goals of Course Introduction to the programming language C Learn how to program Learn ‘good’ programming practices.
A Level Computing#BristolMet Session Objectives U2#S9 MUST identify operators and operands SHOULD describe different types of operator COULD Create an.
COSC 235: Programming and Problem Solving Chapter 1: The magic of Python Instructor: Dr. X 1.
4-1 6 th grade math Exponents. Objective To write and evaluate exponential expressions Why? To prepare you for higher learning in math and science. To.
Copyright © 2009 Pearson Education, Inc. Publishing as Pearson Addison-Wesley STARTING OUT WITH Python Python First Edition by Tony Gaddis Chapter 6 Value-Returning.
PYTHON: PART 2 Catherine and Annie. VARIABLES  That last program was a little simple. You probably want something a little more challenging.  Let’s.
COSC 235: Programming and Problem Solving Instructor: Dr. Xenia Mountrouidou 1.
1 “Introduction to Modern Power Electronics”, 2 nd Ed., John Wiley 2010 by Andrzej M. Trzynadlowski.
9-9 6 th grade math Computing Discounts. Objective To find discount and sale price Why? To know how much you should pay for something that is on sale.
Copyright © 2009 Pearson Education, Inc. Publishing as Pearson Addison-Wesley STARTING OUT WITH Python Python First Edition by Tony Gaddis Chapter 2 Input,
Holt CA Course Percent of Change NS1.4 Calculate given percentages of quantities and solve problems involving discounts at sales, interest earned,
Markup and Discount NS 1.4 Calculate given percentages of quantities and solve problems involving discounts at sales, interest earned, and tips. Objective:-Students.
Agenda Review C++ Library Functions Review User Input Making your own functions Exam #1 Next Week Reading: Chapter 3.
Computer Science: A Structured Programming Approach Using C1 2-7 Input/Output Although our programs have implicitly shown how to print messages, we have.
Control Structures (A) Topics to cover here: Introduction to Control Structures in the algorithmic language Sequencing.
COSC 235: Programming and Problem Solving Ch. 4 or… Everything is an Object Instructor: Dr. X.
111/15/2015CS150 Introduction to Computer Science 1 Summary  Exam: Friday, October 17,  Assignment: Wednesday, October 15, 2003  We have completed.
Maths in Python [ slide 5 ] 1.Copy the table 2.Race a friend with a calculator to see whether Python is faster than a calculator: a) 5 * 6.5 = b)7 / 3.
COSC 235: Programming and Problem Solving Ch. 2: Your first programs!!! Instructor: Dr. X.
Intro to Nested Looping Intro to Computer Science CS1510 Dr. Sarah Diesburg.
1 10/18/04CS150 Introduction to Computer Science 1 Functions Divide and Conquer.
KIC/Computer Programming & Problem Solving 1.  Introduction  Program Modules in C  Math Library Functions  Functions  Function Definitions  Function.
Holt CA Course Percent of Change Warm Up Warm Up California Standards Lesson Presentation Preview.
Chapters 8.5 & 8.6 Problem Solving with percents Exploring percent of increase or decrease.
3. COMPUTING WITH NUMBERS Rocky K. C. Chang September 10, 2015 (Adapted from John Zelle’s slides)
8. DECISION STRUCTURES Rocky K. C. Chang October 18, 2015 (Adapted from John Zelle’s slides)
Introduction to Programming
1 09/10/04CS150 Introduction to Computer Science 1 What Actions Do We Have Part 2.
Mr. Rizzutto Mathematics Room th Grade Team Mr. Barnisky – Civics Mr. Shreve – Science Miss. Dunsmore – Language Arts Mr. Rizzutto – Mathematics.
Introduction to Programming
Chapter 2 Writing Simple Programs
Chapter 6: User-Defined Functions I
A Playful Introduction to Programming by Jason R. Briggs
Exercise : Write a program that print the final price of purchase at a store where everything costs exactly one dollar. Ask for the number of items purchased.
Web Database Development Dr. Morris M. Liaw
4 Chapter Chapter 2 Decimals.
Introduction to Programming
Markup and Discount Calculate given percentages of quantities and solve problems involving discounts at sales, interest earned, and tips. Objective:-Students.
G7 programing language Teacher / Shamsa Hassan Alhassouni.
Chapter 1: Introduction
CSCI 3327 Visual Basic Chapter 6: Methods: A Deeper Look
Introduction to Programming
Variables, Lists, and Objects
More elements of Python programs
Python 19 Mr. Husch.
Note on Program Design Professor Hugh C. Lauer CS-1004 — Introduction to Programming for Non-Majors (Slides include materials from Python Programming:
CS150 Introduction to Computer Science 1
Functions Divide and Conquer
Life is Full of Alternatives
Keep at it, you will figure it out!!
Arithmetic Operations
Chapter 6 Problem-Solving
Basic Lessons 5 & 6 Mr. Kalmes.
Introduction to Programming
Python 19 Mr. Husch.
Calculating: Discount Prices
Python Creating a calculator.
Presentation transcript:

COSC 235: Programming and Problem Solving Chapter 3: Arithmetic vs Numerics Instructor: Dr. X 1

Topics Data types Algebra vs Numerics Math… library in Python! Accumulator? What does this mean? 2

What are computers used for? Number crunching Anything else?

Buying books Suppose the cover price of a book is $24.95, but bookstores get a 40% discount. Shipping costs $3 for the first copy and 75 cents for each additional copy. What is the total wholesale cost for 60 copies? Write a program that calculates the total wholesale price of copies given that the book price, discount percentage, and number of copies are given by the user.

What did you just do? What data types did you use? What is the meaning of the word “gozinta”?

Libraries Why do we need coding libraries? Who has created them? Can we create our own libraries?

Explore Math Write a program that returns the exponent of a number x, i.e., your program should return e x Your program should ask the user to give a number x Then it should print exponent of the number Test your program!! How can you make sure it produces the right output?

Accumulator Programs Divide and Conquer Build piece by piece

References “Python Programming: An Introduction to Computer Science”, 2 nd ed., John M. Zelle 9