• Wrong document? Swap it for free
  • Written by students who passed
  • Immediately available after payment
  • Read online or as PDF
Sell
Where do you study
Your language
Document preview thumbnail
Preview 3 out of 21 pages
Class notes

Lecture notes Programming (PPA115D)

Document preview thumbnail
Preview 3 out of 21 pages

Here you will learn how to declare variables and how to differentiate between constant variables and a variable on its self. Learn how to use data types in a code.

Content preview

Variables, Constants and Data types
By
Vuyisile Memani
Faculty of ICT
Department of Computer Science

,Variables

A variable is a container that can store data of a specific type.

The data can change, but the container stores one value at a
time.

There are rules to be followed in naming variables.




Faculty of ICT
Department of Computer Science

, Naming convention of variables

A variable name must be highly descriptive of the value it will
store.

Example
Create two variables, one to store the name of a person and
the other to store the price of an item. Let the person’s name
be “Vuyisile” and the item’s price be R20.50.

Answers
name = “Vuyisile” , price = 20.50
Faculty of ICT
Department of Computer Science

Document information

Uploaded on
September 7, 2021
Number of pages
21
Written in
2021/2022
Type
Class notes
Professor(s)
Mr kgoete
Contains
All classes
R161,00

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Sold
0
Followers
0
Items
4
Last sold
-



Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their exams and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can immediately select a different document that better matches what you need.

Pay how you prefer, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card or EFT and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions