Python Concepts: Difference between revisions

From Open Source Ecology
Jump to navigation Jump to search
No edit summary
 
(One intermediate revision by the same user not shown)
Line 4: Line 4:
=Concepts=
=Concepts=
*Command class - [https://refactoring.guru/design-patterns/command]
*Command class - [https://refactoring.guru/design-patterns/command]
*'''Modules - [https://docs.python.org/3/tutorial/modules.html]'''
*'''Modules - [https://docs.python.org/3/tutorial/modules.html]'''. Create a program.py, then import program, and then program.funtion(parameter). You will run the function in program, passing in parameter.
*Class - a bundle of data and functionality [https://docs.python.org/3/tutorial/classes.html]
*Class - a bundle of data and functionality [https://docs.python.org/3/tutorial/classes.html]
*Object - is an instance of a class
*Object - is an instance of a class
*Method - a function
*Method - a function
*Data - variables
*Data - variables

Latest revision as of 03:12, 22 May 2020

Intro

To run python, go into Terminal, and type python to run the python console. You get the >>> prompt.

Concepts

  • Command class - [1]
  • Modules - [2]. Create a program.py, then import program, and then program.funtion(parameter). You will run the function in program, passing in parameter.
  • Class - a bundle of data and functionality [3]
  • Object - is an instance of a class
  • Method - a function
  • Data - variables