Microsoft® Small Basic The Math Object Estimated time to complete this lesson: 1 hour.

Slides:



Advertisements
Similar presentations
Microsoft® Small Basic
Advertisements

Methods Java 5.1 A quick overview of methods
Microsoft® Small Basic
Building Java Programs
Return values.
Arithmetic in Pascal (2) Arithmetic Functions Perform arithmetic calculations Gives an argument to the function and it returns the result.
Sum and Difference Identities for Sine and Tangent
7-4 Evaluating and Graphing Sine and Cosine Objective: To use reference angles, calculators or tables, and special angles to find values of the sine and.
Honors Geometry Section 10.3 Trigonometry on the Unit Circle
Microsoft® Small Basic
Warm Up Convert each measure from degrees to radians ° °
Holt Geometry 8-Ext Trigonometry and the Unit Circle 8-Ext Trigonometry and the Unit Circle Holt Geometry Lesson Presentation Lesson Presentation.
Strings, if/else, return, user input
Copyright 2006 by Pearson Education 1 Building Java Programs Chapter 3: Parameters, Return, and Interactive Programs with Scanner.
Copyright 2008 by Pearson Education Building Java Programs Chapter 3 Lecture 3-2: Return; double ; System.out.printf reading: 3.2, 3.5, 4.4 videos: Ch.
Section 7-4 Evaluating and Graphing Sine and Cosine Objectives: To use the reference angles, calculators and tables and special angles to find the values.
13-3: Radian Measure Radian Measure There are 360º in a circle The circumference of a circle = 2r. So if the radius of a circle were 1, then there a.
INTRODUCTION TO PYTHON PART 1 CSC482 Introduction to Text Analytics Thomas Tiahrt, MA, PhD.
Trigonometric Functions of Any Angle & Polar Coordinates
1 CS101 Introduction to Computing Lecture 35 Mathematical Methods (Web Development Lecture 12)
Microsoft® Small Basic The Controls Object Estimated time to complete this lesson: 1 hour.
5.5 Circular Functions: Graphs and Properties Mon Nov 10 Do Now Evaluate 1) Sin pi/2 2) Cos 2pi 3) Tan pi/4.
Copyright © 2009 Pearson Education, Inc. CHAPTER 6: The Trigonometric Functions 6.1The Trigonometric Functions of Acute Angles 6.2Applications of Right.
Trigonometric Functions Of Real Numbers
Further Mathematics Geometry & Trigonometry Summary.
Computer Science 1000 Spreadsheets II Permission to redistribute these slides is strictly prohibited without permission.
Addison Wesley is an imprint of © 2010 Pearson Addison-Wesley. All rights reserved. Chapter 3 Variables, Calculations, and Colors Starting Out with Games.
Microsoft® Small Basic
Foundations Basics: Notation, and other things Algebraic manipulations Indices, Logs, Roots and Surds Binomial expansion Trigonometric functions Trigonometric.
MATH – High School Common Core Vs Kansas Standards.
IMS 3253: Math 1 Dr. Lawrence West, MIS Dept., University of Central Florida Topics Five Fundamental Math Operations Precedence of Math.
Lesson 8 — Spreadsheets Unit 2 — Software. Lesson 8 – Spreadsheets 2 Objectives Understand the purpose and function of a spreadsheet. Identify the major.
Microsoft Visual Basic 2005 BASICS Lesson 4 Mathematical Operators.
CSE1222: Lecture 4The Ohio State University1. Mathematical Functions (1)  The math library file cmath Yes, this is a file with definitions for common.
Python Libraries Importing and Calling functions.
Lesson 4.2. A circle with center at (0, 0) and radius 1 is called a unit circle. The equation of this circle would be (1,0) (0,1) (0,-1) (-1,0)
13-3 The Unit Circle Warm Up Lesson Presentation Lesson Quiz
Lesson 4.2. A circle with center at (0, 0) and radius 1 is called a unit circle. The equation of this circle would be (1,0) (0,1) (0,-1) (-1,0)
Microsoft® Small Basic
MATH 31 LESSONS Chapters 6 & 7: Trigonometry
WHAT ARE SPECIAL RIGHT TRIANGLES? HOW DO I FIND VALUES FOR SIN, COS, TAN ON THE UNIT CIRCLE WITHOUT USING MY CALCULATOR? Exact Values for Sin, Cos, and.
Copyright © Cengage Learning. All rights reserved. Trigonometric Functions: Unit Circle Approach.
Section 7.5 Unit Circle Approach; Properties of the Trigonometric Functions.
1 Math Expressions and Operators. 2 Some C++ Operators Precedence OperatorDescription Higher ( )Function call +Positive - Negative *Multiplication / Division.
Section 7-4 Evaluating and Graphing Sine and Cosine.
Microsoft® Small Basic Collision Detection Estimated time to complete this lesson: 1 hour.
Visual Basic I Programming
Warm Up Find the exact value of each trigonometric function. 1. sin 60°2. tan 45° 3. cos 45° 4. cos 60° 1 EQ: How can I convert between degrees and radians?
Section 6.5 Circular Functions: Graphs and Properties Copyright ©2013, 2009, 2006, 2001 Pearson Education, Inc.
Inverses of Trigonometric Functions 13-4
Trigonometric Functions of Any Angle & Polar Coordinates
Year 6 Block A. 6A1 I can solve practical problems that involve number, place value and rounding. I can compare and order number to at least 10,000,000.
Round any whole number to a required degree of accuracy.
Lesson 12 Spreadsheets Unit 2—Using the Computer.
Microsoft® Small Basic Exploring Shapes Estimated time to complete this lesson: 1 hour.
Let’s Learn 3. Modules Saenthong School, January – February 2016
Does point P lie on the unit circle? If Point P is the point on the terminal arm of angle  that intersects the unit circle, in which quadrant does P lie?
Do Now – Complete the Unit Circle. Chapter 4: Circular Functions Lesson 5: Exact Values of Sines, Cosines, and Tangents Mrs. Parziale.
3 rd grade Math Practice Thinking Problems. Solve the problems in class. Bring the finished packet to the computer lab. In the computer lab you will use.
Holt McDougal Algebra The Unit Circle 10-3 The Unit Circle Holt Algebra 2 Warm Up Warm Up Lesson Presentation Lesson Presentation Lesson Quiz Lesson.
MATLAB (Matrix Algebra laboratory), distributed by The MathWorks, is a technical computing environment for high performance numeric computation and.
14.1 The Unit Circle Part 2. When measuring in radians, we are finding a distance ____ the circle. This is called. What is the distance around a circle?
Reviewing Trigonometry Angle Measure Quadrant Express as a function of a positive acute angle Evaluate Find the angle Mixed Problems.
1 Copyright © Cengage Learning. All rights reserved. 7. Analytic Trigonometry Trigonometric Identities and Trigonometric Equations.
Year 6 Place value & calculation. 6Pv&C1 1. Read and write numbers up to and determine the value of each digit. 5. I understand the purpose of.
Numeric Functions Purpose:-
Place Value and Mental Calculation
Chapter 3 Variables, Calculations, and Colors
Microsoft® Small Basic
Precalculus Essentials
Presentation transcript:

Microsoft® Small Basic The Math Object Estimated time to complete this lesson: 1 hour

The Math Object In this lesson, you will learn how to: Use different properties of the Math object. Use different operations of the Math object.

The Math Object Do complex mathematical calculations boggle your mind at times? Don’t worry! The Math object offers many mathematical functions that you can use in your programs. This object includes the following operations and properties: Cos GetRandomNumber Sin SquareRoot Remainder Pi Abs ArcSin Floor GetDegrees Log Min

Operations of the Math Object Let’s learn about some operations of the Math object by writing a simple program. In this example, you get the sine and the cosine of an angle that you specify by using the Sin and Cos operations of the Math object. You can also get the angle in radians from the sine value by using the ArcSin operation. Next, you can convert the angle from radians to degrees with the GetDegrees operation.

The Pi Property The value of pi is an important aspect of some mathematical calculations. You can retrieve the value of pi in your calculations by using the Pi property of the Math object. Let’s use this property to calculate the area of the circle. In this example, you retrieve the value of pi by using the Pi property of the Math object. Then you use that value in the formula to get the area of the circle.

The Abs Operation Abs is another useful operation that the Math object provides. Let’s check it out. By using the Abs operation, you can get the absolute value of the given number. For example, if you subtract a number from a smaller number, the result will be a negative numeral. In this example, you subtract two numbers. Even if the first number is smaller than the second, the Abs operation returns a positive number.

The Floor Operation While you create your Small Basic program, how can you get the integer value of a decimal number? The Floor operation was created to give an integer value that is smaller than or equal to a decimal number that you specify. Let’s see how you can use this operation in a program to calculate a student’s average grade. In this example, you enter the grades that a student earned in six subjects. Then, you use the Floor operation to get the student’s average as an integer value.

The Log Operation Wen you perform complex calculations, you often need the logarithmic value (base 10) of a particular number. The Math object in Small Basic offers the Log operation to get the log value of the specified number. In this example, you use the Log operation to get the log value of 22.3.

The GetRandomNumber Operation Now, let’s discuss the GetRandomNumber operation of the Math object. You can use this operation to get a random number between 1 and the maximum number that you specify. Let’s use this operation in a program. In this program, you draw the ‘*’ shape on the graphics window in different sizes and at different locations. You first set the height, width, and background color of the graphics window. Then you use set the font size by using the GetRandomNumber operation. The font size will be between 1 and 30 because you have specified 30 as the parameter for the GetRandomNumber operation. You also use this operation to randomly set the asterisks’ x-coordinates and y- coordinates.

The Min Operation The Math object also provides the Min operation, which you can use to compare two numbers and identify the smaller number of the two. Let’s apply this operation in a program. In this example, you request two numbers from the user, use the Min operation to compare them, and display the smaller number in the text window. You also ensure that, if the user specifies the same number twice, the statement “Both numbers are the same” appears.

The SquareRoot Operation By using the SquareRoot operation of the Math object, you can get the square root of a number that you specify. In this example, you specify a number and use the SquareRoot operation to get its square root.

The Remainder Operation You can get the remainder in a division problem by using the Remainder operation of the Math object. In this program, you want to verify whether a specified number is even or odd. You use the If condition to verify whether the number is even (that is, whether the remainder is 0 when you divide the number by 2). If the remainder is 1, the number is odd. To check the remainder, you use the Remainder operation of the Math object.

Let’s Summarize… Congratulations! Now you know how to: Use different properties of the Math object. Use different operations of the Math object. Use different properties of the Math object. Use different operations of the Math object.

Show What You Know By using the GetRandomNumber operation, write a program to move and rotate a rectangle in a random manner. Write a program to draw circles of different sizes in the graphics window. Set the size of the circle by using its area, and randomize the x-coordinates and y-coordinates of the circle.