1 / 12

Just Basic Lessons 7&8

Just Basic Lessons 7&8. Mr. Kalmes. Lesson 7 Objectives. Compare and contrast two different programs Analyze different arithmetic operators. Previous Program. Create the following Program. Compare the two programs. [beginning] print "Type a dollar and cent amount."

orly
Download Presentation

Just Basic Lessons 7&8

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Just Basic Lessons 7&8 Mr. Kalmes

  2. Lesson 7 Objectives • Compare and contrast two different programs • Analyze different arithmetic operators

  3. Previous Program Create the following Program Compare the two programs [beginning] print "Type a dollar and cent amount." input "(Press 'Enter' alone for help) ?"; amount if amount = 0 then goto [help] let tax = amount * 0.07 print "Tax is: "; tax; ". Total is: "; tax + amount goto [beginning] [help] print "This tax program determines how much tax is" print "due on an amount entered and also computes" print "the total amount. The tax rate is 7%" goto [beginning] Input “Enter a price, please: “; amount Let tax = amount*.07 Print “tax is: “; tax; “Total is: “; tax+amount

  4. Journal Part 1 • Please click on your journal and complete sections 1 & 2

  5. Operators Definition: mathematical symbols that generate an action in the program Examples: a = b a is equal to b a <> b a is unequal to b a < b a is less than b a > b a is greater than b a <= b a is less than or equal to b a >= b a is greater than or equal to b

  6. Calculator Please create a calculator program that includes: • Add, Subtract, Multiply, Divide Sections • Must be able to repeat • Must be able to choose to repeat or end • Must have a way to get around divide by zero

  7. Lesson 8 Objectives • Define strings • Understand the purpose of strings in BASIC programming

  8. Variable & Strings What is a variable? String: String variables hold strings of characters (numbers, letters, and symbols) that can be used later in the program. Examples: • data$ • age$ • name$

  9. String Program 1 Write the following program: input “Please type your age.”; age$ print “I can’t believe you are “; age$

  10. String Program 2 Write the following program: input "What is your first name ?"; firstName$ input "What is your last name ?"; lastName$ let fullName$ = firstName$ + " " + lastName$ print "Your full name is: "; fullName$

  11. Journal Part 2 Complete section 3 of your journal

  12. Exit Slip Please complete your exit slip via google forms

More Related