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

0% found this document useful (0 votes)
9 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)
9 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
You are on page 1/ 20

Basic Concepts of

Programming
[email protected]
N12WUB9QMK

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]
N12WUB9QMK

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]
N12WUB9QMK

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]
N12WUB9QMK 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
N12WUB9QMK

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]
N12WUB9QMK
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]
N12WUB9QMK

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]
N12WUB9QMK

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


N12WUB9QMK

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]
N12WUB9QMK

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]
N12WUB9QMK
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.
[email protected]
N12WUB9QMK
Datatypes

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]
N12WUB9QMK
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]
N12WUB9QMK

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]
N12WUB9QMK 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.
[email protected]
N12WUB9QMK
Functions

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){
[email protected] int sum = num1 + num2;
N12WUB9QMK 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]
N12WUB9QMK

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]
N12WUB9QMK

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]
N12WUB9QMK

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