4.1 - Python Statements
# Assignment

a = 10
b = "python"

# Print Statement
print("Print text to output")

# If/Else
if a < 10:
    print("less than")
elif a == 10:
    print("equal to")
else:
    print("greeater than")
    
#For Loop( iterate over a sequence)

for x in range(0, 10):
    if x % 2:
        continue  #continue execution of the loop
    else:
        print(x)
  
# While Loop
while True:
    if exitloop():
        break  # Exit the loop
        
# Function


def add(input_a, input_b):
    return input_a + input_b # Return statement
        
        
# Import Module

import os
import maya.cmds as cmds
        

阅读更多
版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/seamanj/article/details/49901009
个人分类: maya python
想对作者说点什么? 我来说一句

没有更多推荐了,返回首页

不良信息举报

4.1 - Python Statements

最多只允许输入30个字

加入CSDN,享受更精准的内容推荐,与500万程序员共同成长!
关闭
关闭