A look at Small basic The Text Window 2017.

Slides:



Advertisements
Similar presentations
Introduction to Eclipse. Start Eclipse Click and then click Eclipse from the menu: Or open a shell and type eclipse after the prompt.
Advertisements

Microsoft® Small Basic
Microsoft® Small Basic Statements, Properties, and Operations Estimated time to complete this lesson: 1 hour.
03 Data types1June Data types CE : Fundamental Programming Techniques.
©2004 Brooks/Cole Chapter 1: Getting Started Sections Covered: 1.1Introduction to Programming 1.2Constructing a Java Program 1.3The print() and println()
Moving To Code 3 More on the Problem-Solving Process §The final step in the problem-solving process is to evaluate and modify (if necessary) the program.
Fundamentals of Programming in Visual Basic 3.1 Visual basic Objects Visual Basic programs display a Windows style screen (called a form) with boxes into.
Copyright 2003 Scott/Jones Publishing Brief Version of Starting Out with C++, 4th Edition Chapter 1 Introduction to Computers and Programming.
Peter Andreae Computer Science Victoria University of Wellington Copyright: Peter Andreae, Victoria University of Wellington Java Programs COMP 102 #3.
A First Program Using C#
Microsoft® Small Basic
Teacher: Ms. Olifer MICROSOFT VISUAL STUDIO 2010: PROPERTIES OF WINDOWS FORM OBJECT.
IPC144 Introduction to Programming Using C Week 1 – Lesson 2
1 C++ Programming Basics Chapter 2 Lecture CSIS 10A.
Getting Started with MATLAB 1. Fundamentals of MATLAB 2. Different Windows of MATLAB 1.
WDMD 170 – UW Stevens Point 1 WDMD 170 Internet Languages eLesson: Variables, Functions and Events (there is an audio component to this eLesson) © Dr.
1 Getting Started with C++. 2 Objective You will be able to create, compile, and run a very simple C++ program on Windows, using Visual Studio 2008.
Sequencing The most simple type of program uses sequencing, a set of instructions carried out one after another. Start End Display “Computer” Display “Science”
PROGRAMMING IN PYTHON LETS LEARN SOME CODE TOGETHER!
1 Project 2: Using Variables and Expressions. 222 Project 2 Overview For this project you will work with three programs Circle Paint Ideal_Weight What.
Introduction to Programming Python Lab 5: Strings and Output 05 February PythonLab5 lecture slides.ppt Ping Brennan
1 Agenda  Unit 7: Introduction to Programming Using JavaScript T. Jumana Abu Shmais – AOU - Riyadh.
Part 1 Learning Objectives To understand that variables are a temporary named location to store data and that programmers work with different data types.
PROBLEM SOLVING WARM-UP Fill in the spaces using any operation to solve the following (!, (), -/+,÷,×): = 6.
JavaScript Part 1 Introduction to scripting The ‘alert’ function.
Microsoft Word Objectives
Development Environment
A variable is a name for a value stored in memory.
Introduction to Programming
Whatcha doin'? Aims: To start using Python. To understand loops.
Python Let’s get started!.
Lesson 1 An Introduction
An Introduction to Computers and Visual Basic
Introduction to Programming
Microsoft Excel A Spreadsheet Program.
* Lecture # 7 Instructor: Rida Noor Department of Computer Science
Variables, Expressions, and IO
G7 programing language Teacher / Shamsa Hassan Alhassouni.
Lesson 3.
Microsoft Access Illustrated
Intro to PHP & Variables
IPC144 Introduction to Programming Using C Week 1 – Lesson 2
Computer Science and an introduction to Pascal
Social Media And Global Computing Introduction to Visual Studio
Introduction to Programming
Fill the screen challenge!
Week 1 Computer Programming Year 9 – Unit 9.04
INPUT & OUTPUT scanf & printf.
Microsoft® Small Basic
Escape sequences: Practice using the escape sequences on the code below to see what happens. Try this next code to help you understand the last two sequences.
Teaching London Computing
T. Jumana Abu Shmais – AOU - Riyadh
Working with Files.
Task 1 Computer Programming LEVEL 6 PROGRAMMING:
Introduction to TouchDevelop
Hello World! Syntax.
Introduction to Programming
A look at Python Programming Language 2018.
An Introduction to Computers and Visual Basic
Introduction to Programming
Reading from and Writing to Files
Introduction to Programming
Introduction to Python
Chapter 1 Introducing Small Basic
Data Types Every variable has a given data type. The most common data types are: String - Text made up of numbers, letters and characters. Integer - Whole.
Basic Mr. Husch.
Computer Programming-1 CSC 111
Starter Which of these inventions is: Used most by people in Britain
Reading from and Writing to Files
Presentation transcript:

A look at Small basic The Text Window 2017

What is Small Basic? Microsoft product Programming language or environment A Good, place to start when learning to code

The Environment Write programs in the Editor 2.Toolbar commands 3. Related information is displayed here To Open Small Basic, look the “Programs” folder on the desktop. Double click on the SB shortcut file to open.

TextWindow.WriteLine(“Hello, Greenwood!”) Write (input) your first Program Put the line above in the editor Click the run button in the toolbar Check the resulting “OUTPUT” Notice the “Intellisense” list (Helps) Save in SB Folder

If you wrote the line correctly, when you run it, it will respond with “Hello, Greenwood” If you wrote the line incorrectly, when you run it, it will tell you that you have an error. You will have to DEBUG it.

TextWindow.WriteLine(“Hello, Greenwood!”) You created a “STATEMENT” by giving this instruction. Programs can be 1 statement or more! Object: item on which you can perform operations Syntax: Set of rules by which the computer can read and understand your commands. (How you structure your programming “sentences”) TextWindow.WriteLine(“Hello, Greenwood!”) Operation: instructions for the object String: characters together that stand for something. (In this case the greeting in quotes “”)

Objects have a specific set of Properties TextWindow.BackgroundColor = “Gray” TextWindow.ForegroundColor = “Red” TextWindow.Title = “Fun With Small Basic Programming” TextWindow.Top = 300 TextWindow.Left = 300 *300 is location on screen, not size

You can also interact with a user by having the computer READ what the user inputs Copy this program exactly TextWindow.Write(“Enter your name:”) name = TextWindow.Read() TextWindow.WriteLine(“Hello ” + name + “.”) Name = TextWindow.Read() is an example of a VARIABLE WriteLine: puts the text on its own line. Write: will just keep adding on the same line as long as space permits Read(): computer reads back what the user inputs

You can even carry on a conversation…

Variables start with a letter: number_1 Store different kinds of information, such as text or a number. A variable can contain different values at different points of time. (Microsoft) Rules: start with a letter: number_1 You can use letters, numbers, and underscores Name so they describe whatever value you are needing Don’t use If, for, or Then

Try a simple variable: Adding two numbers number_1 = 30 number_2 = 55 number_sum = number_1 + number_2 TextWindow.WriteLine(number_sum) You can also use variables with user’s input… think of it as a mini calculator.

Try a User Input Calculator!

Finding Area and perimeter TextWindow.Title = "Area and Perimeter“ TextWindow.Write("How long is the rectangle?") Length = TextWindow.ReadNumber() TextWindow.Write("How wide is the rectangle?") Width = TextWindow.ReadNumber() Area = Length * Width Perimeter = 2 * Length + 2 * Width TextWindow.WriteLine("The area of the rectangle is " + Area + ".") TextWindow.WriteLine("The perimeter of the rectangle is " + Perimeter + ".")

You try1! Title your Program “Lunch Order” Write on its own line “Amount of ham sandwiches we would need for the whole class:” Ask the user to specify “How many Ham Sandwiches for the Ladies?” by using the variable number_ladies Ask the user to specify “How many ham sandwiches for the guys?” by using the variable number_guys Create a variable called total that is the sum of number_ladies plus number_guys Use a statement to display the amount of sandwiches we need to order totally. (Hint: TextWindow.WriteLine (We need to order “ +… Save your program.

“You Try 1” Rubric Title (TextWindow.Title) slide 7 Text Statement Item Credit depends on Points possible Your points Title (TextWindow.Title) slide 7 Title is present and spelled correctly 1 Text Statement (TextWindow.WriteLine) Write on its own line “Amount of ham sandwiches we would need for the whole class:” 2 Text for guys amounts and girls amounts (see slide 10) User input questions are correctly coded and spelled correctly. 3 Variables (ReadNumber) Total = number_guys +… (see slide 11) Variables used to find guy’s and ladies’ amounts are correct. TOTAL variable is done correctly 4 Final answer statement: (See slide 12, last line, using +Total+…) Final total with statement “We need to order ____ ham sandwiches.” is present and correct. Total: ____/12 Note: This program can be done in 8 lines of code.