update
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
bill_price = int(input('Please enter bill total price : '))
|
||||
number_of_diners = int(input('Please enter diners number : '))
|
||||
# round(数值, 小数点位数)
|
||||
print('the price for each person is {0}'.format(round(bill_price/number_of_diners,2)))
|
||||
|
@@ -1,4 +1,5 @@
|
||||
large = int(input('enter number over than 100 : '))
|
||||
small = int(input('enter number smaller than 10 : '))
|
||||
# // floor division 相当于c中的floor函数
|
||||
answer = large//small
|
||||
print('{0} goes into {1} for {2} times'.format(small, large, answer))
|
||||
|
Reference in New Issue
Block a user