operators and data types

Cards (25)

  • A string is one or more characters
  • lesser than symbol ?

    <
  • Greater than symbol?
    >
  • greater than or equal to and lesser than or equal to rule to remember which symbol comes first?
    order in which it is spoken, equal last
  • Equivalent to symbol?
    ==
  • Lesser than or equal to symbol?
    <=
  • greater than or equal to symbol?
    >=
  • Not equivalent to in python?
    !=
  • How to group in python?

    ()
  • AND means both conditions are met
  • OR means atleast one of the conditions is met
  • The floor division operator (//) is used to divide two numbers and round the result down to the nearest whole number.
  • The exponentiation operator (**) is used to raise a number to a power.
  • The is operator is used to check if two variables refer to the same object.
  • The modulo operator (%) is used to find the remainder of a division operation.
  • The dict data types stores pairs of values together such as "brand": "Ford"
  • Iteration is repeating lines of code
  • THe difference between a while loop and a repeat until loop is that while loops condition is tested before the code is run and repeat untils code is tested after
  • Repeat untill is a post-test as the condition is tested after the code is run
  • While if is pre- test as the condition is tested before the code is run
  • 'is' checks the exact value and form of a value such that
    x=[1,2,3]
    z=x
    y=[1,2,3]
    x is y = True
    x is z = False
  • 'in' checks whether an item appears within a sequence or not
  • 'not in' checks whether an item doesnt appear within a sequence or not
  • To check what data type something is use?
    isinstance()
  • difference between isinstance() vs type() is that isinstance() returns a boolean value, while type() returns a string