refactor. Try refactoring your code by using functions, they will make it more readable. Your variable names are often meaningless (like qq, etc.) it's a bad practice. Command 'clear' does not exist on Win.
Tip: Defining cards could be much shorter than c2 = ( ) ...,
example:
cards = []
for card_number in range(2,11)+ ['jack','queen','king','ace]:
for card_color in ('spades', 'clubs', 'hearts', 'diamonds'):
And extracting names:
card_names = [card[0] for card in cards]
Obviously, comments are not suitable for posting code :(
2.
At 4:53 a.m. on 28 sep 2007,
dewi roberts
(the author)
said:
Response. Thanks Bosko for taking the time to look at my python code for pontoon, i have only recently started to learn python and have a long way to go, but i will try to adress each point you raised -but it will have to wait until November - my schedule for next 6 weeks is very busy.
Many Thanks
Dewi
Comments
refactor. Try refactoring your code by using functions, they will make it more readable. Your variable names are often meaningless (like qq, etc.) it's a bad practice. Command 'clear' does not exist on Win. Tip: Defining cards could be much shorter than c2 = ( ) ...,
example:
cards = [] for card_number in range(2,11)+ ['jack','queen','king','ace]:
for card_color in ('spades', 'clubs', 'hearts', 'diamonds'):
And extracting names: card_names = [card[0] for card in cards]
Obviously, comments are not suitable for posting code :(
Response. Thanks Bosko for taking the time to look at my python code for pontoon, i have only recently started to learn python and have a long way to go, but i will try to adress each point you raised -but it will have to wait until November - my schedule for next 6 weeks is very busy. Many Thanks Dewi
Sign in to comment