Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: Puzzle Tower of Hanoi
Post: Puzzle Tower of Hanoi

Hello Puzzle Tower of Hanoi """ Puzzle Tower of Hanoi """ class Disk: def __init__(self, number, color): self.number = number self.view = self.get_disk(number, color) def get...
anickone Game Development 1 2,146 Nov-18-2019, 08:24 PM
    Thread: Tic-Tac-Toe
Post: RE: Tic-Tac-Toe

Hello! I wrote this game too. My code: # python3 # Игра "Крестики - Нолики" from tkinter import * import random class Square(): """ задает квадраты(клетки) """ def __init__(self, master, ...
anickone Homework 7 5,267 Jul-17-2018, 05:39 PM
    Thread: Looping to Create Nested Dictionary
Post: RE: Looping to Create Nested Dictionary

(Jun-22-2018, 09:02 AM)volcano63 Wrote: While in-loop code makes the most sense of what I have seen above, separating file iteration and loop makes no sense.Sense, of course, is. Less nesting. It's ...
anickone Homework 10 33,547 Jun-22-2018, 04:11 PM
    Thread: Looping to Create Nested Dictionary
Post: RE: Looping to Create Nested Dictionary

This is done as follows. def reader(filename): with open(filename) as fin: txt = fin.read() lines=txt.strip().split('\n') outerdict={} for line in lines: lst=line.split...
anickone Homework 10 33,547 Jun-22-2018, 08:47 AM
    Thread: My version GhostGame
Post: RE: My version GhostGame

(Jun-20-2018, 08:44 PM)ichabod801 Wrote: All variables appear and then disappear.Of course, but I was talking about following several lines. My code :) import re, os def make_log(msg): print(m...
anickone Game Development 7 4,731 Jun-21-2018, 08:29 PM
    Thread: My version GhostGame
Post: RE: My version GhostGame

(Jun-18-2018, 10:20 PM)ichabod801 Wrote: I don't like the _ after key words so they can be variable names. I would use other names, like low and high instead of min_ and max_.I agree, me too. Thank ...
anickone Game Development 7 4,731 Jun-20-2018, 06:25 PM
    Thread: My version GhostGame
Post: RE: My version GhostGame

nilamo thank you
anickone Game Development 7 4,731 Jun-18-2018, 09:51 PM
    Thread: My version GhostGame
Post: My version GhostGame

from random import randint def get_msg(msg, subject, subject_mark): for i in range(1, doors+1): if i in subject: msg+=door % subject_mark else: msg+=door %...
anickone Game Development 7 4,731 Jun-18-2018, 08:52 PM
    Thread: list and for
Post: RE: list and for

Hello! s="awesome cat" l=s.split() out=[] for s in l: out.append('-'.join(list(s))) print(' '.join(out))
anickone General Coding Help 3 2,846 Jun-18-2018, 08:18 PM

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020