This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def get_all_subclasses(cls): | |
all_subclasses = [] | |
for subclass in cls.__subclasses__(): | |
all_subclasses.append(subclass.__name__) | |
all_subclasses.extend(get_all_subclasses(subclass)) | |
return all_subclasses | |
class Character: | |
def __init__(self, strength): | |
self.health = 50 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import javax.swing.*; | |
public class Mainclass { | |
public static void main(String[] args){ | |
int periodCounter = 0; | |
double purchaseCost = 0; | |
double cash = 0; | |
String purchaseAmount = ""; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import javax.swing.*; | |
import javax.swing.text.StringContent; | |
public class mainClass { | |
public static void main(String[] args) { | |
double bill=0; | |
double tip=0; | |
int serviceLevel=0; | |
int periodCounter = 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Created by macbookair on 8/29/14. | |
*/ | |
import java.text.DecimalFormat; | |
import java.util.Scanner; | |
public class Mainclass { | |
public static void main(String[] args){ | |
double pennies = 0.01; | |
double nickels = 0.05; | |
double dimes = 0.10; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Scanner; | |
public class Game { | |
private int[][] board; | |
public Game() { | |
board = new int[10][10]; | |
} | |
public void startGame() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Mainclass { | |
public static void main(String[] args) { | |
int[]NUMBERS = new int [10]; | |
int upperBound = 10; | |
int lowerBound = 0; | |
for(int i=0; i<10; i++) { | |
NUMBERS[i]=0; | |
} | |
for (int i=0; i<10; i++){ | |
System.out.println(i); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Mainclass { | |
public static void main(String[] args) { | |
int[]NUMBERS = new int [10]; | |
int upperBound = 10; | |
int lowerBound = 0; | |
for(int i=0; i<10; i++) { | |
NUMBERS[i]=0; | |
} | |
for (int i=0; i<10; i++){ | |
System.out.println(i); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Scanner; | |
public class Mainclass { | |
public static void main(String[] args) { | |
int best = 420; | |
System.out.println("Enter your favorite number: "); | |
Scanner mscanner = new Scanner(System.in); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package thisisatest; | |
public class Mainclass { | |
public static void main (String [] args) | |
{ | |
int upperBound = 10000; | |
int lowerBound = 1; | |
boolean poop = false; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.ArrayList; | |
public class mainclass { | |
public static void main(String[] args) | |
{ | |
String Name1 = "Milo"; |
NewerOlder