No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
I am having problems accessing a variable from one class to another. [CODE] class Player(pygame.sprite.Sprite): def rotateShip(self, rotAmt): radians = self.rotation * math.pi / 180 [/CODE] I am trying to use the variable radians from class Player to another class. radians only exists in 'rotateShip'. Thanks for your help in … | |
When making a GUI, does it matter whether you use 'content' or 'this'? For Example: [CODE]content.add(b1);[/CODE] OR [CODE]this.add(b1);[/CODE] | |
I am trying to make a program that determines whether a statement is true or false I have this so far:[CODE]public static void main(String[] args) { int w=2,x=3,y=4,z=5; boolean expression; expression = (w<=x)&&(z>=y); if(expression == true); System.out.println("true"); if(expression == false); System.out.println("false"); }[/CODE] ...but all it prints out is true and … | |
i need a for loop to print out the numbers 1 2 4 8 16 32 64 128 256 512 any help? |