Variables - an introduction

To store and load data in Python, as a developer, I need to use variables


Introduction

A text can be stored in a variable.


Example:

myFirstVariable = "hello"

will store the text "hello" inside variable myFirstVariable

print(myFirstVariable)

will print the content of myFirstVariable to the terminal (which in this case is "hello")


A variable can be named almost anything, as long as it is a single word.

We therefore use cammelCase (where all the letters are small, except when we start a new word)

so, my first variable should be written as: myFirstVariable


Instructions

Make your Python script:

-

Python code



Terminal output


Written by: Bartek / Bartlomiej Rohard Warszawski

?>