This file contains hidden or 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
    
  
  
    
  | var userChoice = prompt("Do you choose rock, paper or scissors?"); | |
| var computerChoice = Math.random(); | |
| if (computerChoice < 0.34) { | |
| computerChoice = "rock"; | |
| } else if(computerChoice <= 0.67) { | |
| computerChoice = "paper"; | |
| } else { | |
| computerChoice = "scissors"; | |
| } console.log("Computer: " + computerChoice); | |
| var compare = function (choice1, choice2) { | 
  
    
      This file contains hidden or 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
    
  
  
    
  | // Check if the user is ready to play! | |
| confirm("Are you ready to play?"); | |
| var age = prompt("How old are you?"); | |
| if (age < 13) | |
| { | |
| console.log("You are not allowed to play!"); | |
| } | |
| else | 
  
    
      This file contains hidden or 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
    
  
  
    
  | from random import randint | |
| board = [] | |
| for x in range(5): | |
| board.append(["O"] * 5) | |
| def print_board(board): | |
| for row in board: | |
| print " ".join(row) | 
  
    
      This file contains hidden or 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.HashMap; | |
| public class Library { | |
| public Library(){ | |
| } | |
| public void getFinishedBooks(HashMap<String, Boolean> library){ | |
| if (library.size() < 1){ | |
| System.out.println("The size is empty"); | |
| } | 
  
    
      This file contains hidden or 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 GradeAnalyzer{ | |
| public GradeAnalyzer(){ | |
| } | |
| public int getAverage(ArrayList<Integer> grades){ | |
| if (grades.size() < 1){ | |
| System.out.println("Array List is empty"); | 
  
    
      This file contains hidden or 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
    
  
  
    
  | print ("what is your name?") | |
| user_input = gets.chomp | |
| user_input.downcase! | |
| if user_input.include? "s" | |
| user_input.gsub!(/s/,"th") | |
| puts ("Your name includes is #{user_input}") | |
| else | |
| print ("Your name does not include an s") | |
| end | 
  
    
      This file contains hidden or 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
    
  
  
    
  | print "What's your first name?" | |
| first_name = gets.chomp | |
| first_name.capitalize! | |
| print "What's your last name?" | |
| last_name = gets.chomp | |
| last_name.capitalize! | |
| print "What city are you from?" | |
| city = gets.chomp | 
  
    
      This file contains hidden or 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 Calculator { | |
| int t; | |
| int u; | |
| int total; | |
| int sub; | |
| int mult; | |
| int d; | |
| int mod; | |
  
    
      This file contains hidden or 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 Continents { | |
| public static void main(String[] args) { | |
| //returns Africa case | |
| int continent= '4'; | |
| switch (continent) { | |
| case '1': | |
| System.out.println("North America: Mexico City, Mexico"); | |
| break; | |
| case '2': | |
| System.out.println("South America:Sao Paulo, Brazil"); | 
  
    
      This file contains hidden or 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 CarLoan { | |
| public static void main(String[] args) { | |
| int carLoan= 10000; | |
| int loanLength =3; | |
| int interestRate=5; | |
| int downPayment=2000; | |
| if (loanLength <=0 || interestRate <= 0){ | |
| System.out.println("This is not a valid car loan. Check your interest rate and/or loan length."); |