ICA-E - 1 - Portfolio 1 Basic Terms

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 3

SCHOOL OF COMPUTING, ENGINEERING & DIGITAL

TECHNOLOGIES

Python Programming (CIS1028-N)


Name
Student Number
Portfolio No. 1 – Basic Terms

Describe the following programming terms

In python programming language keywords are the reserved


words which are add in the code bit cannot use as a name,
Keyword function or identifier.

# import keywords

Pronouncing a variable isn't an instruction nearby in Python. At the


opinion when a variable is at primary given a value, it is measured
Variable to have been formed.

X = 10
Print (x)

The name we use to assign a variable, strategy, class, module, or


other item is a Python Identifier. This implies that at whatever point
Identifier we give a substance a name, we are utilizing an identifier.

print( ‘abc’.IsIdentifier())

In Python, allocating values to factors is finished utilizing the task


administrator, which is shown by the "=" image. The assertion x=1
doles out the foreordained worth of 1 to the variable "x". This
number will be saved into this variable after this line has been
Assignment executed.

Z = X+Y
Print(Z)

In order to manipulate variables and values, operators are


employed.
Below is an illustration of how to combine two values using the
Operator
plus sign (+):

Print(5+7)

Python Programming (CIS1028-N) – ICA Element 1 Portfolio 1 1 of 3


SCHOOL OF COMPUTING, ENGINEERING & DIGITAL
TECHNOLOGIES

In Python, an expression is made up of both


operators and operands.
An illustration of an expression is x=x+10.
Express The variable x is increased by the first 10 in
ion this expression. The outcome of the addition
is then allocated to the variable x.

# Provide a Python code example


here...

Details that the Pythons interpreter can carry


out is referred to as a statement. Print and
assignment statements have both been
Stateme used.
nt
Print 1
X=2
Print X

 Typing with dynamic style


In comparison to dynamically typed
languages like Python, which stores the
value at a specific location and subsequently
combines the relevant variable name with a
container, languages like C, C++, and Java
allocate memory depending on the data type
of variables and access it accordingly.
Types
 Typing with strong style
Solid composing involves that the sort of a
variable is important when tasks are
completed on it. The expression "dynamic
composing" alludes to a variable's sort just
being laid out during runtime.

Def add (int x, int y)

Casting in python are use for the constructor


just like int(), float(), str().
Casting
X=int(1) output x will be 1

Built-in There are some built in function in every


function programming language which are use to
s perform any task in code just by calling the
function. E.g. print(), input() and pow().

Python Programming (CIS1028-N) – ICA Element 1 Portfolio 1 2 of 3


SCHOOL OF COMPUTING, ENGINEERING & DIGITAL
TECHNOLOGIES

Print(“this is python code”)

Python Programming (CIS1028-N) – ICA Element 1 Portfolio 1 3 of 3

You might also like