Python, according to the two, calculating a few two kilograms

 
Key (return default return Ganso, you can list, dictionary)

hot key

  1. Tip parameter: ctrl + p
  2. Display Function Notes: ctrl + q
  3. ctrl + left mouse button to do the function's code
 

 

. 1  DEF get_weight_for_jin (liang_weight):
 2      '' ' 
. 3      The two calculated kilograms of a few hundredths of two
 . 4      : param ling_weight: to be calculated two
 . 5      : return: tuples (kg, two)
 . 6      ' '' 
. 7  
. 8      Jin = liang_weight / / 10
 . 9      Liang liang_weight% = 10
 10      return (Jin, Liang)     # only Python, tuples * 
. 11  
12 is Re = get_weight_for_jin (154 )
 13 is  Print (STR (Re [0]) + ' burden ' + STR (Re [ 1]) + ' two ' )

 

Guess you like

Origin www.cnblogs.com/xiaoliangliu86/p/11414091.html