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
| 1. Grab the jar that says "JELLY" on it. | |
| 2. Twist off the top of the jelly jar and place the top on the table. | |
| 3. Place the jelly jar back on the table. | |
| 4. Grab the jar that says "PB" on it. | |
| 5. Twist off the top of the PB jar and place the top on the table. | |
| 6. Place the PB jar back on the table. | |
| 7. Grab the bag that says "BREAD". | |
| 8. Open the bread bag. | |
| 9. There are many slices in the bag, pull one slice out of the bag. | |
| 10. Place the bread bag back on the table. |
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
| David Rodriguez | |
| Github Username: rodriguezd | |
| Blog Url: rodriguezd.github.io | |
| Tagline: "Great coders do not choose their destiny, destiny chooses them." | |
| Profile Picture (something normal, a headshot, of a good reusable size that can be easily cropped) |
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
| country_capitals | |
| (6, 'Capital of the United States?", 2) | |
| (7, 'Capital of Japan?", 2) | |
| (8, 'Capital of Russia?", 2) | |
| (9, 'Capital of England?", 2) | |
| (10, 'Capital of Germany?", 2) |
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
| SELECT COUNT(*) | |
| FROM answer, choice, question | |
| WHERE( | |
| answer.user_id = 1 AND | |
| question.quiz_id = 1 AND | |
| question.question_id = answer.question_id AND | |
| choice.question_id = answer.question_id AND | |
| choice.choice_id = answer.choice_id AND | |
| choice.choice_correctness = 1 | |
| ); |
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
| 3) Which DVD is the most expensive? | |
| SELECT title FROM dvd WHERE price = (SELECT MAX(price) FROM dvd); | |
| 4) What is the total cost of any two DVD's (your choice which two) | |
| SELECT SUM(price) FROM dvd WHERE id IN (1, 2); | |
| 5) Return just the titles for all the DVD's in the database. |
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
| 1) Select the price of a flight | |
| SELECT price FROM flight WHERE id = 3; | |
| 2) Select the departing and arriving time of a flight | |
| SELECT departure_time, arrival_time FROM flight WHERE id = 3; | |
| 3) Select all flights that have only one stop. |
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
| 1) What are all the apartment listings? | |
| 2) What are the listings for an entire home? | |
| 3) What are the listings for apartments in Hoboken? | |
| 4) What are the listings for homes in New York City at most 3 people? | |
| 5) What are the listings belonging to user1? |
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
| 1) What are all the apartment listings? | |
| 1|apt|entire|2|New York City|1 | |
| 2|apt|shared|1|New York City|2 | |
| 3|apt|entire|1|Hoboken|2 | |
| 4|apt|private|2|Jersey City|3 | |
| 5|apt|entire|2|Hoboken|2 | |
| 6|apt|private|2|New York City|1 | |
| 2) What are the listings for an entire home? |
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
| CAVEAT: I spent ZERO time refactoring this code so I'm quite sure it is not the ideal solution. | |
| roman_num = "" | |
| while roman_num != 'END' | |
| print "Enter a roman numeral ('end' to quit): " | |
| roman_num = gets.chomp.upcase | |
| arabic_num = 0 | |
| last_char_value = 0 | |
| roman_char_array = []; |
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
| CAVEAT: Arabic number entered must be a whole number and 3999 or less. | |
| arabic_num = 0 | |
| while arabic_num != 'END' | |
| print "Enter an arabic whole number ('end' to quit): " | |
| input = gets.chomp.upcase | |
| unless input == 'END' | |
| arabic_num = input.to_i | |
| roman_numeral = [] |
OlderNewer