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
<link rel="stylesheet" type="text/css" href="BC_style.css"> | |
<script src=" signupform.js"></script> | |
<div class="hometext"> | |
<p>Baby Cycle is the new way to shop for your babyBaby Cycle is the new way to shop for your babyBaby Cycle is the new way to shop for your babyBaby Cycle</p> | |
</div> | |
<div class="lightbox"> |
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
<%= form_for(@user) do |f| %> | |
<% if @user.errors.any? %> | |
<div id="error_explanation"> | |
<h2><%= pluralize(@user.errors.count, "error") %> prohibited this user from being saved:</h2> | |
<ul> | |
<% @user.errors.full_messages.each do |message| %> | |
<li><%= message %></li> | |
<% end %> | |
</ul> |
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
puts "Please enter your word." | |
class Scrabble | |
attr_reader :word | |
def points | |
{ | |
"A"=>1, "B"=>3, "C"=>3, "D"=>2, | |
"E"=>1, "F"=>4, "G"=>2, "H"=>4, | |
"I"=>1, "J"=>8, "K"=>5, "L"=>1, | |
"M"=>3, "N"=>1, "O"=>1, "P"=>3, | |
"Q"=>10, "R"=>1, "S"=>1, "T"=>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
puts "please enter some text" | |
class Frequency_count | |
def count_words | |
@text = gets.chomp | |
@words = @text.split(' ') | |
@frequency = Hash.new(0) | |
@words.each { |word| @frequency[word.downcase] += 1 } | |
return @frequency |
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
# # create a function that takes the string and adds the phrase | |
# "only in America!" to the end of it. | |
puts "Exercise 1: Please enter you phrase" | |
phrase = gets.chomp | |
def add(phrase) | |
phrase + " only in America" | |
end | |
puts add(phrase) |
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
# # create a function that takes the string and adds the phrase | |
# "only in America!" to the end of it. | |
puts "Exercise 1: Please enter you phrase" | |
phrase = gets.chomp | |
def add(phrase) | |
phrase + " only in America" | |
end | |
puts add(phrase) |
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
# Create a program that takes a word and provides a Scrabble score associated with that word. | |
def score(word) | |
letter = word.split("") | |
puts ("your word will be played in the letters#{letter}") | |
chart = points({ | |
"A"=>1, "B"=>3, "C"=>3, "D"=>2, | |
"E"=>1, "F"=>4, "G"=>2, "H"=>4, |