Statement
A single instruction or step within a program
Record
A data structure that stores elements, as a series of attributes, used in databases.
Variable
A data element in a program whose value can change as the program is running
Constant
A data element in a program whose value does not change as the program is running
Input
Data introduced into a computer system from the outside world
Output
Data that is presented to the outside world, such as by a printer or display
Function
A named set of instructions that returns a value
Procedure
A named set of instructions that does not return a value
Assignment
The process of allocating a value to a data element
String
A data type capable of storing combinations of numbers, letters and symbols
Iteration
A type of programming construct in which a group of statements is executed repeatedly
Selection
Program construct in which a condition is used to decide which instructions (if any) will be executed
Sequence
Program construct in which a set of instructions are executed in the order in which they appear
Casting
The process of converting one data type into another data type
How to assign a string, integer, float, and Boolean in python
How to convert a variable into a string, integer or float for concatenation. Rules for each one.
str(variable)
int(variable)
float(variable)
How to make a user input a string, integer, float
Arithmetic operators in python for addition, subtraction, multiplication, division, integer division, remainder.
Addition) +
Subtraction) -
Multiplication) *
Division) /
Integer Division) //
Remainder) %
Boolean operators in python, not equal to, less than or equal to, and greater than or equal to.
Not equal to) !=
Less than or equal to) <=
Greater than or equal to) >=
Return the number of characters in a string
name = “Faisal”
print(len(name))
6
How to return the position of the first occurennce of a particular value in a string.
string = “Faisal”
print(string.index(“F”))
0
How to extract a character at a certain position in a string
string = “Faisal”
print(string[0])
F
How to make a string all uppercase
string = “Faisal”
print(string.upper())
FAISAL
How to make a string all lowercase
string = “Faisal”
print(string.lower())
faisal