fork download
  1. def getSum(price,num):
  2. c = price*num
  3. return c
  4. #橘子
  5. ab=getSum(10,3)
  6. #牛肉
  7. ac=getSum(30,20)
  8. print("橘子",ab)
  9. print("牛肉",ac)
Success #stdin #stdout 0.09s 14092KB
stdin
Standard input is empty
stdout
橘子 30
牛肉 600