This commit is contained in:
2025-05-26 06:49:34 +08:00
parent e030d195b8
commit 88c8f2ca32
11 changed files with 19 additions and 11 deletions

View File

@@ -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)))

View File

@@ -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))