True BASIC Ch. 8 Practice Questions. What is the output of this program? ---------------------------------------------------------- LET X = 15.449 PRINT.

Slides:



Advertisements
Similar presentations
For(int i = 1; i
Advertisements

Standard Algorithms Find the highest number. ! Your name and today’s date ! Find the maximum Dim numbers(20) As Integer.
3.3 Measures of Position Measures of location in comparison to the mean. - standard scores - percentiles - deciles - quartiles.
Rank the electric fluxes through each Gaussian surface shown in the figure from largest to smallest. Display any cases of equality in your ranking.
Random Numbers In today’s lesson we will look at: why we might want a random number whether they really are random how to create and scale random numbers.
Numbers. Number data types store numeric values They are immutable data types, which means that changing the value of a number data type results in a.
Math Olympiad #80.
PENNSYLVANIA Pennsylvania is home to 12,440,621 people Pennsylvania is approximately 46,055 square feet. That makes Pennsylvania the 33 rd largest state.
True BASIC Ch. 6 Practice Questions. What is the output? PRINT X LET X = -1 PRINT X FOR X = 4 TO 5 STEP 2 PRINT X NEXT X PRINT X END.
1 9/28/07CS150 Introduction to Computer Science 1 Loops section 5.2, 5.4, 5.7.
Introduction to Computing Dr. Nadeem A Khan. Lecture 14.
Introduction to Computing Dr. Nadeem A Khan. Lecture 6.
Section 3.6 BUILT-IN FUNCTIONS involving numbers & strings.
6.6 Finding the Vertex of a Parabola y = a(x – h) + k Vertex: (h, k)
Order of Operations Problems. Use Parenthesis in different ways! By inserting zero, one or two pairs of parenthesis, list all the numbers you can make.
5.4 – Dividing Decimals Long Division x 46.3 =
The Real Number Line.
PreAP Computer Science Quiz
LING 388: Language and Computers Sandiway Fong Lecture 7 9/15.
13.1 Matrices and Their Sums
STANDARD FUNCTIONS Computer Programming Asst. Prof. Dr. Choopan Rattanapoka and Asst. Prof. Dr. Suphot Chunwiphat.
In this section, we will introduce the definite integral and begin looking at what it represents and how to calculate its value.
Time.
CS Class 05 Topics  Selection: switch statement Announcements  Read pages 74-83, ,
Training begins in… 15:00 minutes Training begins in… 14:00 minutes.
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Extended Prelude to Programming Concepts & Design, 3/e by Stewart Venit and.
Visual Basic I Programming
Ordering Decimals. Learning Goals LG: Demonstrate the ability to order decimals in an accurate order Kid Friendly: Show that you understand how to determine.
Click when ready... Individual Competition Part II Questions
22 January 2016Birkbeck College, U. London1 Introduction to Programming Lecturer: Steve Maybank Department of Computer Science and Information Systems.
Introduction to Computing Dr. Nadeem A Khan. Lecture 7.
Introduction to Computing Dr. Nadeem A Khan. Lecture 9.
Introduction to Programming Python Lab 3: Arithmetic 22 January PythonLab3 lecture slides.ppt Ping Brennan
6.5 Exponents Class Work Grade. Visit these websites to practice exponents
2/14/2016 Perkins AP Calculus AB Day 12 Section 3.7.
© T Madas Positive NumbersNegative Numbers Zero is not positive or negative.
Math – Introduction to Functions 1. Let’s look at a graph of fuel prices (in $ per liter) over time… 2.
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Extended Prelude to Programming Concepts & Design, 3/e by Stewart Venit and.
Chapter 3 - Visual Basic Schneider. Private Sub cmdEvaluate_Click() Dim n As Single, root As Single n = 6.76 root = Sqr(n) picResults.Print root; Int(n);
Standard 14 Solve by completing the square. Example One. Instructions: Factor Perfect Square.
Chapter 3 Selections Liang, Introduction to Programming with C++, Second Edition, (c) 2010 Pearson Education, Inc. All rights reserved
Introduction to Programming
Choose a Count down Time by Clicking a Button Below.
Introduction to Programming
Lesson 18 Math Functions Lesson 19 Format Functions
Computer Simulation Lab
Time Revision.
Introduction to Programming
Compare and Order Numbers
Direct Proof and Counterexample IV
Suppose you roll two dice, and let X be sum of the dice. Then X is
Introduction to Programming
Name: _____________________________________ Date: ______________ Period: ____________ Directions: Cut out the labels provided and paste them in the circles.
DNA 7 Label your paper Copy the notes below
Introduction to Programming
Vertex Form.
1.5: Velocity-time graphs
The Pigeon hole problem
Number systems.
Introduction to Programming
Direct Proof and Counterexample IV
Every number has its place!
Welcome back to Software Development!
Square Least number Add & Subtract.
Time.
Objective: To graph square root functions
Do you have the time to review?
6 ages are listed from smallest to biggest
Computer Simulation Lab
Presentation transcript:

True BASIC Ch. 8 Practice Questions

What is the output of this program? LET X = PRINT ABS(-1*X) PRINT MAX(X, -15.5) PRINT MIN(X, -15.5) PRINT ROUND(X) PRINT ROUND(X, 0) PRINT ROUND(X, 2) PRINT ROUND(ROUND(ROUND(X, 2),1)) PRINT ROUND(X, -1) PRINT INT(X) PRINT SQR(ROUND(X+1)) PRINT REMAINDER(INT(X), 16) END

What is the output of this program? LET X = PRINT ABS(-1*X) PRINT MAX(X, -15.5) PRINT MIN(X, -15.5) PRINT ROUND(X) PRINT ROUND(X, 0) PRINT ROUND(X, 2) PRINT ROUND(ROUND(ROUND(X, 2),1)) PRINT ROUND(X, -1) PRINT INT(X) PRINT SQR(ROUND(X+1)) PRINT REMAINDER(INT(X), 16) END OUTPUT

What is the output of this program? PRINT INT(-99.9) PRINT INT(RND) PRINT ABS(ABS(-1)) PRINT SQR(3*3 + 4^2) PRINT SQR(1) PRINT REMAINDER(11, 10) PRINT REMAINDER(11, 11) PRINT MAX(MIN(-5,-4),MIN(-3,-2)) PRINT 1+SQR(3)*SQR(3) PRINT REMAINDER(44* ,44) PRINT ROUND(1/12345) END

What is the output of this program? PRINT INT(-99.9) PRINT INT(RND) PRINT ABS(ABS(-1)) PRINT SQR(3*3 + 4^2) PRINT SQR(1) PRINT REMAINDER(11, 10) PRINT REMAINDER(11, 11) PRINT MAX(MIN(-5,-4),MIN(-3,-2)) PRINT 1+SQR(3)*SQR(3) PRINT REMAINDER(44* ,44) PRINT ROUND(1/12345) END OUTPUT

Suppose it is 5 minutes past Midnight on January 25 th, What value corresponds to these statements? DATE TIME DATE$ TIME$

Suppose it is 5 minutes past Midnight on January 25 th, What value corresponds to these statements? DATE TIME 300 (5 mins * 60 sec / min) DATE$ “ ” TIME$ “00:05:00”

What are the largest and smallest possible values of: INT(RND*100) INT(SQR(RND*100)) INT(MAX(RND*100, RND*10)) INT(MIN(RND*100, RND*10))

What are the largest and smallest possible values of: Smallest is zero for all. Largest is listed below INT(RND*100) 99 INT(SQR(RND*100)) 9 (highest perfect square < 100) INT(MAX(RND*100, RND*10)) 99 INT(MIN(RND*100, RND*10)) 9

What would be the problem with this program if it was used every day to determine the winner of a lottery? PRINT "Your Lucky Six Numbers Are:“ PRINT 1+INT(RND*100), 1+INT(RND*100) END

What would be the problem with this program if it was used every day to determine the winner of a lottery? PRINT "Your Lucky Six Numbers Are:“ PRINT 1+INT(RND*100), 1+INT(RND*100) END Missing RANDOMIZE, so the winning numbers would be the same every day