Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: Addition of 2 classes
Post: Addition of 2 classes

hello i want too add class A with class B but this problem occurs (i want to experiment with the code so that's why i made 2 classes) Error:TypeError: unsupported operand type(s) for +: 'int' and 'Cha...
Naito General Coding Help 1 1,924 Feb-15-2019, 09:53 AM
    Thread: tic tac toe but worse
Post: tic tac toe but worse

hi!, i made this tic tac toe (not 100% completed yet), i have tried to make the AI more challenging but it's harder than i though, making the code runs a specefic if statement without running another ...
Naito Code sharing 1 2,209 Feb-07-2019, 07:29 PM
    Thread: breaking even if conditions is not met
Post: RE: breaking even if conditions is not met

(Feb-02-2019, 11:40 PM)perfringo Wrote: I just observe that in function win() there is no 'first' defined and it should give NameError. Same applies to x and o which are also not defined. Shouldn't ...
Naito General Coding Help 5 3,621 Feb-03-2019, 10:55 AM
    Thread: breaking even if conditions is not met
Post: breaking even if conditions is not met

hello, i am making a tic tac toe game for learning purposes def win(): global gameover gameover = False if first is True: win1 = board[0] == x and board[1] == x and board[2] == x ...
Naito General Coding Help 5 3,621 Feb-02-2019, 04:29 PM
    Thread: randint stops changing values in a loop
Post: RE: randint stops changing values in a loop

well, that dosen't work, yes i printed the lists too see, what i have copied here is not the ful code, the 6 is in dicesonship but that's not the problem the problem is that the value of ranint is a ...
Naito General Coding Help 4 3,277 Jan-29-2019, 07:10 PM
    Thread: randint stops changing values in a loop
Post: randint stops changing values in a loop

hi! i have a problem i can't understand, randint stops popping new randdom values even if the variables are in the loop: def pvp(): dicesonboard = [] dicesused = [] dicesonship = [] di...
Naito General Coding Help 4 3,277 Jan-28-2019, 08:11 PM
    Thread: Beginner python password program
Post: RE: Beginner python password program

Hello, line 25 is missing .read() if pass_input == file.read():also user .lower() to convert automatically user input from uppercase to lowercase: if menu.lower() == 'Y': elif menu.lower() == 'N':Hide...
Naito General Coding Help 4 5,006 Jan-23-2019, 08:14 AM
    Thread: please help me improve this minigame
Post: RE: please help me improve this minigame

(Jan-21-2019, 12:54 PM)j.crater Wrote: If you compare values in Python using "and" and "or" like this: if (player1 and player2) == 911: if (player1 or player2) > 10: a Boolean comparison (True/...
Naito Code sharing 7 3,739 Jan-21-2019, 03:31 PM
    Thread: please help me improve this minigame
Post: RE: please help me improve this minigame

(Jan-21-2019, 11:40 AM)j.crater Wrote: No problem about misplacing thread :) I might have misunderstood your intention and the code is indeed doing exactly what you wanted. You can try this: player...
Naito Code sharing 7 3,739 Jan-21-2019, 11:47 AM
    Thread: please help me improve this minigame
Post: RE: please help me improve this minigame

(Jan-21-2019, 11:11 AM)j.crater Wrote: Hello, thanks for sharing your code! I just moved the thread to "Completed Scripts/Snippets" subforum, since it is the appropriate place for this kind of threa...
Naito Code sharing 7 3,739 Jan-21-2019, 11:28 AM
    Thread: please help me improve this minigame
Post: please help me improve this minigame

Hi, i made this minigame for learning purposes it works fine, but it's too long and i guess there are much more improvements i can make , i am a total beginner THANK YOU! in this gamemode (duogame) ea...
Naito Code sharing 7 3,739 Jan-21-2019, 10:31 AM
    Thread: increment variable in while loop
Post: RE: increment variable in while loop

(Jan-20-2019, 12:25 PM)perfringo Wrote: With every loop in while you have: round = 1 round += 1So round can't be anything else than 2. You should move round = 1 out of while loop. THANK you sir!, i ...
Naito General Coding Help 3 2,928 Jan-20-2019, 12:30 PM
    Thread: increment variable in while loop
Post: increment variable in while loop

hello, i have a question please, why the while loop dosen't store the updated integer? Output:guess the number: 4 better luck next time the random number is : 8 round 2 ! guess the number: 5 better lu...
Naito General Coding Help 3 2,928 Jan-20-2019, 12:20 PM
    Thread: problem returning values
Post: RE: problem returning values

Thank you
Naito General Coding Help 7 3,760 Jan-19-2019, 08:21 PM
    Thread: problem returning values
Post: RE: problem returning values

(Jan-19-2019, 04:53 PM)woooee Wrote: Print the dictionary named scores wherever you want, but definitely after the if/else blocks.the out put is (i entered same values as before): Output:{'lang': 0,...
Naito General Coding Help 7 3,760 Jan-19-2019, 05:02 PM
    Thread: problem returning values
Post: RE: problem returning values

(Jan-19-2019, 02:39 PM)stullis Wrote: Several things to fix here. The variable "dict" should not be named "dict". Dict is an object name in Python and should be considered reserved, just like a key...
Naito General Coding Help 7 3,760 Jan-19-2019, 04:37 PM
    Thread: problem returning values
Post: problem returning values

Hi, i made iam a total beginner and i made this code for learning purposes, this code let you calculate your IQ out of 5 (n/5) by the average marks you get in 5 subjects (if mark is >=10, return +1...
Naito General Coding Help 7 3,760 Jan-19-2019, 12:58 PM
    Thread: beginner questions
Post: beginner questions

hello, i have to create a code that makes a user input a password that have at least 10 "symbols", have 1 uppercase , one lowercase , and one digit i statrted coding 1 week and i still haven't grasp t...
Naito Homework 5 3,381 Jan-18-2019, 10:46 AM
    Thread: assert
Post: assert

hello! i have a problem assertions can you help me please? in this code assert statement is always raised as true even if the condition is not me x = ["Nr", "Mi", "Ki"] y = ["Ha" ,"Se", "La"] print("i...
Naito General Coding Help 1 1,995 Jan-16-2019, 10:52 AM
    Thread: beginner question
Post: RE: beginner question

(Jan-15-2019, 07:41 AM)buran Wrote: In the first snippet you make res==0 before the loop and then only add i in every iteration of the loop. So at the end it's the sum of all values in range(x) In t...
Naito General Coding Help 2 2,326 Jan-15-2019, 07:59 AM

User Panel Messages

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