**
Python的基本代码
让用户输入两个数字,打印其中较大的数字
x =int(input(‘输入第一个数’))
y =int(input(‘输入的二个字’))
if x>y:
print(x)
else:
print(y)
**西瓜3.5元一斤,让用户输入购买的斤数,然后计算出需要付的金额,并打印**
price_str =‘3.5’
price_str =input(‘请输入西瓜价格:’)
weight_str=input(‘用户购买斤数:’)
price = float(price_str)
weight =float(weight_str)
money =price* weight
print(money)