1 - print "Welcome to the calculator"?
2 - Get first number from the user
3 - Get second number from the user
4 - Ask which operation the user wants to perform
5 - Show the results
<form action="//desafioagorario.us9.list-manage.com/subscribe/post?u=5f55ed935ec2264bdcd24a578&id=25a5430095" method="post" target="_blank"> | |
<label for="mce-EMAIL">Email: </label> | |
<input type="email" value="" name="EMAIL" class="required email" id="mce-EMAIL"> | |
<input type="hidden" name="b_5f55ed935ec2264bdcd24a578_25a5430095" tabindex="-1" value=""> | |
<input type="submit" value="Cadastrar" name="subscribe" id="mc-embedded-subscribe" class="button"> | |
</form> |
###########Bibliotecas######## | |
#se nao tiver instalada, e necessario usar o comando | |
#install.packages("nome_da_biblioteca") | |
library(tm) | |
library(wordcloud) | |
library(RColorBrewer) | |
###################################### | |
#seta o folder de trabalho. é preciso passar o caminho completo até a pasta onde estao os dados | |
setwd("/home/caminho/para/psta_local/dos_dados") |
# Our Chef class that receives a Restaurant as a parameter | |
class Chef | |
attr_reader :name | |
def initialize(name, restaurant) | |
@name = name | |
@restaurant = restaurant # Can be any Restaurant | |
end | |
end |
require "date" | |
# REGEX TIME! | |
# Write a #french_ssn_info method extracting infos | |
# from French SSN (Social Security Number) using | |
# regexp. | |
# "1 84 12 76 451 089 46" | |
# Gender (1 == man, 2 == woman) | |
# Year of birth (84) |
# 1) print "Welcome to the Horse Race of Le Wagon" | |
# 2) Create a List of horses? DONE | |
# 3) Show the list of horses | |
# 4) Ask the user: "On which horse do you want to bet on?" | |
# 5) Ask the user: "How much do you want to bet?" | |
# 6) Place the bet | |
# 7) Run the race METHOD | |
# 8) Display the result of the race: "Winner/Loser" | |
# 9) Display the result of the bet | |
# 10) Want to bet again? |
# 1) print "Welcome to the Instacart" | |
# 2) Define the items on the store (Hashes) | |
# 3) Initialize an empty cart | |
# 3) Print the items | |
# 4) Ask the user for one item until he types "quit" | |
# 5) If the item is not on store, do something | |
# 8) if user types "quit", then Display the order (BILL) | |
# 9) Checkout. | |
# Our items on store |
# this file serves as a router for any questions related to tasks | |
class Controller | |
# Called on `Controller.new` | |
def initialize(repository, view) | |
# STATE | |
# We receive an instance of Repository Class | |
@repository = repository | |
# Receive a instance of View, so we can display things |
# Requiring it because Rake tests controllers | |
# individually | |
require_relative 'view' | |
require_relative 'recipe' | |
class Controller | |
def initialize(cookbook) | |
@cookbook = cookbook | |
@view = View.new | |
end |
# Requiring it because Rake tests controllers | |
# individually | |
require_relative 'view' | |
require_relative 'recipe' | |
require_relative 'parser' | |
class Controller | |
def initialize(cookbook) | |
@cookbook = cookbook |