添加 '排行榜2'

This commit is contained in:
206530238 2021-06-19 22:31:00 +08:00
parent 4ebe761dfd
commit 4b19f82f90
1 changed files with 25 additions and 0 deletions

25
排行榜2 Normal file
View File

@ -0,0 +1,25 @@
class Query_Db(object):
def _init_(self, dbname=DB_NAME):
self.conn-None
self.db_table='books'
self.db_name-dbname
self.get_conn ()
def get_conn (self):
try
self.conn = sqlite3.connect (self.db_name)
except Exception as e:
print 'Error:' ,e
def get_total_ num(self)
def query_pub_company(self)
nums=list(range(1,10))
for num in nums:
if num == 1:
print("1st")
elif num == 2:
print("2nd")
elif num == 3:
print("3rd")
else:
print(str(num)+"th")