Posts
 
Reputation
Joined
Last Seen
Ranked #4K
Strength to Increase Rep
+0
Strength to Decrease Rep
-0
28% Quality Score
Upvotes Received
1
Posts with Upvotes
1
Upvoting Members
1
Downvotes Received
3
Posts with Downvotes
2
Downvoting Members
3
1 Commented Post
0 Endorsements
~8K People Reached
Favorite Forums
Favorite Tags
Member Avatar for sentinel123

hey folks, i'm trying myself on a csv based adressbook but I get the following error: [CODE] Traceback (most recent call last): File "C:\Dokumente und Einstellungen\Mo\Desktop\adressbook.py", line 11, in <module> writer.writerows(data) File "C:\Python26\lib\csv.py", line 149, in writerows rows.append(self._dict_to_list(rowdict)) File "C:\Python26\lib\csv.py", line 140, in _dict_to_list ", ".join(wrong_fields)) ValueError: dict contains fields …

Member Avatar for J-M DESMETTRE
0
771
Member Avatar for sentinel123

hi guys is there a way to refer to every 2nd symbol of a string? example: [CODE] mystring = 'bananasplit' [/CODE] i want to refer to every 2nd and every 3rd symbol of any string the user types in. in this case the 1st symbol is 'b', the 2nd is …

Member Avatar for sentinel123
-2
4K
Member Avatar for sentinel123

Hi Peepz, My Connect 4 board is made up of different lists. My task is to write a function that checks whether the game ends in a draw (that means when every spot is taken by a 'X' or an 'O' without fulfilling the winning requirements If everyspot is filled …

Member Avatar for masterofpuppets
0
132
Member Avatar for gangster88

The function below is supposed to ask the user to enter a choice of rock paper or sciessors and output an error mesage if the user enters an invalid choice and then ouput a message if they won, drew or lost against the computer. [code] def rockPaperScissors(): import random choice=raw_input("please …

Member Avatar for sentinel123
0
230
Member Avatar for sentinel123

Hello. This time it might be a bit more complicated. [CODE] def start_game(): global no_winner no_winner = True rows_cols() global board board = make_board() print_board() player_select() def rows_cols(): global rows global columns rows = int(raw_input('Height: ')) columns = int(raw_input('Width: ')) if rows < 4: rows = 4 if columns < …

Member Avatar for sentinel123
0
308
Member Avatar for sentinel123

Hello. Here I go again. I tried to create a computer enemy for my connect 4 game: [CODE] def turn_comp(): import random print 'Computer ist am Zug!' playchip = random.randint(0, columns) board[0][playchip] = 'O' print_board() [/CODE] Even though I limited the range of randint with 0 and columns (in a …

Member Avatar for pythopian
0
147
Member Avatar for sentinel123

Hello. Here I am again with my Connect 4 project and another board problem. This is my code: [CODE] fielda = [] fieldb = [] rows = int(raw_input('Height: ')) columns = int(raw_input('Width: ')) if rows < 4: rows = 4 if columns < 4: columns = 4 def print_board(): for …

Member Avatar for sentinel123
0
123
Member Avatar for sentinel123

Hello This is like my 4th week using Python and I'm still not familiar with it so I might need some help from you guys. I gotta write a little Connect 4 game in Python, I just got started and boom - I'm stuck! I tried to create a board …

Member Avatar for sentinel123
0
2K