Python练习I have three kinds of fruit:apple:$1.29/lbgrape:$2.2
Python练习 I have three kinds of fruit: apple:$1.29/lb grape:$2.29/lb orange:$1.5/lb x05x05x05x05x05x05 Which one do you want? grape Ok,grape.How many pounds do you want? 1.5 The cost is $3.44
print ''' I have three kinds of fruit: apple: $1.29/lb grape: $2.29/lb orange: $1.5/lb ''' name=raw_input('Which one do you want? rn') weigt=raw_input('Ok, %s. How many pounds do you want? rn'%name) if name=='apple': price=1.29*float(weigt) elif name=='grape': price=2.29*float(weigt) elif name=='orange': price=1.5*float(weigt)