Testing variables
Over the first week I had learnt most of the basics of python which will list in this post, the basics I had learnt were:
#: used to comment in scripts without effecting the script itself
Integer: used to hold a simple number such as 3
Float: used to hold a more complex number such as 0.5
Boolean: used to tell if something is true or false, for example if x = 1 is true effect 1 happens however if x = 1 is false effect 2 happens instead
String: hold a word that is always in quotation marks
List
After learning most of the basics of python I made a short list of variable that I have given values to create a shopping list of sort, I had also made a line of code to change to items printed if a certain item costs a certain amount, this can be used practically in Maya for having multiple pre-sets of mesh's and save time due to not having to go through the specific options of the object.
#A list of all available weapons
hand_axe = 3
battleAxe = 8
Dagger = 2
print(hand_axe * 2 + battleAxe) If hand_axe == 2 else print(dagger * 2 + battleAxe)
#in work use can be if a cube has ______ length or width I can change it to a different size to lock in more then one custom pre-set of a mesh
Leave a comment
Log in with itch.io to leave a comment.