Skip to content

Done #572

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

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

Done #572

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
Original file line number Diff line number Diff line change
Expand Up @@ -21,23 +21,20 @@
/*: question2
### 2. Can you see why the code below doesn't work? Fix the function call to get rid of the error.
*/
func greeting(name: String, greeting: String) {
func greeting(_ name: String, _ greeting: String) {
print("\(greeting), \(name)!")
}

greeting(name: "Danny", "Hello")



greeting("Danny", "Hello")

/*: question3
### 3. This function doesn't work, either. Can you fix the function (_not_ the call) so that it works?
*/
func daysInMonth(month: String, days: String) {
func daysInMonth(_ month: String, _ days: Int) {
print("There are \(days) in \(month)")
}

daysInMonth(month: "November", days: 30)
daysInMonth("November", 30)



Expand Down