Skip to content

Instantly share code, notes, and snippets.

View elinachar's full-sized avatar

Elina Charalampous elinachar

View GitHub Profile
@elinachar
elinachar / rock_paper_scissors.rb
Created May 9, 2018 16:16
rock_paper_scissors
def round
# Get user's user_selection
puts 'Please type your selection "rock" [r], "paper" [p] or "scissors" [s]. You can always quit the game by typing "quit" [q].'
user_input = gets.chomp.downcase
# Create a list with the selections of the game (except the quit option)
options = ["rock", "paper", "scissors", "r", "p", "s"]
# Check if the user has selected to quit or if he has typed an invalid selection
if ["quit", "q"].include? user_input
@elinachar
elinachar / cat.rb
Last active April 29, 2018 16:23
Ruby Project
class Cat
attr_reader :color, :breed
attr_accessor :name
def initialize(color, breed)
@color = color
@breed = breed
@hungry = true
end
@elinachar
elinachar / calculator.html
Last active April 25, 2018 16:49
First personal website, about.html file
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<title>Calculator</title>