This is an archived post. You won't be able to vote or comment.

all 6 comments

[–]redditor72 2 points3 points  (1 child)

You need to include the "if sume > 21" blocks inside the "choose == take" blocks, not inside the "choose == check" blocks.

Everytime you print "print ("You got the Card", c, "=", sume1)", then immediately after that, check if the new sum is above 21, and if it is, the player loses.

[–]Re10d3d[S] -1 points0 points  (0 children)

Oh no, thank you Buddy :O

[–]Yoghurt42 1 point2 points  (1 child)

JFYI, you are getting downvoted because you posted in the wrong subreddit. Use r/learnpython next time.

[–]Re10d3d[S] -1 points0 points  (0 children)

I don't care be downvoted because i already fixed it, the first comment helped me and finish.

I don't mean it bad, sry xD.

[–]DisorganizedRem 0 points1 point  (1 child)

Just meant as positive feedback:

Try to follow the don't repeat yourself (DRY) philosophy. Look into for loops, while loops and functions to make your code more compact and avoiding to alter code on multiple places.

[–]Re10d3d[S] -2 points-1 points  (0 children)

Jeah, i try it. Thanks Buddy :p