diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..64c7d37 Binary files /dev/null and b/.DS_Store differ diff --git a/MyPlayground.playground/Pages/main.xcplaygroundpage/Contents.swift b/MyPlayground.playground/Pages/main.xcplaygroundpage/Contents.swift index ebe55fd..4d3ce8b 100644 --- a/MyPlayground.playground/Pages/main.xcplaygroundpage/Contents.swift +++ b/MyPlayground.playground/Pages/main.xcplaygroundpage/Contents.swift @@ -15,8 +15,7 @@ ### 1. Create a variable which represents your bank account balance. (For example: What is a good name for this variable that makes it easily readable for myself now and for the future me _or_ other developers I might be working with? Should I declare it using `let` or `var`? Should it be of type `Int` or `String`?) */ // write your code here - - +var bankAccountBalance: Int = 2000 /*: question2 @@ -24,6 +23,7 @@ */ // write your code here +var puppyName: String = "Bella" @@ -31,7 +31,7 @@ ### 3. Use the `print()` function to print the name of your new puppy to the console. */ // write your code here - +print(puppyName) @@ -40,14 +40,14 @@ */ // write your code here - +print("I just got a new pubby named \(puppyName) and she is awesome!") /*: question5 ### 5. Use the `print()` function to print the sentence "I have $ in my bank account." to the console. */ // write your code here - +print("I have \(bankAccountBalance) in my bank account") @@ -55,7 +55,7 @@ ### 6. Congratulations! You just got $100 for your birthday, so now you have $100 more in your bank account. Update your bank account with the new balance and print "I now have $." to the console. */ // write your code here - +print("I now have \(bankAccountBalance + 100)") @@ -64,7 +64,7 @@ */ // write your code here - + puppyName: String = "Cutie" //Can't redeclaration of a variable /*: 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. diff --git a/MyPlayground.playground/contents.xcplayground b/MyPlayground.playground/contents.xcplayground index 5ed2911..ddbb3ee 100644 --- a/MyPlayground.playground/contents.xcplayground +++ b/MyPlayground.playground/contents.xcplayground @@ -1,2 +1,2 @@ - \ No newline at end of file + \ No newline at end of file