Beginning Programming In Python

Computers have the ability to remember and perform calculations as primitive as +, -, x, ÷ to more complex functions. Programming is a collection of functions, with each part doing one action and all collectively performing complex tasks and solving problems. It is recommended that you download Text-editor (IDE): Sublime, as a simple beginners application to learn coding in Python. Classic start (Type these in Sublime and press command B to run it!)

1. print(‘Hello World’)

2. Run it Variable

A variable is just like algebra (x = 2, y = 3), but in programming it could be more such as:

y = 5, name = ‘Ben’, month = “October” There are a few different kinds of variables:

1. Integer: 5, 8, 10

2. Float (Decimal): 12.0

3. Boolean: True, False. This is the basic of logic. If this then do that, or else do the other thing”. 4. String (word or sentence): “hello” or “hello world” or even “1” (since it is in quotation marks it becomes a string even if it is an integer 1)

“>>>” means a line of python code

>>>x == 1 #”True or False, x equals 1?” —> in this case True

>>>x != 1 #”True or False, x does not equal 1?” (read ! As ‘bang’ meaning ‘not’) —> in this case False

>>> x == y #”True or False, x equals y?”—> in this case False

Other examples: name = "Sara"

>>>print(name) # Output is "Sara" >>>type(name) # Output is “string”

Check these out:

Blockly: Python reference, Stack Overflow

© 2017 Proudly made by YAS ​

  • LinkedIn Social Icon
  • Facebook Social Icon
  • Twitter Social Icon
  • Instagram
  • YouTube
  • TikTok
  • Pinterest