ar
Feedback

لا تقع ضحية للمخادعين! تيليمتريو يكتشف ويُميّز هذه القنوات 👉 إذا كنت تريد رؤية العلامة، اشترك

Free Python Course

Free Python Course

الذهاب إلى القناة على Telegram
5 967
المشتركون
لا توجد بيانات24 ساعات
-357 أيام
-22530 أيام
أرشيف المشاركات
EXAMPLE OF ARITHMETIC OPERATORS :
EXAMPLE OF ARITHMETIC OPERATORS :

ARITHMETIC OPERATOR : Arithmetic operators are used with numeric values to perform common mathematical operations: There are
ARITHMETIC OPERATOR : Arithmetic operators are used with numeric values to perform common mathematical operations: There are following operators in arithmetic Operator

TYPES OF OPERATOR : Operators are devided into following types :
TYPES OF OPERATOR : Operators are devided into following types :

Here, + is the operator that performs addition. 2 and 3 are
Here, + is the operator that performs addition. 2 and 3 are

WHAT IS OPERATORS ? Operators are special symbols in Python that carry out arithmetic or logical computation. The value that the operator operates on is called the operand.

photo content

EXAMPLE : Addition of string and integer using explicit conversion
EXAMPLE : Addition of string and integer using explicit conversion

EXPLICIT TYPE CONVERSION In Explicit Type Conversion, users convert the data type of an object to required data type. We use the predefined functions like int(), float(), str(), etc to perform explicit type conversion. This type of conversion is also called typecasting because the user casts (changes) the data type of the objects.

photo content

photo content

IMPLICIT TYPE CONVERSION In Implicit type conversion, Python automatically converts one data type to another data type. This process doesn't need any user involvement. Let's see an example where Python promotes the conversion of the lower data type (integer) to the higher data type (float) to avoid data loss.

TYPE CONVERSION IN PYTHON The process of converting the value of one data type (integer, string, float, etc.) to another data type is called type conversion. Python has two types of type conversion. 1.) Implicit Type Conversion 2.) Explicit Type Conversion

photo content

WHAT IS DATA TYPE ? Data types are the classification or categorization of data items. It represents the kind of value that tells what operations can be performed on a particular data. Since everything is an object in Python programming, data types are actually classes and variables are instance (object) of these classes. STANDARD DATA TYPE OF PYTHON Numeric Sequence Type Boolean Set Dictionary

MULTI WORDS VARIABLE NAMES Variable names with more than one word can be difficult to read. There are several techniques you can use to make them more readable: CAMEL CASE Each word, except the first, starts with a capital letter: myVariableName = "John" PASCAL CASE Each word starts with a capital letter: MyVariableName = "John" SNAKE CASE Each word is separated by an underscore character: my_variable_name = "John" KEBAB CASE Kebab case combines words by replacing each space with a dash (-), as follows: user-login-count = "John"

RULES FOR DECLARING VARIABLE ? A variable can have a short name (like x and y) or a more descriptive name (age, carname, total_volume). Rules for Python variables are : • A variable name must start with a letter or the underscore character • A variable name cannot start with a number • A variable name should not have space between them • A variable name can only contain alpha-numeric characters and underscores (A-z, 0-9, and _ ) • Variable names are case-sensitive (age, Age and AGE are three different variables)

CREATING VARIABLES : Python has no command for declaring a variable. A variable is created the moment you first assign a value to it.

WHAT IS VARIABLES ? Variables are nothing but reserved memory locations to store values. This means that when you create a variable you reserve some space in memory. Based on the data type of a variable, the interpreter allocates memory and decides what can be stored in the reserved memory. Therefore, by assigning different data types to variables, you can store integers, decimals or characters in these variables.

photo content

photo content