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
for (var i = 0; i <= 100; i++) | |
{ | |
if (i % 3 == 0 && i % 5 == 0) { | |
console.log("FizzBuzz!"); | |
} | |
else if (i % 3 == 0) { | |
console.log("Fizz!"); | |
} | |
else if (i % 5 == 0) { | |
console.log("Buzz!"); |
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
# Python 2 Shell Executor | |
# September 18, 2013 | |
# Ryan Cohen | |
import socket, sys | |
from subprocess import call | |
def main(): | |
print "\nPython 2 Shell Executor" | |
ip = socket.gethostbyname(socket.gethostname()) |
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 Paint { | |
static Scanner sc = new Scanner(System.in); | |
public static void main(String[] args) { | |
// Declare variables to be used | |
final int ONE_GAL_PAINT = 350; | |
double width = 0.0, length = 0.0, height = 0.0, total = 0.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
import java.lang.*; | |
import java.util.Scanner; | |
public class Program | |
{ | |
static Scanner sc = new Scanner(System.in); | |
public static void main(String[] args) { | |
// Declare variables |
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 LabGrade | |
{ | |
public static void main (String[] args) | |
{ | |
// Declare constants | |
double inWeight = 0.6; // in-class weight is 60% | |
double outWeight = 0.4; // out-of-class weight is 40% | |
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.*; | |
public class LabGrade | |
{ | |
public static void main (String[] args) | |
{ | |
int base; // the new base | |
int base10Num; // the number in base 10 | |
int maxNumber; // the maximum number that will fit | |
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 Average { | |
public static void main(String[] args) { | |
// Declare variables | |
Scanner sc = new Scanner(System.in); | |
int grade1 = 0; | |
int grade2 = 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
import java.util.Scanner; | |
public class BirthdayGame { | |
public static void main(String[] args) { | |
// Declare variables | |
Scanner sc = new Scanner(System.in); | |
double birthday = 0.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
import java.util.Scanner; | |
public class PizzaCost { | |
public static void main(String[] args) { | |
// Declare variables | |
Scanner sc = new Scanner(System.in); | |
double size = 0.0; | |
double cost = 0.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
import java.util.Scanner; | |
public class Mileage { | |
public static void main(String[] args) { | |
// Declare variables | |
Scanner sc = new Scanner(System.in); | |
double miles; | |
double gallons; | |
double mileage; |
OlderNewer