def convertKg(g):
??? kg=g/1000;
??? f='{}kg'.format(kg);
??? print(f);
convertKg(1000);
def repName(name):
??? count=len(name);
??? n=name[0];
??? i=1;
??? while i<count:
??????? n=n+'*'
??????? i=i+1;
??? print(n);
repName('張三1')
def convertKg(g):
??? kg=g/1000;
??? f='{}kg'.format(kg);
??? print(f);
convertKg(1000);
def repName(name):
??? count=len(name);
??? n=name[0];
??? i=1;
??? while i<count:
??????? n=n+'*'
??????? i=i+1;
??? print(n);
repName('張三1')