Thanks to visit codestin.com
Credit goes to www.scribd.com

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

Basic Concepts of Programming - Withlogo

The document provides an overview of basic programming concepts including variables, conditional statements, looping, data types, and functions. It explains the definitions and examples of each concept, highlighting their importance in programming. The content is intended for personal use and is protected against unauthorized sharing or distribution.

Uploaded by

saniyatahseen76
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)
3 views20 pages

Basic Concepts of Programming - Withlogo

The document provides an overview of basic programming concepts including variables, conditional statements, looping, data types, and functions. It explains the definitions and examples of each concept, highlighting their importance in programming. The content is intended for personal use and is protected against unauthorized sharing or distribution.

Uploaded by

saniyatahseen76
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
You are on page 1/ 20

Basic Concepts of

Programming
[email protected]
3J7M5G961L

Ritwik Raj
Great Learning

This file is meant for personal use by [email protected] only.


Sharing or publishing the contents in part or full is liable for legal action.
Variable
[email protected]
3J7M5G961L

This file is meant for personal use by [email protected] only.


Proprietary content.
Sharing ©Great Learning.
or publishing All Rights in
the contents Reserved.
part or Unauthorized
full is liableuse
for or distribution
legal action.prohibited
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.
[email protected]
3J7M5G961L

int roll = 10; // roll is a variable

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

Python

Java

[email protected]
3J7M5G961L C++

This file is meant for personal use by [email protected] only.


Sharing or publishing the contents in part or full is liable for legal action.
Conditional
[email protected]

Statements
3J7M5G961L

This file is meant for personal use by [email protected] only.


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

There are two possible ways:


[email protected]
3J7M5G961L
1. True – Action1

2. False – Action2

This file is meant for personal use by [email protected] only.


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

Python

[email protected]
3J7M5G961L

Java

This file is meant for personal use by [email protected] only.


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

C++

[email protected]
3J7M5G961L

This file is meant for personal use by [email protected] only.


Sharing or publishing the contents in part or full is liable for legal action.
[email protected]

Looping and Iteration


3J7M5G961L

This file is meant for personal use by [email protected] only.


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

Loops are a common type of iterations


[email protected]
3J7M5G961L

This file is meant for personal use by [email protected] only.


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

Python

Java

[email protected]
3J7M5G961L
C++

This file is meant for personal use by [email protected] only.


Sharing or publishing the contents in part or full is liable for legal action.
Datatypes
[email protected]
3J7M5G961L

This file is meant for personal use by [email protected] only.


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

Numbers
[email protected]
3J7M5G961L
Decimal
Booleans
Characters
Strings

This file is meant for personal use by [email protected] only.


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

Python

[email protected]
3J7M5G961L

Java

This file is meant for personal use by [email protected] only.


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

C++

[email protected]
3J7M5G961L C

This file is meant for personal use by [email protected] only.


Sharing or publishing the contents in part or full is liable for legal action.
Functions
[email protected]
3J7M5G961L

This file is meant for personal use by [email protected] only.


Proprietary content.
Sharing ©Great Learning.
or publishing All Rights in
the contents Reserved.
part or Unauthorized
full is liableuse
for or distribution
legal action.prohibited
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){
int sum = num1 + num2;
[email protected]
3J7M5G961L System.out.println(“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 [email protected] only.


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

Python

Java
[email protected]
3J7M5G961L

C++

This file is meant for personal use by [email protected] only.


Sharing or publishing the contents in part or full is liable for legal action.
Have a Great Learning
[email protected]
3J7M5G961L

All the Best !!

This file is meant for personal use by [email protected] only.


Proprietary content.
Sharing ©Great Learning.
or publishing All Rights in
the contents Reserved.
part or Unauthorized
full is liableuse
for or distribution
legal action.prohibited
Thank You!
[email protected]
3J7M5G961L

This file is meant for personal use by [email protected] only.


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

You might also like