Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: Why is it not printing out
Post: Why is it not printing out

Im trying to make an own "collision" which you can first see in "world_Data" in the class world.coll. But the world data is not updating it and all the "1" is dirt and 0 nothing class World(): ...
dedesssse Game Development 0 1,473 Aug-12-2021, 04:51 PM
    Thread: Variables not returning
Post: Variables not returning

Why is y not returned? def numbers(): x = 2 y = x+2 return x return y print(numbers())
dedesssse General Coding Help 3 1,584 Jul-29-2021, 06:22 PM
    Thread: Storing whole functions in variables
Post: RE: Storing whole functions in variables

I understand now, thanks
dedesssse General Coding Help 3 2,101 Jul-29-2021, 06:06 PM
    Thread: Storing whole functions in variables
Post: Storing whole functions in variables

When i print y, why does it say none? instead of returning the value from the function called x = 1 def edr(x): x+2 print(x) #Here i try to understand variables to store an function in a vari...
dedesssse General Coding Help 3 2,101 Jul-29-2021, 05:42 PM
    Thread: An IF statement with a List variable
Post: An IF statement with a List variable

I'm trying to make it so if i enter a "Woman, girl or lady it will do the if statement isfemale = ["woman", "girl", "lady", ] isfemale = input("Enter your Gender: ") if isfemale == [0,1,2]: print...
dedesssse General Coding Help 3 8,300 Jul-08-2021, 02:54 PM
    Thread: Need help converting string to int
Post: RE: Need help converting string to int

Why cant i don like this? int(num1) int(num2) print(num1 * num2)
dedesssse General Coding Help 7 2,695 Jul-07-2021, 07:59 PM
    Thread: Need help converting string to int
Post: RE: Need help converting string to int

(Jul-07-2021, 03:57 PM)deanhystad Wrote: int(num * num * num) does the operation inside the the parenthesis before converting to int. You can do this: print((int(num)**3) # or num = int(num) print(...
dedesssse General Coding Help 7 2,695 Jul-07-2021, 04:08 PM
    Thread: Need help converting string to int
Post: Need help converting string to int

I'm trying to convert strings to numbers, to multiply both numbers, when i print it out.. It still warns me its 2 strings num = input("Enter a number to CUBE: ") def cube(): print(int(num * num ...
dedesssse General Coding Help 7 2,695 Jul-07-2021, 03:48 PM
    Thread: Importing a function from another file runs the old lines also
Post: RE: Importing a function from another file runs th...

#Testfile0 import math print("lowest number//") print(min(4, 40404)) print(sqrt(25)) """expose these functions""" def calcus(): # <- Want to see this function print("This is what i want o...
dedesssse General Coding Help 6 2,570 Jul-06-2021, 06:33 PM
    Thread: Importing a function from another file runs the old lines also
Post: RE: Importing a function from another file runs th...

This file is called "Testfile0 print("lowest number//") print(min(4, 40404)) print(sqrt(25)) def calcus(): print("Why are the files above read?")] This is another file from Testfile0 import cal...
dedesssse General Coding Help 6 2,570 Jul-06-2021, 06:11 PM
    Thread: Importing a function from another file runs the old lines also
Post: Importing a function from another file runs the ol...

I'm trying to import a function, an "def" function, to a new file, but when i do, the old line ABOVE are also read. Why!?
dedesssse General Coding Help 6 2,570 Jul-06-2021, 05:53 PM

User Panel Messages

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