Fichas
python basic
Fichas del conjunto (12)
- 1Define the term variable and Constant?Variable:
Is a memory location used to store a value.The value stored can be changed while program is running
Constant:
is a memory location that stores value.the value stored can be accessed but cannot be changed while program is running. - 2Name all data types used in programming and give examples?integer: "12"
floating point:"1.0122"
character:"A"
string:"Hello"
Boolean:"True" - 3What is Casting?Casting is used to convert one of the data type into the other e.g. int(string variable) would convert a string into a integer.
- 4State the common Arithmetic Operators?Addition: Adds two values together.
Subtraction: Takes the second values away from the first value.
Multiplication: Multiplies two values together.
Real Division: It divides the first value by the second value.
Integer Division: Used to find the Quotient after division.
Remainder: Used to find the remainder after division.
Exponential: Raises the value to the power of exponent. - 5Explain the difference between Modulus (MOD) and Quotient (DIV)?Modulus: The remainder that is left over when a number is divided by another.
Quotient: Integer division used to find the quotient (integer number before the decimal point) after division. - 6State what is meant by the term Sequence and Select?Sequence: The sequence can contain any number of actions, but no actions can be skipped in the sequence.
Select: In a selection structure, a question is asked, and depending on the answer, the program takes one of two courses of action, after which the program moves on to the next event. - 7State what is meant by Iteration?Iteration is the process of repeating a set of instructions a fixed number of time or until a condition is met.
- 8State what is meant by String?String is any type of characters (i.e. letters,numbers,symbols and punctuation marks.)
- 9State what is meant by Concatenation?Concatenation is the operation of joining two strings together.
- 10Describe the different string manipulation?String manipulation is the process of changing, parsing, splicing, pasting, or analyzing strings.
- 11What are the Comparison Operators?>: Greater than
>=: Greater than or equal to
<: Less then
<=: Less then or equal to
==: Equal too
!=: Not equal too - 12What are the Boolean Operators?AND: Both inputs need to be True for the result to be TRUE.
OR: If the either or both of the inputs are True for the result will be TRUE.
Información
- Descripción
- Fichas sobre python basic , creado por Hamad Sajid el 12/11/2019.
- Creado por
- Hamad Sajid
- Visitas
- 3
- Valoración