Follow Margikarp
Follow
Following Margikarp
Following
Add To Collection
Collection
Comments
Devlog
Blog TB1
←
Return to Blog TB1
Devlog
Week 9
December 15, 2022
by
Margikarp
///1.Making a class Classes always have a function named __init__(). It is executed when the class is being initiated. We use the __init__() function to assign values to object properties or other ope...
Continue reading
Week 8
December 15, 2022
by
Margikarp
///1.Cube Class Create a Python class called Cube that can be used as a template to be able to create, move, rotate, freeze, modify and select Cube objects in Maya import maya.cmds as cmds class Cube(...
Continue reading
Week 7
December 14, 2022
by
Margikarp
/// 1.Maya Cubes a) create a 20 units height rectangular box with 15 subdivisions along X, 10 along Y and 15 along Z, and b) move this cube to position [1, 1.70, 4]. import maya.cmds as cmds cmds.poly...
Continue reading
Week 4
December 14, 2022
by
Margikarp
///3. While loops, write a script that uses a while-loop so that it counts forward from 1 to 10 in threes, i.e. 1, 4, 7,10. i=1 while i <=10 : print(i) i += 3 ///4.Functions Create a function that con...
Continue reading
Week 3
December 13, 2022
by
Margikarp
/// 1. Python Conditionals - Making decisions x = 0 #declares a variable called x, which is initialised to 0 x = input("Enter a number ") #asks the user to enter a number if(x < 12): #if x is lower th...
Continue reading
Week 2
December 11, 2022
by
Margikarp
///2.Bugs print("Hi","there,","how are you?") print("Hi", "there," , "how are you?") and print("Hi","there,","how are you?") print("Hi","there, ","how are you?") Why do the first two lines produce the...
Continue reading
Week 5
November 14, 2022
by
Margikarp
///1. Returning multiple values Activity 1. (creating a function named myOrder, which takes three floats and returns them ordered from the smallest to the largest.) def myOrder(x,y,z): #Defines a func...
Continue reading
Week 6
November 07, 2022
by
Margikarp
Question 1 d) Question 2 d) Question 3 Answer is 81 def double(x): calc = x * x return calc x = 3 y = double((double(x))) # calc= 3*3 = 9 #9*9=81 print(x, y) Question 4 a) Both a and b have valid synt...
Continue reading
Week 1
October 10, 2022
by
Margikarp
Notes from Week 2 Converting Celcius to Fahrenheit Celsius = 20 Fahrenheit = (Celsius * 1.8) + 32 print("This is equal to " + str(Fahrenheit ))...
Continue reading