Home > other >  Beginners, consult a handsome brother, pretty little sister a few questions.
Beginners, consult a handsome brother, pretty little sister a few questions.

Time:12-02

Reference
b=[[9028328432, "advanced mathematics", "2016-4-1", 45.0], [9432852385, "linear algebra", "2002-3-1", 66.8]] # list storage bibliographic information
C={b [0] [0] : 2, b [1] [0] : 4}
Def the main () :
Print ("===========================================")
Print ("=============books management system management system==================")
While True:
Print (" 1 shows the written information ")
Print (" 2 shows the book inventory information ")
Print (" 3 add bibliographic information ")
Print (" 4 change book inventory ")
Print (" 5 exit system ")
A=int (input (" please enter "))
If a==1:
Print ("=========")
Print (" title published the number of time the price ")
The message ()
Print ("=========")
Elif a==2: # a little problems
Print ("=========")
Print (" isbn book inventory ")
Repertory ()
Print ("=========")
Elif a==3:
Print ("=========")
The add ()
Print ("=========")
Elif a==4:
Print ("=========")
Modification ()
Print ("=========")
Elif a==5:
Print (" welcome next time use ")
Break
The else:
Print (" input error ")
Def message () :
For I in range (len) (b) :
For j in range (len [I] (b)) :
Print (b [j], [I] end="")
Print ()
Def repertory () :
Pass
Def add () :
B.a ppend ([])
B [1]. Append (int (input (" please enter the number ")))
B [1]. Append (input (" please enter the title "))
B [1]. Append (input (" please enter the publication date "))
B [1]. Append (input (" please input the price "))
Print (" books to add success ")

Def modification () :
D=int (input (" please enter the number "))
E=int (input (" please enter the book inventory "))
C [d]=e
Print (" inventory is changed ")

The main ()
Print ("===========================================")

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- I'm a manual code line -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
1: according to the book inventory information function, I made the keys of the dictionary book number, inventory value, how should I take out the book number, bname, inventory, and print it out,
2: the console print information asymmetry, is there a way to beautify, into a book
 

CodePudding user response:

CodePudding user response:

Try to print use \ t space


 

If a==1:
Print ("=========")
Print (" \ t the number of the title \ \ t t published time price ")
The message ()
Print ("=========")







 

Def message () :
For I in range (len) (b) :
For j in range (len [I] (b)) :
Print (b [j], [I] end="\ t")
Print ()

CodePudding user response:

refer to the second floor old coconut response:
try print use \ t space


 

If a==1:
Print ("=========")
Print (" \ t the number of the title \ \ t t published time price ")
The message ()
Print ("=========")







 

Def message () :
For I in range (len) (b) :
For j in range (len [I] (b)) :
Print (b [j], [I] end="\ t")
Print ()


Very????????????????????????????