No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
Hi, im trying to figure out how to call a function's variable from here [CODE]def legal_moves(board): moves = [] for square in range(DINNER): if board [square] == SPACE: moves.append(square) return moves[/CODE] I want to take the variable moves and use it for main How would I do that? |
|
Im trying to add six functions which are six effects to this tic tac toe game. For instance a remove all pieces function. Also, Im trying to restart the DIE roll after every turn made. If I can get the remove all pieces function(reall) to work I can get other … |
|
I can't get this while loop to keep looping and not do a fast loop. The full code is downloadable [CODE]while (num == 0) { cout << "Type in two values:\n"; cin >> num; num1 += num; cin >> num; num2 += num; cout << "Which measurment unit do you … |
|
My assignment is to use pointers to point at the highest and lowest temperatures in the array. I need to have 3 pointer variables and start them at the beginning of the array. Step the pCur through the array using a for loop and pCur++. Loop through the array looking … |