Skip to content
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

Rename concept exercises #1464

Merged
merged 26 commits into from
Jul 5, 2021
Merged
Changes from 7 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
ffdc218
Rename booleans -> annalyns_infiltration
angelikatyborska Jul 3, 2021
515496f
Add lasagna blurb
angelikatyborska Jul 3, 2021
371f185
Rename comments -> weather forecast
angelikatyborska Jul 3, 2021
a3d6c97
Rename conditionals -> blackjack
angelikatyborska Jul 3, 2021
6f2c583
Rename constants -> savings-account
angelikatyborska Jul 3, 2021
47c1639
Renamee errors -> deep-thought
angelikatyborska Jul 3, 2021
5c975d6
Fix depe-thought's blurb
angelikatyborska Jul 3, 2021
fb0deca
Rename maps -> gross-store
angelikatyborska Jul 3, 2021
4f92f20
Fix chessboard's prerequisites
angelikatyborska Jul 3, 2021
243b12f
Rename structs -> need-for-speed
angelikatyborska Jul 3, 2021
b53a11f
Rename methods -> elons-toys
angelikatyborska Jul 3, 2021
e31237a
Fix some package names to follow conventions
angelikatyborska Jul 5, 2021
0e55205
Fix remaining package names with underscores
angelikatyborska Jul 5, 2021
4058da6
Rename numbers -> car-factory
angelikatyborska Jul 5, 2021
d6094f4
Fix gross-store config
angelikatyborska Jul 5, 2021
4996ee0
Put active concept exercises in "beta"
angelikatyborska Jul 5, 2021
f3ac17c
Rename slices -> card-tricks
angelikatyborska Jul 5, 2021
b38f837
Rename strings -> party-robot
angelikatyborska Jul 5, 2021
1be2851
Rename strings-package -> logs-logs-logs
angelikatyborska Jul 5, 2021
1d73d01
Rename time -> booking-up-for-beauty
angelikatyborska Jul 5, 2021
3007fbc
Rename zero-values -> zero, zilch, nada
angelikatyborska Jul 5, 2021
110f1d4
Fix booking-up-for-beauty config
angelikatyborska Jul 5, 2021
9473dee
Fix booking_up_for_beauty forked from
angelikatyborska Jul 5, 2021
a3115ad
Rename car-factory -> cars-asemble
angelikatyborska Jul 5, 2021
242f2d7
Update exercises/concept/cars-assemble/.docs/introduction.md
angelikatyborska Jul 5, 2021
0ea1375
Update exercises/concept/cars-assemble/.meta/design.md
angelikatyborska Jul 5, 2021
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
96 changes: 96 additions & 0 deletions config.json
Original file line number Diff line number Diff line change
@@ -45,6 +45,72 @@
"prerequisites": [],
"status": "active"
},
{
"slug": "annalyns-infiltration",
ekingery marked this conversation as resolved.
Show resolved Hide resolved
"name": "Annalyn's Infiltration",
"uuid": "8833b0c0-1008-4426-8225-1dc2b4852d52",
"concepts": [
"booleans"
],
"prerequisites": [
"basics"
],
"status": "active"
ekingery marked this conversation as resolved.
Show resolved Hide resolved
},
{
"slug": "weather-forecast",
"name": "Weather Forecast",
"uuid": "63415c33-658e-4722-bd81-0b80060aecc9",
"concepts": [
"comments"
],
"prerequisites": [
"basics"
],
"status": "wip"
ekingery marked this conversation as resolved.
Show resolved Hide resolved
},
{
"slug": "savings-account",
"name": "Savings Account",
"uuid": "13f6b5ab-f4bb-453a-a6a9-50132a1d4885",
"concepts": [
"constants"
],
"prerequisites": [
"basics",
"comments",
"strings"
],
"status": "active"
},
{
"slug": "blackjack",
"name": "Blackjack",
"uuid": "628308fc-34e9-46ae-9661-9e0ebceeef34",
"concepts": [
"conditionals-if",
"conditionals-switch"
],
"prerequisites": [
"booleans",
"strings",
"numbers"
],
"status": "active"
},
{
"slug": "deep-thought",
"name": "Deep Thought",
"uuid": "097176e2-5024-44e7-ab86-9bc0ec245347",
"concepts": [
"errors"
],
"prerequisites": [
"constants",
"types"
],
"status": "wip"
ekingery marked this conversation as resolved.
Show resolved Hide resolved
},
{
"name": "Chessboard",
"slug": "chessboard",
@@ -1571,6 +1637,36 @@
"name": "Basics",
"slug": "basics",
"uuid": "5d2b4677-1850-4ee4-890d-dc55a1654626"
},
{
"name": "Booleans",
"slug": "booleans",
"uuid": "e3942921-34ec-41eb-a999-a5d85a6623fd"
},
{
"name": "Comments",
"slug": "comments",
"uuid": "9ee93eab-b413-442c-b7fb-76bf044eea2d"
},
{
"name": "Conditionals If",
"slug": "conditionals-if",
"uuid": "b3731323-f5bb-4b38-931c-2d734667bf8d"
},
{
"name": "Conditionals Switch",
"slug": "conditionals-switch",
"uuid": "6a4103e0-e7a9-427e-b1bd-716870580c45"
},
{
"name": "Constants",
"slug": "constants",
"uuid": "b56f68de-44ef-4bd4-8b14-2c50b2a366dd"
},
{
"name": "Errors",
"slug": "errors",
"uuid": "a960da78-c940-4725-8069-929f42564cdb"
}
],
"key_features": [
File renamed without changes.
20 changes: 20 additions & 0 deletions exercises/concept/annalyns-infiltration/.meta/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"blurb": "Learn about booleans by helping Annalyn free her best friend.",
"authors": [
"oanaOM"
],
"forked_from": [
"csharp/annalyns-infiltration"
],
"files": {
"solution": [
"annalyns_infiltration.go"
],
"test": [
"annalyns_infiltration_test.go"
],
"exemplar": [
".meta/exemplar.go"
]
}
}
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package booleans
package annalyns_infiltration
ekingery marked this conversation as resolved.
Show resolved Hide resolved

// CanFastAttack can be executed only when the knight is sleeping
func CanFastAttack(knightIsAwake bool) bool {
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package booleans
package annalyns_infiltration

// CanFastAttack can be executed only when the knight is sleeping
func CanFastAttack(knightIsAwake bool) bool {
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package booleans
package annalyns_infiltration

import "testing"

File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
# Introduction

## Conditionals If

## Conditionals Switch

## Booleans
Conditionals in Go are similar to conditionals in other languages. The underlying type of any conditional operation is the `bool` type, which can have the value of `true` or `false`. Conditionals are often used as flow control mechanisms to check for various conditions.

Go supports the three logical operators `&&` (AND), `||` (OR), and `!` (NOT).
## Conditionals If

Conditionals in Go are similar to conditionals in other languages. The underlying type of any conditional operation is the `bool` type, which can have the value of `true` or `false`. Conditionals are often used as flow control mechanisms to check for various conditions. For checking a particular case an `if` statement can be used, which executes its code if the underlying condition is `true` like this:
For checking a particular case an `if` statement can be used, which executes its code if the underlying condition is `true` like this:

```go
var value string
@@ -30,6 +26,8 @@ if value == "val" {
}
```

## Conditionals Switch

Go also provides a `switch` statement for more advanced scenarios.

```go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"blurb": "TODO: add blurb for conditionals exercise",
"blurb": "Learn about conditionals by playing Blackjack.",
"authors": [
"andres-zartab"
],
@@ -9,10 +9,10 @@
"forked_from": [],
"files": {
"solution": [
"conditionals.go"
"blackjack.go"
],
"test": [
"conditionals_test.go"
"blackjack_test.go"
],
"exemplar": [
".meta/exemplar.go"
Original file line number Diff line number Diff line change
@@ -19,13 +19,13 @@ The goal of this exercise is to teach the student the basics of the Concept of C

## Concepts

- `booleans`
- `conditionals-if`
- `conditionals-switch`

## Prerequisites

- `basic-strings`
- `booleans`
- `strings`
- `numbers`

## Analyzer
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package _meta
package blackjack

// ParseCard returns the integer value of a card following blackjack ruleset.
func ParseCard(card string) int {
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package conditionals
package blackjack

// ParseCard returns the integer value of a card following blackjack ruleset.
func ParseCard(card string) int {
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package conditionals
package blackjack

import "testing"

3 changes: 3 additions & 0 deletions exercises/concept/blackjack/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module blackjack

go 1.13
20 changes: 0 additions & 20 deletions exercises/concept/booleans/.meta/config.json

This file was deleted.

3 changes: 0 additions & 3 deletions exercises/concept/conditionals/go.mod

This file was deleted.

3 changes: 0 additions & 3 deletions exercises/concept/constants/go.mod

This file was deleted.

File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
# Errors

In this exercise, we will be implementing the programming logic in a package `deepthought`,
which checks whether an input equals to the absolute answer to life, the universe and everything.
In this exercise, we will be implementing the programming logic in a package `deep_thought`,
angelikatyborska marked this conversation as resolved.
Show resolved Hide resolved
which checks whether an input equals to [the absolute answer to life, the universe, and everything][deep-thought].

We have a constant `answer` which represents the answer to life, and a function `AnswerToLife` which checks the user input
and returns a boolean and an error type.

A requirement is also to have a general error `ErrCalculation` that we can at the same time use in our `AnswerToLife` function,
and export to be used in other programs of ours.

TODO: write instructions step by step

[deep-thought]: https://hitchhikers.fandom.com/wiki/Deep_Thought
ekingery marked this conversation as resolved.
Show resolved Hide resolved
17 changes: 17 additions & 0 deletions exercises/concept/deep-thought/.meta/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"blurb": "Learn about errors by finding the absolute answer to life, the universe, and everything.",
"authors": [
"micuffaro"
],
"files": {
"solution": [
"deep_thought.go"
],
"test": [
"deep_thought_test.go"
],
"exemplar": [
".meta/exemplar.go"
]
}
}
Original file line number Diff line number Diff line change
@@ -23,11 +23,12 @@ The goal of this exercise is to teach the student how to work with `errors` in G

The Concepts this exercise unlocks are:

- `errors.basics`
ekingery marked this conversation as resolved.
Show resolved Hide resolved
- `errors`

## Prerequisites

- `constants`, `types`
- `constants`
- `types`

## Representer

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package deepthought
package deep_thought
angelikatyborska marked this conversation as resolved.
Show resolved Hide resolved

import (
"errors"
1 change: 1 addition & 0 deletions exercises/concept/deep-thought/deep_thought.go
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// TODO: add solution stub
File renamed without changes.
17 changes: 0 additions & 17 deletions exercises/concept/errors/.meta/config.json

This file was deleted.

Empty file removed exercises/concept/errors/errors.go
Empty file.
2 changes: 1 addition & 1 deletion exercises/concept/lasagna/.meta/config.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"blurb": "TODO: add blurb for lasagna exercise",
"blurb": "Learn about packages, functions, and variables by helping Gopher cook lasagna.",
"authors": [
"tehsphinx"
],
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"blurb": "TODO: add blurb for constants exercise",
"blurb": "Learn about constants by managing a savings account.",
"authors": [
"jamessouth"
],
"files": {
"solution": [
"constants.go"
"savings_account.go"
],
"test": [
"constants_test.go"
"savings_account_test.go"
],
"exemplar": [
".meta/exemplar.go"
Original file line number Diff line number Diff line change
@@ -15,8 +15,7 @@ The goal of this exercise is to teach the student about constants in Go.

## Concepts

- `const`
- `iota`
- `constants`

## Prerequisites

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package _meta
package savings_account
angelikatyborska marked this conversation as resolved.
Show resolved Hide resolved

// FixedInterestRate has a value of 5%
const FixedInterestRate = 0.05
3 changes: 3 additions & 0 deletions exercises/concept/savings-account/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module savings_account

go 1.14
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package constants
package savings_account
angelikatyborska marked this conversation as resolved.
Show resolved Hide resolved

// FixedInterestRate has a value of 5% (5/100)

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package constants
package savings_account
angelikatyborska marked this conversation as resolved.
Show resolved Hide resolved

import (
"testing"
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"blurb": "TODO: add blurb for comments exercise",
"blurb": "Learn about comments by helping a weather station manage their weather forecasting program.",
"authors": [
"nikimanoledaki"
],
"files": {
"solution": [
"comments.go"
"weather.go"
],
"test": [
"comments_test.go"
"weather_test.go"
],
"exemplar": [
".meta/exemplar.go"
File renamed without changes.
File renamed without changes.
File renamed without changes.