refactor: expected outputs for the if exercises

This commit is contained in:
Inanc Gumus
2018-10-20 21:17:19 +03:00
parent 63243dbe77
commit 7bd3143076
6 changed files with 32 additions and 0 deletions

View File

@ -16,10 +16,13 @@ package main
// EXPECTED OUTPUT
// go run main.go
// Give me args
//
// go run main.go hello
// There is one: "hello"
//
// go run main.go hi there
// There are two: "hi there"
//
// go run main.go i wanna be a gopher
// There are 5 arguments
// ---------------------------------------------------------

View File

@ -19,12 +19,16 @@ package main
// EXPECTED OUTPUT
// go run main.go 16
// 16 is an even number and it's divisible by 8
//
// go run main.go 4
// 4 is an even number
//
// go run main.go 3
// 3 is an odd number
//
// go run main.go
// Pick a number
//
// go run main.go ABC
// "ABC" is not a number
// ---------------------------------------------------------

View File

@ -35,12 +35,16 @@ package main
// EXPECTED OUTPUT
// go run main.go 18
// R-Rated
//
// go run main.go 17
// PG-13
//
// go run main.go 12
// PG-Rated
//
// go run main.go
// Requires age
//
// go run main.go -5
// Wrong age: "-5"
// ---------------------------------------------------------

View File

@ -27,14 +27,19 @@ package main
// EXPECTED OUTPUT
// go run main.go
// Give me a letter
//
// go run main.go hey
// Give me a letter
//
// go run main.go a
// "a" is a vowel.
//
// go run main.go y
// "y" is sometimes a vowel, sometimes not.
//
// go run main.go w
// "w" is sometimes a vowel, sometimes not.
//
// go run main.go x
// "x" is a consonant.
// ---------------------------------------------------------

View File

@ -14,14 +14,19 @@ package main
// EXPECTED OUTPUT
// go run main.go
// Give me a year number
//
// go run main.go eighties
// "eighties" is not a valid year.
//
// go run main.go 2018
// 2018 is not a leap year.
//
// go run main.go 2019
// 2019 is not a leap year.
//
// go run main.go 2020
// 2020 is a leap year.
//
// go run main.go 2024
// 2024 is a leap year.
// ---------------------------------------------------------

View File

@ -32,6 +32,7 @@ package main
// -----------------------------------------
// go run main.go
// Give me a month name
//
// go run main.go sheep
// "sheep" is not a month.
//
@ -46,22 +47,31 @@ package main
//
// go run main.go march
// "march" has 31 days.
//
// go run main.go april
// "april" has 30 days.
//
// go run main.go may
// "may" has 31 days.
//
// go run main.go june
// "june" has 30 days.
//
// go run main.go july
// "july" has 31 days.
//
// go run main.go august
// "august" has 31 days.
//
// go run main.go september
// "september" has 30 days.
//
// go run main.go october
// "october" has 31 days.
//
// go run main.go november
// "november" has 30 days.
//
// go run main.go december
// "december" has 31 days.
//
@ -70,6 +80,7 @@ package main
// -----------------------------------------
// go run main.go DECEMBER
// "DECEMBER" has 31 days.
//
// go run main.go dEcEmBeR
// "dEcEmBeR" has 31 days.
// ---------------------------------------------------------