SlideShare una empresa de Scribd logo
1 de 8
Descargar para leer sin conexión
Microsoft® Small Basic,[object Object],Variables,[object Object],Estimated time to complete this lesson: 1 hour,[object Object]
Variables,[object Object],In this lesson, you will learn how to:,[object Object],Define and name a variable.,[object Object],Use variables to store text or numbers.,[object Object],Use arrays to store multiple values. ,[object Object]
What is a Variable?,[object Object],You can use a variable to store different kinds of information, such as text or a number. A variable can contain different values at different points in time. Most variables can contain only one value at a time. However, special variables, which are called arrays, can contain more than one value. Let’s look at a program in which you create a variable to store the user’s name. ,[object Object],In this example, your program asks the user to type his or her name. Your program uses a variable that is called "name“ to store the information.,[object Object],When you run your program, it displays “Hello” and then the information in the variable.,[object Object],Click the               button on the toolbar.,[object Object]
 How to Name a Variable? ,[object Object],[object Object]
You can use letters, digits, and underscores in the names of your variables.
You should name your variables so that they describe the values that they store.
When you name your variables, you should not include certain reserved words, such as If, For, and Then.You should follow these rules and guidelines when you create your variables.,[object Object],output,[object Object]
Storing Numerical Values In a Variable,[object Object],To better understand variables that store numbers, let’s write a simple program that calculates the area and perimeter of a rectangle.,[object Object],The program asks the user to specify the length and width of the rectangle. When the user presses ENTER, the program calculates and displays the area and perimeter values of the rectangle.,[object Object],output,[object Object]

Más contenido relacionado

La actualidad más candente

La actualidad más candente (20)

Parts of the ms word 2013 screen and
Parts of the ms word 2013 screen andParts of the ms word 2013 screen and
Parts of the ms word 2013 screen and
 
Excel ppt
Excel pptExcel ppt
Excel ppt
 
MS Publisher.ppt
MS Publisher.pptMS Publisher.ppt
MS Publisher.ppt
 
Photoshop tools and their functions
Photoshop tools and their functionsPhotoshop tools and their functions
Photoshop tools and their functions
 
MS Publisher Training
MS Publisher TrainingMS Publisher Training
MS Publisher Training
 
Word Lecture 1
Word Lecture 1Word Lecture 1
Word Lecture 1
 
Ms powerpoint 2013
Ms powerpoint 2013Ms powerpoint 2013
Ms powerpoint 2013
 
publisher.ppt
publisher.pptpublisher.ppt
publisher.ppt
 
Empowerment Technologies - Module 2
Empowerment Technologies - Module 2Empowerment Technologies - Module 2
Empowerment Technologies - Module 2
 
Getting started with paint
Getting started with paintGetting started with paint
Getting started with paint
 
Visual Basic 6.0
Visual Basic 6.0Visual Basic 6.0
Visual Basic 6.0
 
Empowerment Technology Lesson 5
Empowerment Technology Lesson 5Empowerment Technology Lesson 5
Empowerment Technology Lesson 5
 
Microsoft word
Microsoft wordMicrosoft word
Microsoft word
 
PowerPoint Lesson 1: PowerPoint Basics
PowerPoint Lesson 1: PowerPoint BasicsPowerPoint Lesson 1: PowerPoint Basics
PowerPoint Lesson 1: PowerPoint Basics
 
Microsoft Word 2010
Microsoft Word 2010Microsoft Word 2010
Microsoft Word 2010
 
Ms PowerPoint 2003 Introducton
Ms PowerPoint 2003 IntroductonMs PowerPoint 2003 Introducton
Ms PowerPoint 2003 Introducton
 
Introduction to microsoft word 2007
Introduction to microsoft word 2007Introduction to microsoft word 2007
Introduction to microsoft word 2007
 
Learn MS Powerpoint basics
Learn MS Powerpoint basicsLearn MS Powerpoint basics
Learn MS Powerpoint basics
 
Microsoft Publisher
Microsoft PublisherMicrosoft Publisher
Microsoft Publisher
 
Desktop Publishing
Desktop PublishingDesktop Publishing
Desktop Publishing
 

Destacado

2.5 clock, desktop, and dictionary objects
2.5   clock, desktop, and dictionary objects2.5   clock, desktop, and dictionary objects
2.5 clock, desktop, and dictionary objectsallenbailey
 
1.5 branching and subroutines
1.5   branching and subroutines1.5   branching and subroutines
1.5 branching and subroutinesallenbailey
 
2.3 exploring shapes
2.3   exploring shapes2.3   exploring shapes
2.3 exploring shapesallenbailey
 
2.4 sound, program, and text objects
2.4   sound, program, and text objects2.4   sound, program, and text objects
2.4 sound, program, and text objectsallenbailey
 
1.4 conditions and loops
1.4   conditions and loops1.4   conditions and loops
1.4 conditions and loopsallenbailey
 
2.1 graphics window
2.1   graphics window2.1   graphics window
2.1 graphics windowallenbailey
 
Basic logo-command
Basic logo-commandBasic logo-command
Basic logo-commanddat298
 
2.2 turtle graphics
2.2   turtle graphics2.2   turtle graphics
2.2 turtle graphicsallenbailey
 
In-bai tap logo_01 (hsinh)
  In-bai tap logo_01 (hsinh)  In-bai tap logo_01 (hsinh)
In-bai tap logo_01 (hsinh)saobiennt
 
Msw logo application user manual for teacher
Msw logo application user manual for teacherMsw logo application user manual for teacher
Msw logo application user manual for teacherfarah510
 
In-bai tap logo_02 -thu tuc (hs)
  In-bai tap logo_02 -thu tuc (hs)  In-bai tap logo_02 -thu tuc (hs)
In-bai tap logo_02 -thu tuc (hs)saobiennt
 
Logo primitives
Logo primitivesLogo primitives
Logo primitivessshaner88
 
In-bai tap logo_02 -thu tuc (gv)
  In-bai tap logo_02 -thu tuc (gv)  In-bai tap logo_02 -thu tuc (gv)
In-bai tap logo_02 -thu tuc (gv)saobiennt
 

Destacado (16)

2.5 clock, desktop, and dictionary objects
2.5   clock, desktop, and dictionary objects2.5   clock, desktop, and dictionary objects
2.5 clock, desktop, and dictionary objects
 
1.5 branching and subroutines
1.5   branching and subroutines1.5   branching and subroutines
1.5 branching and subroutines
 
2.3 exploring shapes
2.3   exploring shapes2.3   exploring shapes
2.3 exploring shapes
 
2.4 sound, program, and text objects
2.4   sound, program, and text objects2.4   sound, program, and text objects
2.4 sound, program, and text objects
 
1.4 conditions and loops
1.4   conditions and loops1.4   conditions and loops
1.4 conditions and loops
 
2.1 graphics window
2.1   graphics window2.1   graphics window
2.1 graphics window
 
Basic logo-command
Basic logo-commandBasic logo-command
Basic logo-command
 
2.2 turtle graphics
2.2   turtle graphics2.2   turtle graphics
2.2 turtle graphics
 
In-bai tap logo_01 (hsinh)
  In-bai tap logo_01 (hsinh)  In-bai tap logo_01 (hsinh)
In-bai tap logo_01 (hsinh)
 
Msw logo
Msw logoMsw logo
Msw logo
 
Msw logo application user manual for teacher
Msw logo application user manual for teacherMsw logo application user manual for teacher
Msw logo application user manual for teacher
 
In-bai tap logo_02 -thu tuc (hs)
  In-bai tap logo_02 -thu tuc (hs)  In-bai tap logo_02 -thu tuc (hs)
In-bai tap logo_02 -thu tuc (hs)
 
Logo primitives
Logo primitivesLogo primitives
Logo primitives
 
Geometria de las Tortugas
Geometria de las  TortugasGeometria de las  Tortugas
Geometria de las Tortugas
 
In-bai tap logo_02 -thu tuc (gv)
  In-bai tap logo_02 -thu tuc (gv)  In-bai tap logo_02 -thu tuc (gv)
In-bai tap logo_02 -thu tuc (gv)
 
Logo
LogoLogo
Logo
 

Similar a 1.3 variables

Introduction to Variables.pptx
Introduction to Variables.pptxIntroduction to Variables.pptx
Introduction to Variables.pptxAdityaBhagwat26
 
Visual Programming
Visual ProgrammingVisual Programming
Visual ProgrammingBagzzz
 
Variables and calculations_chpt_4
Variables and calculations_chpt_4Variables and calculations_chpt_4
Variables and calculations_chpt_4cmontanez
 
Versatile Variables
Versatile VariablesVersatile Variables
Versatile Variablestarzan_1644
 
Basics of java 2
Basics of java 2Basics of java 2
Basics of java 2Raghu nath
 
Standard coding practices
Standard coding practicesStandard coding practices
Standard coding practicesAnilkumar Patil
 
Software packages for statistical analysis - SPSS
Software packages for statistical analysis - SPSSSoftware packages for statistical analysis - SPSS
Software packages for statistical analysis - SPSSANAND BALAJI
 
GUI Programming in JAVA (Using Netbeans) - A Review
GUI Programming in JAVA (Using Netbeans) -  A ReviewGUI Programming in JAVA (Using Netbeans) -  A Review
GUI Programming in JAVA (Using Netbeans) - A ReviewFernando Torres
 
Chapter2pp
Chapter2ppChapter2pp
Chapter2ppJ. C.
 
C programming perso notes
C programming perso notesC programming perso notes
C programming perso notesMelanie Tsopze
 
Lab exp declaring arrays)
Lab exp declaring arrays)Lab exp declaring arrays)
Lab exp declaring arrays)Daman Toor
 

Similar a 1.3 variables (20)

Introduction to Variables.pptx
Introduction to Variables.pptxIntroduction to Variables.pptx
Introduction to Variables.pptx
 
Visual Programming
Visual ProgrammingVisual Programming
Visual Programming
 
Variables and calculations_chpt_4
Variables and calculations_chpt_4Variables and calculations_chpt_4
Variables and calculations_chpt_4
 
Ppt lesson 05
Ppt lesson 05Ppt lesson 05
Ppt lesson 05
 
Lesson 5 PP
Lesson 5 PPLesson 5 PP
Lesson 5 PP
 
Versatile Variables
Versatile VariablesVersatile Variables
Versatile Variables
 
Array andfunction
Array andfunctionArray andfunction
Array andfunction
 
07 java variables
07   java variables07   java variables
07 java variables
 
Variables
VariablesVariables
Variables
 
12.6-12.9.pptx
12.6-12.9.pptx12.6-12.9.pptx
12.6-12.9.pptx
 
Array lecture
Array lectureArray lecture
Array lecture
 
Basics of java 2
Basics of java 2Basics of java 2
Basics of java 2
 
Lesson 11 one dimensional array
Lesson 11 one dimensional arrayLesson 11 one dimensional array
Lesson 11 one dimensional array
 
Standard coding practices
Standard coding practicesStandard coding practices
Standard coding practices
 
Software packages for statistical analysis - SPSS
Software packages for statistical analysis - SPSSSoftware packages for statistical analysis - SPSS
Software packages for statistical analysis - SPSS
 
GUI Programming in JAVA (Using Netbeans) - A Review
GUI Programming in JAVA (Using Netbeans) -  A ReviewGUI Programming in JAVA (Using Netbeans) -  A Review
GUI Programming in JAVA (Using Netbeans) - A Review
 
Chapter2pp
Chapter2ppChapter2pp
Chapter2pp
 
C programming perso notes
C programming perso notesC programming perso notes
C programming perso notes
 
Ppt lesson 12
Ppt lesson 12Ppt lesson 12
Ppt lesson 12
 
Lab exp declaring arrays)
Lab exp declaring arrays)Lab exp declaring arrays)
Lab exp declaring arrays)
 

Más de allenbailey

5.1 sharing code
5.1   sharing code5.1   sharing code
5.1 sharing codeallenbailey
 
4.4 advanced games
4.4   advanced games4.4   advanced games
4.4 advanced gamesallenbailey
 
4.3 collision detection
4.3   collision detection4.3   collision detection
4.3 collision detectionallenbailey
 
4.2 responding to events
4.2   responding to events4.2   responding to events
4.2 responding to eventsallenbailey
 
4.1 playing with shapes
4.1   playing with shapes4.1   playing with shapes
4.1 playing with shapesallenbailey
 
3.6 debugging aids
3.6   debugging aids3.6   debugging aids
3.6 debugging aidsallenbailey
 
3.5 the controls object
3.5   the controls object3.5   the controls object
3.5 the controls objectallenbailey
 
3.4 events and interactivity
3.4   events and interactivity3.4   events and interactivity
3.4 events and interactivityallenbailey
 
3.3 the math object
3.3   the math object3.3   the math object
3.3 the math objectallenbailey
 
3.2 stacks and arrays
3.2   stacks and arrays3.2   stacks and arrays
3.2 stacks and arraysallenbailey
 
3.1 file input and output
3.1   file input and output3.1   file input and output
3.1 file input and outputallenbailey
 
2.6 flickr, image list, and network objects
2.6   flickr, image list, and network objects2.6   flickr, image list, and network objects
2.6 flickr, image list, and network objectsallenbailey
 

Más de allenbailey (12)

5.1 sharing code
5.1   sharing code5.1   sharing code
5.1 sharing code
 
4.4 advanced games
4.4   advanced games4.4   advanced games
4.4 advanced games
 
4.3 collision detection
4.3   collision detection4.3   collision detection
4.3 collision detection
 
4.2 responding to events
4.2   responding to events4.2   responding to events
4.2 responding to events
 
4.1 playing with shapes
4.1   playing with shapes4.1   playing with shapes
4.1 playing with shapes
 
3.6 debugging aids
3.6   debugging aids3.6   debugging aids
3.6 debugging aids
 
3.5 the controls object
3.5   the controls object3.5   the controls object
3.5 the controls object
 
3.4 events and interactivity
3.4   events and interactivity3.4   events and interactivity
3.4 events and interactivity
 
3.3 the math object
3.3   the math object3.3   the math object
3.3 the math object
 
3.2 stacks and arrays
3.2   stacks and arrays3.2   stacks and arrays
3.2 stacks and arrays
 
3.1 file input and output
3.1   file input and output3.1   file input and output
3.1 file input and output
 
2.6 flickr, image list, and network objects
2.6   flickr, image list, and network objects2.6   flickr, image list, and network objects
2.6 flickr, image list, and network objects
 

Último

Babel Compiler - Transforming JavaScript for All Browsers.pptx
Babel Compiler - Transforming JavaScript for All Browsers.pptxBabel Compiler - Transforming JavaScript for All Browsers.pptx
Babel Compiler - Transforming JavaScript for All Browsers.pptxYounusS2
 
Videogame localization & technology_ how to enhance the power of translation.pdf
Videogame localization & technology_ how to enhance the power of translation.pdfVideogame localization & technology_ how to enhance the power of translation.pdf
Videogame localization & technology_ how to enhance the power of translation.pdfinfogdgmi
 
RAG Patterns and Vector Search in Generative AI
RAG Patterns and Vector Search in Generative AIRAG Patterns and Vector Search in Generative AI
RAG Patterns and Vector Search in Generative AIUdaiappa Ramachandran
 
Nanopower In Semiconductor Industry.pdf
Nanopower  In Semiconductor Industry.pdfNanopower  In Semiconductor Industry.pdf
Nanopower In Semiconductor Industry.pdfPedro Manuel
 
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdf
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdfUiPath Solutions Management Preview - Northern CA Chapter - March 22.pdf
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdfDianaGray10
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
Things you didn't know you can use in your Salesforce
Things you didn't know you can use in your SalesforceThings you didn't know you can use in your Salesforce
Things you didn't know you can use in your SalesforceMartin Humpolec
 
AI Fame Rush Review – Virtual Influencer Creation In Just Minutes
AI Fame Rush Review – Virtual Influencer Creation In Just MinutesAI Fame Rush Review – Virtual Influencer Creation In Just Minutes
AI Fame Rush Review – Virtual Influencer Creation In Just MinutesMd Hossain Ali
 
Bird eye's view on Camunda open source ecosystem
Bird eye's view on Camunda open source ecosystemBird eye's view on Camunda open source ecosystem
Bird eye's view on Camunda open source ecosystemAsko Soukka
 
Cloud Revolution: Exploring the New Wave of Serverless Spatial Data
Cloud Revolution: Exploring the New Wave of Serverless Spatial DataCloud Revolution: Exploring the New Wave of Serverless Spatial Data
Cloud Revolution: Exploring the New Wave of Serverless Spatial DataSafe Software
 
Introduction to Matsuo Laboratory (ENG).pptx
Introduction to Matsuo Laboratory (ENG).pptxIntroduction to Matsuo Laboratory (ENG).pptx
Introduction to Matsuo Laboratory (ENG).pptxMatsuo Lab
 
Computer 10: Lesson 10 - Online Crimes and Hazards
Computer 10: Lesson 10 - Online Crimes and HazardsComputer 10: Lesson 10 - Online Crimes and Hazards
Computer 10: Lesson 10 - Online Crimes and HazardsSeth Reyes
 
9 Steps For Building Winning Founding Team
9 Steps For Building Winning Founding Team9 Steps For Building Winning Founding Team
9 Steps For Building Winning Founding TeamAdam Moalla
 
UiPath Platform: The Backend Engine Powering Your Automation - Session 1
UiPath Platform: The Backend Engine Powering Your Automation - Session 1UiPath Platform: The Backend Engine Powering Your Automation - Session 1
UiPath Platform: The Backend Engine Powering Your Automation - Session 1DianaGray10
 
OpenShift Commons Paris - Choose Your Own Observability Adventure
OpenShift Commons Paris - Choose Your Own Observability AdventureOpenShift Commons Paris - Choose Your Own Observability Adventure
OpenShift Commons Paris - Choose Your Own Observability AdventureEric D. Schabell
 
Crea il tuo assistente AI con lo Stregatto (open source python framework)
Crea il tuo assistente AI con lo Stregatto (open source python framework)Crea il tuo assistente AI con lo Stregatto (open source python framework)
Crea il tuo assistente AI con lo Stregatto (open source python framework)Commit University
 
Basic Building Blocks of Internet of Things.
Basic Building Blocks of Internet of Things.Basic Building Blocks of Internet of Things.
Basic Building Blocks of Internet of Things.YounusS2
 
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCostKubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCostMatt Ray
 
UiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation DevelopersUiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation DevelopersUiPathCommunity
 
Machine Learning Model Validation (Aijun Zhang 2024).pdf
Machine Learning Model Validation (Aijun Zhang 2024).pdfMachine Learning Model Validation (Aijun Zhang 2024).pdf
Machine Learning Model Validation (Aijun Zhang 2024).pdfAijun Zhang
 

Último (20)

Babel Compiler - Transforming JavaScript for All Browsers.pptx
Babel Compiler - Transforming JavaScript for All Browsers.pptxBabel Compiler - Transforming JavaScript for All Browsers.pptx
Babel Compiler - Transforming JavaScript for All Browsers.pptx
 
Videogame localization & technology_ how to enhance the power of translation.pdf
Videogame localization & technology_ how to enhance the power of translation.pdfVideogame localization & technology_ how to enhance the power of translation.pdf
Videogame localization & technology_ how to enhance the power of translation.pdf
 
RAG Patterns and Vector Search in Generative AI
RAG Patterns and Vector Search in Generative AIRAG Patterns and Vector Search in Generative AI
RAG Patterns and Vector Search in Generative AI
 
Nanopower In Semiconductor Industry.pdf
Nanopower  In Semiconductor Industry.pdfNanopower  In Semiconductor Industry.pdf
Nanopower In Semiconductor Industry.pdf
 
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdf
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdfUiPath Solutions Management Preview - Northern CA Chapter - March 22.pdf
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdf
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
Things you didn't know you can use in your Salesforce
Things you didn't know you can use in your SalesforceThings you didn't know you can use in your Salesforce
Things you didn't know you can use in your Salesforce
 
AI Fame Rush Review – Virtual Influencer Creation In Just Minutes
AI Fame Rush Review – Virtual Influencer Creation In Just MinutesAI Fame Rush Review – Virtual Influencer Creation In Just Minutes
AI Fame Rush Review – Virtual Influencer Creation In Just Minutes
 
Bird eye's view on Camunda open source ecosystem
Bird eye's view on Camunda open source ecosystemBird eye's view on Camunda open source ecosystem
Bird eye's view on Camunda open source ecosystem
 
Cloud Revolution: Exploring the New Wave of Serverless Spatial Data
Cloud Revolution: Exploring the New Wave of Serverless Spatial DataCloud Revolution: Exploring the New Wave of Serverless Spatial Data
Cloud Revolution: Exploring the New Wave of Serverless Spatial Data
 
Introduction to Matsuo Laboratory (ENG).pptx
Introduction to Matsuo Laboratory (ENG).pptxIntroduction to Matsuo Laboratory (ENG).pptx
Introduction to Matsuo Laboratory (ENG).pptx
 
Computer 10: Lesson 10 - Online Crimes and Hazards
Computer 10: Lesson 10 - Online Crimes and HazardsComputer 10: Lesson 10 - Online Crimes and Hazards
Computer 10: Lesson 10 - Online Crimes and Hazards
 
9 Steps For Building Winning Founding Team
9 Steps For Building Winning Founding Team9 Steps For Building Winning Founding Team
9 Steps For Building Winning Founding Team
 
UiPath Platform: The Backend Engine Powering Your Automation - Session 1
UiPath Platform: The Backend Engine Powering Your Automation - Session 1UiPath Platform: The Backend Engine Powering Your Automation - Session 1
UiPath Platform: The Backend Engine Powering Your Automation - Session 1
 
OpenShift Commons Paris - Choose Your Own Observability Adventure
OpenShift Commons Paris - Choose Your Own Observability AdventureOpenShift Commons Paris - Choose Your Own Observability Adventure
OpenShift Commons Paris - Choose Your Own Observability Adventure
 
Crea il tuo assistente AI con lo Stregatto (open source python framework)
Crea il tuo assistente AI con lo Stregatto (open source python framework)Crea il tuo assistente AI con lo Stregatto (open source python framework)
Crea il tuo assistente AI con lo Stregatto (open source python framework)
 
Basic Building Blocks of Internet of Things.
Basic Building Blocks of Internet of Things.Basic Building Blocks of Internet of Things.
Basic Building Blocks of Internet of Things.
 
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCostKubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
 
UiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation DevelopersUiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation Developers
 
Machine Learning Model Validation (Aijun Zhang 2024).pdf
Machine Learning Model Validation (Aijun Zhang 2024).pdfMachine Learning Model Validation (Aijun Zhang 2024).pdf
Machine Learning Model Validation (Aijun Zhang 2024).pdf
 

1.3 variables

  • 1.
  • 2.
  • 3.
  • 4.
  • 5. You can use letters, digits, and underscores in the names of your variables.
  • 6. You should name your variables so that they describe the values that they store.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12. Create a variable that is called diameter, and store the value from the user in it.
  • 13. Create a variable that is called radius, calculate the circle’s radius, and store the result in that variable.
  • 14. Create variables that are called area and circumference, calculate the area and circumference of the circle, and store the values in those variables.
  • 15. Display the area and circumference of the circle.

Notas del editor

  1. You can identify your variables more easily if you give them suitable names. Code:number_1 = 20number_2 = 30number_sum = number_1 + number_2TextWindow.WriteLine(number_sum)
  2. You can use the following formulas for calculation:radius = diameter / 2area = (3.14) * radius * radiuscircumference = (3.14) * 2 * radiusSolution:TextWindow.Write(“What is the diameter of the circle? ")diameter = TextWindow.ReadNumber()radius = diameter / 2area = (3.14) * radius * radiuscircumference = (3.14) * 2 * radiusTextWindow.WriteLine("The area of the circle is " + area + ".")TextWindow.WriteLine("The circumference of the circle is " + circumference + ".")