- Upvotes Received
- 1
- Posts with Upvotes
- 1
- Upvoting Members
- 1
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
21 Posted Topics
Re: I'm also learning Python and I use PyScripter. It's worked well so far. | |
Whenever I try to run this nothing happens. Does anyone know what's wrong? package hobbits; public class Hobbits { String name; public static void main(String[] args) { Hobbits []h = new Hobbits[3]; int z = 0; int x = 0; while (z < 4){ h[z] = new Hobbits(); if (z … | |
I'm following a tutorial for making tiled maps in pygame and on the very first piece of code I'm getting an error. (http://qq.readthedocs.org/en/latest/tiles.html) On this line "for tile_x in range(0, image_width/width):" it's raising this error: "'float' object cannot be interpreted as an integer". The image dimensions I'm loading are 96x64. … | |
I'm trying to create a little text module for pygame. I've got everything up and running but I can't seem to get list.pop() to work. Whenever a person presses a key I put the chr() version of it into a list, then I iterate over that list to print out … | |
I'm not sure what is going on, for the last few days I've noticed this trailing color thing. If something on my PC has a box, the edges of that box will look shadowed to the right. It's hard to explain but I took a pic, becasue I can take … | |
I'm making a little program with tkinter and trying to get this timer to work. I'm getting a "'float' is not callable" error. Does anyone know what I'm doing wrong? The error happens when it tries to call 'self.clock_start()' def create_widgets(self): #create the main frame self.root = Tk() self.root.title("Learning Timer") … | |
I'm creating a little space shooter game. I need to limit the amount of times a player can fire, I'm setting a 2 second limit. But whenever I try to implement that it just won't work. The bullets keep firing multiple times a second. Here's my code, I'd be very … | |
I'm having a little problem. The challenge is this: "Modify the program so that different shapes are drawn at each angle rather than a small filled circle". So I'm trying to change the middle shape when the second hand hits 12, 3, 6, and 9. I've got some code, but … | |
Hi all, I'm trying to do this challenge from the book I'm following, but I'm so confused. I need to get a variable from one class, and use it as data in another class. As you see in my code, in the Shuttle class, I need to get the score … | |
I'm trying to open a txt file in python, but I'm having trouble. It seems to be working, but I cannot get the text anywhere. Here is the code, does anyone know how I can get the text from the hello.txt file? f = open("c:/users/verzo/desktop/hello.txt") print(f) | |
I have a function and want to use time.sleep(2) everytime an attack happens, but what ends up happening is the time.sleep(2) will work for the first player and enemy attack, then the program will print the rest of the attacks instantly. Does anyone know what I'm doing wrong? def attack(player, … | |
I'm trying to make a battle function but am having some trouble. Is there a way to do this? At the moment I'm getting an error "AttributeError: 'function'object has no attribute 'att'. My guess is that this would be easier with classes, but I've not learned classes yet. So is … | |
I'm learning about Classes and this thing is driving me crazy. Whenever I run this, it will use the __del__ object even though I never used del droid1, del droid2, or del droid3. Can someone please help? class Robots: '''Represents a robot, with a name.''' #A class variable, counting the … | |
Re: Meh, religion. Thankfully my country left that behind long ago. I've barely met any religious people at all, except on the internet. | |
Hi again, I'm here to ask another stupid question so I apologize. I'm going to make a calculator in Python but I've ran into a wall, with the tutorials I've been following I've only ever been taught how to add two numbers together. Never have I learned how to add … | |
# This program runs a test of knowledge #First get the questions #Later this will be modified to use file io def get_questions(): #Notice how the data is stored in a list of lists return [["What color is the daytime sky on a clear day? ", "blue"], ["What i the … | |
Hello all, I'm very new to programming and Python so please forgive my ignorance. i'm just wondering if it's possible to have two strings on one elif. Something like this. name = input("What is your full name: ") if name == "Jack Neilson": print("I like your name") elif name == … | |
Hello all, I'm trying to make a webpage that has about 200px padding on the left and right side and 0 padding at the top and bottom, i would like my content to be viewed in that small area. I'm wanting the background color where my content will be to … | |
I've been having this problem for about 1 week now. My computer monitor looks like it's in 8bit color when there is a gradient on the screen. Take Steam for example, the store page at the bottom is black then it gets greyer as it reaches the top. In my … | |
Hi guys, I've had this problem with my computer. Every time i play a game my whole system crashes and blue lines come down the screen, it happens about 10 - 20 minutes into the game. Thing is this happened about 6 months ago, one day when it crashed i … |
The End.