Introduction to the python programming language
- Hannah Dove
- May 25, 2020
- 2 min read
This is an introduction on how to use the Python software development kit (SDK). Below is a list of some of the important keywords thats are important to understand, before learning python...
Varibles store data (For example; characters, numbers, words etc).
An array is blocks of memory.
Boolen opperators are simple words for example And, Or and Not. Boolen opperators are used to focus a search, so the computer know exactly what to look for. The answer is either true or false.
Comparators is a name for the operations you use, such as the greater than and equal to symbols.
Conditional statements (elif and else).
Algorithems is a list of actions you tell the computer, in order to solve a problem.
Parentheses is the name of the open and closed brackets you add towards the end of an expression. For example the datetime.now() expression.
Below is an example of an simple piece code that can be copied in the python code editor. This code is used to tell us the current date and time...
from datetime import datetime
now = datetime.now()
print '%s:%s:%s %s/%s/%s' % (now.hour, now.minute, now.second, now.month, now.day, now.year)
The print varible used in the example above tells the computer to display the current date and time on you monitor. The code also states the type of format it wants the date and time to be displayed as.
Python can be intstalled as a plugin for Maya, and is much easier coding language to learn compared to the MEL coding language. to learn than the
def theflyingcircus():
if 9 <= 9:
| return True
| print "It's true"
elif 6 == 8 or 99 < 88:
| return False
else: return False
The python code above is an example of a If statement.
An example of a python language that is used in games is PygLatin.
Comments