Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Done #148

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Done #148

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file added compiled
Empty file.
Empty file added interpreted
Empty file.
55 changes: 55 additions & 0 deletions programming_languages.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,58 @@
def languages
languages = {
:oo => {
:ruby => {
:type => "interpreted"
},
:javascript => {
:type => "interpreted"
},
:python => {
:type => "interpreted"
},
:java => {
:type => "compiled"
}
},
:functional => {
:clojure => {
:type => "compiled"
},
:erlang => {
:type => "compiled"
},
:scala => {
:type => "compiled"
},
:javascript => {
:type => "interpreted"
}

}
}
languages
end

def reformat_languages(languages)
# your code here
new_hash = {}
languages.each do |style, data|
data.each do |lang, info|
if new_hash.has_key?(lang)
new_hash[lang][:style] << style
else
new_hash[lang] = info
new_hash[lang][:style] = [style]
end
end
end
new_hash
end








Empty file added {
Empty file.