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 // EXPECTED OUTPUT
// go run main.go // go run main.go
// Give me args // Give me args
//
// go run main.go hello // go run main.go hello
// There is one: "hello" // There is one: "hello"
//
// go run main.go hi there // go run main.go hi there
// There are two: "hi there" // There are two: "hi there"
//
// go run main.go i wanna be a gopher // go run main.go i wanna be a gopher
// There are 5 arguments // There are 5 arguments
// --------------------------------------------------------- // ---------------------------------------------------------

View File

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

View File

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

View File

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

View File

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

View File

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