Nitrous.IO enables you to develop web applications completely in the cloud. This development "box" helps you write software, collaborate real-time with friends, show off apps to teammates or clients, and deploy apps to production hosting sites like Heroku or Google App Engine.
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
# Alice: | |
# id: ALI | |
# name: Alice | |
# birth date: April 4, 1977 | |
# age: 37 | |
# job title: Data Analyst | |
# interests: Communications, Keeping Secrets | |
# trustworthy?: yes | |
# 1. convert the specification for `Alice` into code, like we did last class |
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
# Alice: | |
# id: ALI | |
# name: Alice | |
# birth date: April 4, 1977 | |
# age: 37 | |
# job title: Data Analyst | |
# interests: Communications, Keeping Secrets | |
# trustworthy?: yes | |
# 1. convert the specification for `Alice` into code, like we did last class |
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
# Angola: | |
# id: AGO | |
# name: Angola | |
# population: 21,471,618 | |
# capital: Luanda | |
# latitude: -8.81155 | |
# longitude: 13.242 | |
# income level: Upper Middle | |
# high income?: false |
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. assign the number 2015 to a variable named `this_year` | |
this_year = 2015 | |
# 2. assign the number 2020 to a variable named `event_year` | |
event_year = 2020 | |
# 3. calculate the difference in years and assign the value to `years_remaining` | |
years_remaining = event_year - this_year | |
# 4. use concatenation to create a message which reads: |
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. assign the number 2015 to a variable named `this_year` | |
this_year = 2015 | |
# 2. assign the number 2020 to a variable named `event_year` | |
event_year = 2020 | |
# 3. calculate the difference in years and assign the value to `years_remaining` | |
years_remaining = event_year - this_year | |
# 4. use concatenation to create a message which reads: |
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. assign the number 2015 to a variable named `this_year` | |
this_year = 2015 | |
# 2. assign the number 2020 to a variable named `event_year` | |
event_year = 2020 | |
# 3. calculate the difference in years and assign the value to `years_remaining` | |
years_remaining = event_year - this_year | |
# 4. use concatenation to create a message which reads: |
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. assign the number 2015 to a variable named `this_year` | |
# 2. assign the number 2020 to a variable named `event_year` | |
# 3. calculate the difference in years and assign the value to `years_remaining` | |
# 4. use concatenation to create a message which reads: | |
# There are _ years until the big event. | |
# 5. output the previous message, without a newline at the end |
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
a = [] | |
# look at "a" default value | |
puts a | |
# look at "a" converted to string | |
puts a.to_s | |
puts "#{a}" | |
# new list with things in it |
Nitrous.IO enables you to develop web applications completely in the cloud. This development "box" helps you write software, collaborate real-time with friends, show off apps to teammates or clients, and deploy apps to production hosting sites like Heroku or Google App Engine.