From 49cf68b7c50971632992f2e6430432b317e40efd Mon Sep 17 00:00:00 2001 From: JimCampagno Date: Tue, 5 Jul 2016 14:08:38 -0400 Subject: [PATCH 1/7] remove solution --- .../main.xcplaygroundpage/Contents.swift | 6 ++- .../solution.xcplaygroundpage/Contents.swift | 37 ------------------- MyPlayground.playground/contents.xcplayground | 7 +--- 3 files changed, 5 insertions(+), 45 deletions(-) delete mode 100644 MyPlayground.playground/Pages/solution.xcplaygroundpage/Contents.swift diff --git a/MyPlayground.playground/Pages/main.xcplaygroundpage/Contents.swift b/MyPlayground.playground/Pages/main.xcplaygroundpage/Contents.swift index 745bad6..ebe55fd 100644 --- a/MyPlayground.playground/Pages/main.xcplaygroundpage/Contents.swift +++ b/MyPlayground.playground/Pages/main.xcplaygroundpage/Contents.swift @@ -65,6 +65,8 @@ // write your code here +/*: + Checkout the solution branch - git co solution or git checkout solution and then scroll back down to this very spot to see a link that directs you to the solutions to the above questions. + + */ - -//: [Solution](solution) diff --git a/MyPlayground.playground/Pages/solution.xcplaygroundpage/Contents.swift b/MyPlayground.playground/Pages/solution.xcplaygroundpage/Contents.swift deleted file mode 100644 index c00ea48..0000000 --- a/MyPlayground.playground/Pages/solution.xcplaygroundpage/Contents.swift +++ /dev/null @@ -1,37 +0,0 @@ -//: [Go Back](@next) - -//: **Question 1** -var myBankBalance = 100 // using type inference -var myBankBalance2: Int = 100 // being explicit, using type annotation - - -//: **Question 2** -let puppyName = "Bella" // using type inference -let puppyName2: String = "Bella" // using type annotation - - -//: **Question 3** -print(puppyName) -//: This line should be printed to the console - check the debug area below - - -//: **Question 4** -print("I just got a new puppy named \(puppyName) and she is awesome!") -//: This line should be printed to the console - check the debug area below - - -//: **Question 5** -print("I have $\(myBankBalance) in my bank account.") -//: This line should be printed to the console - check the debug area below - - -//: **Question 6** -myBankBalance = 200 -print("I now have $\(myBankBalance).") -//: This line should be printed to the console - check the debug area below - - -//: **Question 7** -puppyName = "Marbles" // you should get an error here: "Cannot assign to value: 'puppyName' is a 'let' constant" - -//: You cannot assign `puppyName` to a new value because it is a _constant_, and the values of constants cannot change diff --git a/MyPlayground.playground/contents.xcplayground b/MyPlayground.playground/contents.xcplayground index 308eaf5..5ed2911 100644 --- a/MyPlayground.playground/contents.xcplayground +++ b/MyPlayground.playground/contents.xcplayground @@ -1,7 +1,2 @@ - - - - - - \ No newline at end of file + \ No newline at end of file From b7ff0c08b7862b322c4bb6e677d44c3698e116d9 Mon Sep 17 00:00:00 2001 From: JimCampagno Date: Thu, 28 Jul 2016 15:21:58 -0400 Subject: [PATCH 2/7] Update reading --- README.md | 48 ++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 40 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 67ef4fa..98c4b93 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Variables and Stuff ![Oscar Wilde](http://i.imgur.com/Brz1JgI.jpg?1) -> Be yourself; everyone else is already taken. ~[Oscar Wilde](https://en.wikipedia.org/wiki/Oscar_Wilde) +> Be yourself; everyone else is already taken. -[Oscar Wilde](https://en.wikipedia.org/wiki/Oscar_Wilde) ## Learning Objectives @@ -13,15 +13,47 @@ ## Instructions -* Open up the playground file included with this repo and answer the listed questions (which you will find in the playground file) in order. -* There are no tests associated with this playground file. -* The following two screenshots are included to assist you in case the file doesn't open right to the main.swift file (which it should by default). -* Make sure you're working in the main.swift file (which you can view by pressing command + 0): +This is your first lab. Some labs require that you open up Xcode, other labs ask that you open up the playground file. What does that mean? -![main](http://i.imgur.com/odAU8pd.png) -* Make sure render documentation is checked off which you can do in the Hide or show Utilities pane in the top right: +If you aren't familiar with Xcode, I suggest reading [this](https://github.com/learn-co-curriculum/reading-ios-intro-to-xcode). If you aren't familiar with how tests work and what your interaction will be with them, read [this](https://github.com/learn-co-curriculum/swift-xcode-warnings-errors) next. -![render](http://i.imgur.com/vCIhFbZ.png) +This lab is aking that you open up a playground file, so I will walk you through those steps. The playground file has _no_ tests in it. + +First things first, you should clone down this repository. If you aren't familiar with how to do that or the process of submitting labs, you should read [this](https://github.com/learn-co-curriculum/swift-functionFun-lab/tree/master). + +After cloning down this project, you should locate the directory in Terminal or locating it through finder. + +Example of locating the directory in Finder: + +![dir](http://i.imgur.com/HBkk1u1.png) + +Example of locating the directory in Terminal: + +![dir2](http://i.imgur.com/awwhcyV.png) + +Open up the `MyPlayground.playground` file. After doing so, you should see the following: + +![play](http://i.imgur.com/M3afcpk.png) + +If you see something like this instead, then you need to make sure Render Documentation is checked. + +![instead](http://i.imgur.com/XxQjPu7.png) + +You can check off the Render Documentation by opening up the Utilities pane (top right box thing) and then check it off like so: + +![checks](http://i.imgur.com/jTLIJye.png) + +Here's how you should be answering these various questions. I like to delete where it states + +```swift +// write your code here +``` + +Then replace that section with what you think the answer is.. like so: + +![answer](http://i.imgur.com/AELKrUs.png) + +After completing all of the questions, you will want to now go back to terminal to git add, commit and push up your changes. After doing so, you should submit in a pull request through Github. After doing so, you've now completed the lab! From d006029693b3558950c82e6d64cff4503e82f23c Mon Sep 17 00:00:00 2001 From: JimCampagno Date: Thu, 28 Jul 2016 15:26:48 -0400 Subject: [PATCH 3/7] Add to readme --- README.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 98c4b93..32c4811 100644 --- a/README.md +++ b/README.md @@ -53,7 +53,16 @@ Then replace that section with what you think the answer is.. like so: ![answer](http://i.imgur.com/AELKrUs.png) -After completing all of the questions, you will want to now go back to terminal to git add, commit and push up your changes. After doing so, you should submit in a pull request through Github. After doing so, you've now completed the lab! +What exactly is a Playground file? A *playground* is an interactive Swift coding environment that evaluates each statement and displays results as updates are made, without the need to create project. Here's an example: + +![play](http://i.imgur.com/WkyEc2G.png) + +Notice how in the right pane, the playground file is able to compile and run this code *while* I'm typing it in. That's awesome and makes it a really great tool to learn how to code. As you move forward in your "learning how to program" career, if you're ever challenged with a topic or want to brush up on some material, create your own *playground* by launching Xcode and just start writing some code! + + +### Now.. move forward and complete this lab! Good luck. + + From 48c91800188281b85cfc9dd4cd4b951b730b8e92 Mon Sep 17 00:00:00 2001 From: JimCampagno Date: Thu, 28 Jul 2016 15:29:38 -0400 Subject: [PATCH 4/7] Last update --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 32c4811..08dd5c7 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Variables and Stuff +# Variables ![Oscar Wilde](http://i.imgur.com/Brz1JgI.jpg?1) > Be yourself; everyone else is already taken. -[Oscar Wilde](https://en.wikipedia.org/wiki/Oscar_Wilde) @@ -62,6 +62,8 @@ Notice how in the right pane, the playground file is able to compile and run thi ### Now.. move forward and complete this lab! Good luck. +![luck](https://media.giphy.com/media/cMnt7i2RykmpW/giphy.gif) + From 3bcb62616db63e7f1ad1e042ba9a9f2e5f040d42 Mon Sep 17 00:00:00 2001 From: AnnJohn Date: Mon, 22 Aug 2016 11:40:57 -0400 Subject: [PATCH 5/7] Update README.md --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 08dd5c7..cba761f 100644 --- a/README.md +++ b/README.md @@ -15,9 +15,9 @@ This is your first lab. Some labs require that you open up Xcode, other labs ask that you open up the playground file. What does that mean? -If you aren't familiar with Xcode, I suggest reading [this](https://github.com/learn-co-curriculum/reading-ios-intro-to-xcode). If you aren't familiar with how tests work and what your interaction will be with them, read [this](https://github.com/learn-co-curriculum/swift-xcode-warnings-errors) next. +If you aren't familiar with Xcode, read [this](https://github.com/learn-co-curriculum/reading-ios-intro-to-xcode). If you aren't familiar with how tests work and what your interaction will be with them, read [this](https://github.com/learn-co-curriculum/swift-xcode-warnings-errors) next. -This lab is aking that you open up a playground file, so I will walk you through those steps. The playground file has _no_ tests in it. +This lab is aking that you open up a playground file, and we'll walk you through those steps. The playground file has _no_ tests in it. First things first, you should clone down this repository. If you aren't familiar with how to do that or the process of submitting labs, you should read [this](https://github.com/learn-co-curriculum/swift-functionFun-lab/tree/master). @@ -43,7 +43,7 @@ You can check off the Render Documentation by opening up the Utilities pane (top ![checks](http://i.imgur.com/jTLIJye.png) -Here's how you should be answering these various questions. I like to delete where it states +Here's how you should be answering these various questions. We like to delete where it states ```swift // write your code here From 8928c9c9e8501155eca5a16f294bd632a32e35c2 Mon Sep 17 00:00:00 2001 From: AnnJohn Date: Mon, 22 Aug 2016 11:41:27 -0400 Subject: [PATCH 6/7] typo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index cba761f..4a303b7 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ This is your first lab. Some labs require that you open up Xcode, other labs ask If you aren't familiar with Xcode, read [this](https://github.com/learn-co-curriculum/reading-ios-intro-to-xcode). If you aren't familiar with how tests work and what your interaction will be with them, read [this](https://github.com/learn-co-curriculum/swift-xcode-warnings-errors) next. -This lab is aking that you open up a playground file, and we'll walk you through those steps. The playground file has _no_ tests in it. +This lab is asking that you open up a playground file, and we'll walk you through those steps. The playground file has _no_ tests in it. First things first, you should clone down this repository. If you aren't familiar with how to do that or the process of submitting labs, you should read [this](https://github.com/learn-co-curriculum/swift-functionFun-lab/tree/master). From 85d32a501a5176ee7d1740fc67518a71b1851c1a Mon Sep 17 00:00:00 2001 From: AnnJohn Date: Fri, 26 Aug 2016 12:33:15 -0400 Subject: [PATCH 7/7] overview, minor style issues --- README.md | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 4a303b7..200053c 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,10 @@ ![Oscar Wilde](http://i.imgur.com/Brz1JgI.jpg?1) > Be yourself; everyone else is already taken. -[Oscar Wilde](https://en.wikipedia.org/wiki/Oscar_Wilde) +## Overview + +This Playgrounds lab, you'll create and print variables and constants that represent string and integer types. + ## Learning Objectives * Create variables and constants using `let` and `var`. @@ -15,11 +19,9 @@ This is your first lab. Some labs require that you open up Xcode, other labs ask that you open up the playground file. What does that mean? -If you aren't familiar with Xcode, read [this](https://github.com/learn-co-curriculum/reading-ios-intro-to-xcode). If you aren't familiar with how tests work and what your interaction will be with them, read [this](https://github.com/learn-co-curriculum/swift-xcode-warnings-errors) next. +We introduced you to Xcode earlier in this course and we'll cover it in more detail in subsequent lessons. For now, know that this lab is asking that you open up a playground file, and we'll walk you through those steps. The playground file has _no_ tests in it. -This lab is asking that you open up a playground file, and we'll walk you through those steps. The playground file has _no_ tests in it. - -First things first, you should clone down this repository. If you aren't familiar with how to do that or the process of submitting labs, you should read [this](https://github.com/learn-co-curriculum/swift-functionFun-lab/tree/master). +First things first, you should clone down this repository. If you aren't familiar with how to do that or the process of submitting labs, review the earlier lesson that covered this. After cloning down this project, you should locate the directory in Terminal or locating it through finder. @@ -60,7 +62,9 @@ What exactly is a Playground file? A *playground* is an interactive Swift coding Notice how in the right pane, the playground file is able to compile and run this code *while* I'm typing it in. That's awesome and makes it a really great tool to learn how to code. As you move forward in your "learning how to program" career, if you're ever challenged with a topic or want to brush up on some material, create your own *playground* by launching Xcode and just start writing some code! -### Now.. move forward and complete this lab! Good luck. +Now.. move forward and complete this lab! After you're done, make sure you save your changes and follow the correct steps to making a Pull Request. Review the earlier lesson that covered this process if you need a refresher. + +Good luck. ![luck](https://media.giphy.com/media/cMnt7i2RykmpW/giphy.gif)