-
Notifications
You must be signed in to change notification settings - Fork 0
/
python4.txt
1 lines (1 loc) · 2.93 KB
/
python4.txt
1
The print function prints the specified message to the screen, or other standard outputs. The message can be a string, or any other object Python help function is used to get help related to the object passed during the call. It takes an optional parameter and returns help information.Comments are text in code that is not executed by the interpreter in Python, comments begin with hash comments may be used creatively to comment out pieces of code to stop the interpreter from running it Variable is a reserved memory location to store values. In other words, a variable in a python program gives data to the computer for processing.For Python Variable Naming Convention as per Industry Standard variables names start with a lowercase letter or underscore It can be followed by numbers or underscore Snake_case is the conventional way of writing variable names with multiple words variable names cannot begin with a number but numbers can be a part of the variable name later Python Data Types are used to define the type of a variable. It defines what type of data we are going to store in a variable. Python has several built-in data types, some of them are numeric data types text sequence data type sequence data types mapping data type boolean data type set data type. The type function is used to check the data type of something in Python. In Python, numeric data types represent the data which has numeric value. Numeric values can be integer, floating numbers or even complex numbers. In python Text Sequence Types the str object handles the text or string type data. Strings are immutable. The strings are sequences of Unicode characters. In Python, sequence types is the generic term for an ordered set. There are several types of sequences in Python. strings, lists, tuples. In Mapping Types the mapping objects are used to map hash table values to arbitrary objects. In python there is a mapping type called dictionary. Python boolean type is one of the built-in data types provided by Python, which represents one of the two values i.e. True or False. Set Types is an unordered collection of distinct objects. In Python, operators are special symbols that designate that some sort of computation should be performed. The values that an operator acts on are called operands.There are some types of operators as numeric operators comparison operators, logical operators, assignment operators, identity operators, membership operators, bitwise operators. Numeric Operators used with numeric data types to perform mathematical operations as addition, subtraction, multiplication, division, floor division, modulus i.e. remainder, raising to power, abs, round, bin, hex. Comparison Operators used to compare two values. These are as less than, greater than, less than or equal to, greater than or equal to, equality, inequality. Logic Operators used to combine conditional statements. The name of logical operators are and, or, not. Assignment Operators are used to assign values to variables.