0% found this document useful (0 votes)
3 views6 pages

Programming Concepts

The document provides an in-depth exploration of variables in programming, detailing their characteristics, examples in Python and C++, and a flowchart illustrating their use. It also includes a comparison of the advantages and disadvantages of learning programming. References are provided for further reading on the topic.

Uploaded by

jobnabea78
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views6 pages

Programming Concepts

The document provides an in-depth exploration of variables in programming, detailing their characteristics, examples in Python and C++, and a flowchart illustrating their use. It also includes a comparison of the advantages and disadvantages of learning programming. References are provided for further reading on the topic.

Uploaded by

jobnabea78
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

VARIABLES PROGRAMMING

CONCEPTS IN DEPTH

JOB MUTETHIA NABEA


B135/34247/2025
COMPUTER SCIENCE
01/10/2025
TABLE OF CONTENTS
(GREGORIA, 2013)1:INTRODUCTION TO VARIABLES IN PROGRAMMING...........2
1.1A VARIABLE........................................................................................................ 2
1.2KEY CHARACTERISTICS OF VARIABLES...............................................................2
2:CODE EXAMPLES WITH VARIABLES (WU, 2025)................................................2
2.1 EXAMPLE ONE FROM PYTHON........................................................................... 2
2.2 EXAMPLE TWO FROM C++ PROGRAMMING.......................................................2
3:CODE RUNNING SCREENSHOTS /OUTPUT AND FLOWCHART.........................3
Flowchart of the program (ELIJAH, 2020)...................................................................3
PYTHON AND C++ OUTPUT....................................................................................... 3
4:COMPARISON TABLE BETWEEN ADVANTAGES AND DISADVANTAGES
(NABEA, MYLES, 2019)OF LEARNING PROGRAMMING...........................................4
5:REFERENCES......................................................................................................... 4
References................................................................................................................. 4
VARIABLES PROGRAMMING CONCEPTS IN DEPTH

(GREGORIA, 2013)1:INTRODUCTION TO VARIABLES IN


PROGRAMMING
1.1A VARIABLE
A variable is a named memory location in a computer’s memory that holds a value

1.2KEY CHARACTERISTICS OF VARIABLES


Each variable is given a unique name and identifier.

Variables are associated with data types which define the kind of value they can
hold.

A variable corresponds to a specific memory address

The value stored in variables has mutability

2:CODE EXAMPLES WITH VARIABLES (WU, 2025)


2.1 EXAMPLE ONE FROM PYTHON
python
# A simple example demonstrating variables in Python

# Declare and initialize an integer variable

age = 30

# Declare and initialize a string variable

user_name = "Alex"

# Print a message using the variables

print(f"Hello, {user_name}! You are {age} years old.")

# Update the value of the 'age' variable

age = age + 1

# Print the updated message

print(f"Happy Birthday! You are now {age} years old.")

```
VARIABLES PROGRAMMING CONCEPTS IN DEPTH

2.2 EXAMPLE TWO FROM C++ PROGRAMME


#include <stdio.h>

int main() {

printf("Hello, World!\n");

return 0;

3:CODE RUNNING SCREENSHOTS /OUTPUT AND


START

VARIABL
E
DECLARI
NG
DECLARI
NG
VARIABL
E
USERNA
ME
OUTPUT

STOP

FLOWCHART

FLOWCHART OF THE PROGRAM (ELIJAH, 2020)

PYTHON AND C++ OUTPUT

4:COMPARISON TABLE BETWEEN ADVANTAGES AND


DISADVANTAGES (NABEA, MYLES, 2019)OF LEARNING
PROGRAMMING
ADVANTAGES DISADVANTAGES
High demand and salary potential Highly competitive entry level
Engaging work environment May lead to sendentary lifestyles
VARIABLES PROGRAMMING CONCEPTS IN DEPTH
VARIABLES PROGRAMMING CONCEPTS IN DEPTH

REFERENCES
ELIJAH, N. (2020). CODING OUTPUTS. FUTURE TECHNOLOGIES , 30.

GREGORIA, M. D. (2013). CODE BOOK FPR ANALYSIS OF MEDIA FRAMES. CIFOR


PUBLISHERS.

NABEA, MYLES. (2019). ALPHA TECH GEEKS. TECHNOLOGY WORK CONFERENCE (p.
100). NAIROBI: EAST AFRICA PULISHERS .

WU, J. (2025). ARTIFICIAL INTELIGENCE IN PROGRAMMING. LONGHORN PUBLISHERS.

You might also like