0% found this document useful (0 votes)
14 views20 pages

Basic Concepts of Programming - Withlogo

The document covers basic programming concepts including variables, conditional statements, looping and iteration, data types, and functions. It provides definitions and examples in various programming languages such as Python, Java, C++, and C. The content is proprietary and intended for personal use only.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views20 pages

Basic Concepts of Programming - Withlogo

The document covers basic programming concepts including variables, conditional statements, looping and iteration, data types, and functions. It provides definitions and examples in various programming languages such as Python, Java, C++, and C. The content is proprietary and intended for personal use only.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Basic Concepts of

Programming
dmr225@[Link]
N12WUB9QMK

Ritwik Raj
Great Learning

This file is meant for personal use by dmr225@[Link] only.


Sharing or publishing the contents in part or full is liable for legal action.
Variable
dmr225@[Link]
N12WUB9QMK

This file is meant for personal use by dmr225@[Link] only.


Proprietary content.
Sharing ©Great Learning.
or publishing All Rights in
the contents Reserved.
part or Unauthorized
full is liableuse
for or distribution
legal [Link]
Variable
It is a symbolic name or reference to some kind of information.

A variable is a virtual container whose value can


change over a period of time.
dmr225@[Link]
N12WUB9QMK

int roll = 10; // roll is a variable

roll 10
RAM
This file is meant for personal use by dmr225@[Link] only.
Proprietary content.
Sharing ©Great Learning.
or publishing All Rights in
the contents Reserved.
part or Unauthorized
full is liableuse
for or distribution
legal [Link]
Programming language Code

Python

Java

dmr225@[Link]
N12WUB9QMK C++

This file is meant for personal use by dmr225@[Link] only.


Sharing or publishing the contents in part or full is liable for legal action.
Conditional
dmr225@[Link]

Statements
N12WUB9QMK

This file is meant for personal use by dmr225@[Link] only.


Proprietary content.
Sharing ©Great Learning.
or publishing All Rights in
the contents Reserved.
part or Unauthorized
full is liableuse
for or distribution
legal [Link]
Conditional Statements
These are expressions that ask the program to determine if a variable is true or false

There are two possible ways:


dmr225@[Link]
N12WUB9QMK
1. True – Action1

2. False – Action2

This file is meant for personal use by dmr225@[Link] only.


Proprietary content.
Sharing ©Great Learning.
or publishing All Rights in
the contents Reserved.
part or Unauthorized
full is liableuse
for or distribution
legal [Link]
Programming language Code

Python

dmr225@[Link]
N12WUB9QMK

Java

This file is meant for personal use by dmr225@[Link] only.


Sharing or publishing the contents in part or full is liable for legal action.
Programming language Code

C++

dmr225@[Link]
N12WUB9QMK

This file is meant for personal use by dmr225@[Link] only.


Sharing or publishing the contents in part or full is liable for legal action.
dmr225@[Link]

Looping and Iteration


N12WUB9QMK

This file is meant for personal use by dmr225@[Link] only.


Proprietary content.
Sharing ©Great Learning.
or publishing All Rights in
the contents Reserved.
part or Unauthorized
full is liableuse
for or distribution
legal [Link]
Looping and Iteration
Iteration is any time a program repeats a process or sequence.

Loops are a common type of iterations


dmr225@[Link]
N12WUB9QMK

This file is meant for personal use by dmr225@[Link] only.


Proprietary content.
Sharing ©Great Learning.
or publishing All Rights in
the contents Reserved.
part or Unauthorized
full is liableuse
for or distribution
legal [Link]
Programming language Code

Python

Java

dmr225@[Link]
N12WUB9QMK
C++

This file is meant for personal use by dmr225@[Link] only.


Sharing or publishing the contents in part or full is liable for legal action.
dmr225@[Link]
N12WUB9QMK
Datatypes

This file is meant for personal use by dmr225@[Link] only.


Proprietary content.
Sharing ©Great Learning.
or publishing All Rights in
the contents Reserved.
part or Unauthorized
full is liableuse
for or distribution
legal [Link]
Datatypes
Data types help classify what information a variable can hold and what can be
done with it.

Numbers
dmr225@[Link]
N12WUB9QMK
Decimal
Booleans
Characters
Strings

This file is meant for personal use by dmr225@[Link] only.


Proprietary content.
Sharing ©Great Learning.
or publishing All Rights in
the contents Reserved.
part or Unauthorized
full is liableuse
for or distribution
legal [Link]
Programming language Code

Python

dmr225@[Link]
N12WUB9QMK

Java

This file is meant for personal use by dmr225@[Link] only.


Sharing or publishing the contents in part or full is liable for legal action.
Programming language Code

C++

dmr225@[Link]
N12WUB9QMK C

This file is meant for personal use by dmr225@[Link] only.


Sharing or publishing the contents in part or full is liable for legal action.
dmr225@[Link]
N12WUB9QMK
Functions

This file is meant for personal use by dmr225@[Link] only.


Proprietary content.
Sharing ©Great Learning.
or publishing All Rights in
the contents Reserved.
part or Unauthorized
full is liableuse
for or distribution
legal [Link]
Functions
These are self contained modules of code that accomplish a particular task.
Methods with no return type :
public void add(int num1, int num2){
dmr225@[Link] int sum = num1 + num2;
N12WUB9QMK [Link](“Sum of two numbers are : ”+sum);
}

Methods with return type :


public int add(int num1, int num2){
int sum = num1 + num2;
return sum;
}

This file is meant for personal use by dmr225@[Link] only.


Proprietary content.
Sharing ©Great Learning.
or publishing All Rights in
the contents Reserved.
part or Unauthorized
full is liableuse
for or distribution
legal [Link]
Programming language Code

Python

Java
dmr225@[Link]
N12WUB9QMK

C++

This file is meant for personal use by dmr225@[Link] only.


Sharing or publishing the contents in part or full is liable for legal action.
Have a Great Learning
dmr225@[Link]
N12WUB9QMK

All the Best !!

This file is meant for personal use by dmr225@[Link] only.


Proprietary content.
Sharing ©Great Learning.
or publishing All Rights in
the contents Reserved.
part or Unauthorized
full is liableuse
for or distribution
legal [Link]
Thank You!
dmr225@[Link]
N12WUB9QMK

This file is meant for personal use by dmr225@[Link] only.


Proprietary content.
Sharing ©Great Learning.
or publishing All Rights in
the contents Reserved.
part or Unauthorized
full is liableuse
for or distribution
legal [Link]

You might also like