WARNING:
JavaScript is turned OFF. None of the links on this concept map will
work until it is reactivated.
If you need help turning JavaScript On, click here.
Este Cmap, tiene información relacionada con: Cmap-Python-JheluvaAparicio-StephanieYou, Python What is Python Language? Python is an interpreted, object-oriented, high-level programming language with dynamic semantics.Its high-level built in data structures, combined with dynamic typing and dynamic binding, make it very attractive for Rapid Application Development, as well as for use as a scripting or glue language to connect existing components together., Python What is Python Language?, Python Which are its logical operators? What is a logical operator? The logical operators in Python are used to combine the true or false values of variablrs (or expressions) so you can figure their resultant truth value. There are following logical operators supported by Python language. Assume variable a holds 10 and variable b holds 20 then: Operator and Logical AND: If both the operands are true then condition becomes true. Example: (a and b) is true. or Logical OR: If any of the two operands are non-zero then condition becomes true. Example: (a or b) is true. not Logical NOT: Used to reverse the logical state of its operand. Example: Not(a and b) is false., Python How to declare and use variables? What is a variable? A Python 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.Every value in Python has a datatype. Different data types in Python are Numbers, List, Tuple, Strings, Dictionary, etc. How to declare and use variables? Variables can be declared by any name or even alphabets like a, aa, abc, etc. Example: Declare variable "a" and print it. a=100 print a, Python How to work with constants? What is a constant? A constant is type of variable whose value cannot be changed. How to assing a constant? In Python, constants are usually declared and assigned on a module. Here, the module means a new file containing variables, functions etc which is imported to main file. Inside the module, constants are written in all capital letters and underscores separating the words. Example: PI = 3.14 GRAVITY = 9.8, Python Which are its arithmetic operators? Assume variable a holds 10 and variable b holds 20, then: Operator + Addition: Adds values on either side of the operator. Example: a + b = 30 - Subtraction :Subtracts right hand operand from left hand operand. Example: a – b = -10 * Multiplication: Multiplies values on either side of the operator . Example: a * b = 200 / Division: Divides left hand operand by right hand operand . Example: b / a = 2 % Modulus: Divides left hand operand by right hand operand and returns remainder. Example: b % a = 0 ** Exponent: Performs exponential (power) calculation on operators . Example: a**b =10 to the power 20 // Floor Division: The division of operands where the result is the quotient in which the digits after the decimal point are removed. But if one of the operands is negative, the result is floored, i.e., rounded away from zero (towards negative infinity). Example: 9//2 = 4 and 9.0//2.0 = 4.0, -11//3 = -4, -11.0//3 = -4.0, Python How to declare and use variables?, Python Conditional statement IF Conditional Statement in Python perform different computations or actions depending on whether a specific Boolean constraint evaluates to true or false. In Python, If Statement is used for decision making. It will run the body code only when IF statement is true. When you want to justify one condition wihile the other condition is not true, then you use "if stement". Example: if expression Statement else Statement, Python Which are its logical operators?, Python What is Python Language? The Python programming language is freely available and makes solving a computer problem almost as easy as writing out your thoughts about the solution. The code can be written once and run on almost any computer without needing to change the program., Python Conditional statement IF # #Example file for working with conditional statement # def main(): x,y =2,8 if(x < y): st= "x is less than y" print(st) if __name__ == "__main__": main(), Python What is Python Language?