Computing python

Cards (15)

  • Python
    • a high level programming language which is open source
  • IDLE stand for
    • Intergrated development learning environment
  • Syntax
    • rules that control the structure of the symbols of a programming language
  • Variable
    • has data type which defines the format of the variable
  • Constant
    • a named data store thans a value that doesnt change during the executions of a program
  • a=b=18
    • asiigning the same value to multiple variables
  • int=integer
    bool=boolean
    eval/float=real
  • Python is case sensitive
  • the file extension all files created in python are .py
  • a program whose source code is made available for use or modification by users or others is called open source
  • Arithmetic Operators:
    • Python uses arithmetic operators to perform calculations
    • Operator: +
    Action: Add
    • Operator: -
    Action: Subtract
    • Operator: *
    Action: Multiply
    • Operator: /
    Action: Divide
    • Operator: ^
    Action: Raise to the power of
  • radius=eval(input("enter the radius :"))area=3.14*radius*radiusprint("The area of the circle is ", area)
  • Rules that must be followed when naming variables
    1. a variable can consist of digits & letters
    2. a variable name cannot have a space in it
    3. a variable can start with a letter or and underscore but not with a digit
    4. keywords are not allowed when naming a variable eg def or while
    5. python is case sensitive
  • Types of data types in python
    1. string
    2. integer
    3. boolean
    4. floats
    1. The symbol used to comment in Python is this symbol: #