Search Header Logo
Variables, input and output

Variables, input and output

Assessment

Presentation

Computers

8th - 11th Grade

Hard

Created by

Serkan Oektem

FREE Resource

3 Slides • 0 Questions

1

Variables, input and output

Slide image

2

What is a variable?

  • A way of labeling data with a descriptive name, so our programs can be understood more clearly by the reader and ourselves.

  • It is helpful to think of variables as containers that hold information. 

  • Their sole purpose is to label and store data in memory. This data can then be used throughout your program.

3

Variable declarations / assignments:

  • Assume two numbers; 5 and 6 are given. 

  • If we were to declare two variables to store these values, they would be: 

  • Number1 ← 5  

  • Number2 ← 6

  • Assume radius of a circle is 10 and we are asked to calculate the circumference of this circle.

  • The variables we would use: 

  • Radius ← 10
    Circumference ← 2 * PI* Radius
    PS: See there is no space used in any variables.

Variables, input and output

Slide image

Show answer

Auto Play

Slide 1 / 3

SLIDE