User Profile

Collapse

Profile Sidebar

Collapse
Johan Novak
Johan Novak
Last Activity: Dec 6 '10, 07:54 AM
Joined: Dec 5 '10
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Johan Novak
    started a topic Compare elements in a matrix

    Compare elements in a matrix

    Hi!

    I'm learning python and I have a question about matix.

    Code:
    ef __init__(self,colors=[], forms=[], numbers=[], grades=[]):
            self.cardList = []
            self.playerCardList = []
            self.lista3 = []
            self.lista4 = []
            for color in colors:
                for form in forms:
                    for number in numbers:
                        for grade in
    ...
    See more | Go to post

  • Code:
    # -*- coding: utf-8 -*-
    import random
    
    
    class Kortlek():
        def __init__(self,colors=[], forms=[], numbers=[], grades=[]):
            self.cardList = []
            self.playerCardList = []
            for color in colors:
                for form in forms:
                    for number in numbers:
                        for grade in grades:
                            tmp= Kort(color, form, number,
    ...
    See more | Go to post

    Leave a comment:


  • What is the the best and easiest way to remove elements from a list?

    Hi!
    I'm working on a solitaire game, with a different card deck. First I create a big list with 81 elements (cards in this case), cardList. From this list, six cards are ramdomly picked and put into another list, playerCardList, and printed on the court.

    Once the cards are printed the player is asked to remove three cards. I would like these cards to be removed from cardList so they don't appear again. I would also like them...
    See more | Go to post
No activity results to display
Show More
Working...