diff --git a/docs/bios-configuration.md b/docs/bios-configuration.md new file mode 100644 index 000000000..21fdfab47 --- /dev/null +++ b/docs/bios-configuration.md @@ -0,0 +1,29 @@ +# BIOS Configuration + +## Steps + +F10 (Open Setup) + +- _Security_ + - _Create BIOS Administrator Password_ → Set password +- _Advanced_ + - _Boot Options_ + - _USB Storage Boot_ → Disabled + - _Fast Boot_ → Disabled (disturbs network boot) + - _Audio Alerts During Boot_ → Disabled (very noisy) + - _HP Sure Recover_ + - _HP Sure Recover_ → Disabled (tries to restore Windows) + - _Secure Boot Configuration_ + - _Configure Legacy Support and Secure Boot_ → «Legacy Support Disable and Secure Boot Disable» (**TODO**: use Secure Boot) + +F10 → Yes (Save changes & Reboot) + +> Enter the code that the BIOS asks to disable the secure boot + +## Automation + +- Can be automated using Intel vPro/AMT (**TODO**) +- Can be partially automated with a USB programmable keyboard such as : + - [USB Rubber Ducky](https://shop.hak5.org/products/usb-rubber-ducky-deluxe) + - [XK-24 USB Programmable Keypad for Windows or Mac](https://www.amazon.com/gp/product/B003MB780E) + - [Cactus WHID: WiFi HID Injector USB Rubberducky](https://www.tindie.com/products/aprbrother/cactus-whid-wifi-hid-injector-usb-rubberducky/) diff --git a/docs/event-management.md b/docs/event-management.md new file mode 100644 index 000000000..d15e97519 --- /dev/null +++ b/docs/event-management.md @@ -0,0 +1,190 @@ +# Events management + +## Usage + +An event is associated to an object when the usage of this object implies: + +- a limited capacity of people +- a limited time + +Event management require: + +- Edition of the attributes of the object on which the event is based +- Creation and settings of the event associated to the reference object + +> Events are used for: `piscines`, `check-in`, `exams`, `rushes`, `hackatons`, `conferences`. + +## Settings for the reference object + +Important indications: + +- Objects that doesn't have required attributes for event creation will not be open to event creation. + +| name | fullfillment | +| -------------------- | ------------ | +| capacity | **required** | +| eventDuration | **required** | +| registrationDuration | **required** | +| description | optionnal | +| eventStartDelay | optionnal | + +- All the attributes filled in the object are used as values by default for event's creation; it can be overloaded for each event related to the reference object. +- If the reference object has a child or children which are events itself, settings are also required for each event child. + +#### Edit the object attributes: + +> in _Object attributes_ + +Capture d’écran 2019-08-22 à 11 40 34 + +- Add a new key **capacity** of type `Number` with the maximum number of persons you want for events related to the object by default +- Add a new key **eventDuration** of type `Number` with the duration in minutes you want for events related to the object by default +- Add a new key **registrationDuration** of type `Number` with the duration in minutes you want to allow to people to register to the event by default +- Add a new key **eventStartDelay** of type `Number`, if you want a default delay between the end of registration and the beginning of the event. This duration is expressed in minutes. +- Add a new key **description** of type `String`, if you need to associate some informations to your event (description, location, access, documents to provide, etc.) + +#### Edit the children + +> in _Children_ + +Capture d’écran 2019-08-22 à 15 43 43 + +- Add a new key **startAfter** of type `Number`, with the default delay you want between the beginning of the event and the beginning of the child event. This duration is expressed in minutes. + +##### Example + +Here is an example of the `Piscine Go` settings. It presents the settings of the object attributes `Piscine Go`, the settings of one of its child which is an event and the settings of the child object attributes itself. + +> NB : this object settings are provided in the admin, in the curses section: 'Piscine Go' and in the exams section 'Exam 01'. + +**Piscine Go** + +_Object attributes_ + +```json +{ + "capacity": 400, + "eventDuration": 37440, + "registrationDuration": 43200, + "eventStartDelay": 240 +} +``` + +This piscine object attributes look like this: + +![piscine-object-attributes](img/piscine-object-attributes.png) + +_Children_ + +> In the `Piscine Go`, children of type _exam_ and _rush_ have events itself. + +> A **startAfter** key has to be defined for each of them, in their parent object `Piscine Go`. For example, the exam-01 gets this key: + +```json +{ + "startAfter": 8160 +} +``` + +This child attributes look like this: + +![piscine children attributes](img/63525543-c86b0800-c4f5-11e9-8820-60d9ff33994f.png) + +**Exam 01** + +> The object `Exam 01`, which is a child of `Piscine Go`, has its own _Object Attributes_ filled in the child object. + +_Object attributes_ + +```json +{ + "eventDuration": 240, + "registrationDuration": 2160, + "eventStartDelay": 60 +} +``` + +> NB: the **capacity** attribute is herited from the parent object `Piscine Go` here. + +This exam object attributes look like this: + +![exam-object-attributes](img/exam-object-attributes.png) + +## Create the event + +### Create a new event for your object + +> (in _Admin_ > _Manage events_ > _Add new event_) + +Capture d’écran 2019-08-22 à 11 37 13 +Capture d’écran 2019-08-22 à 11 37 35 +Capture d’écran 2019-08-22 à 11 38 07 + +- The **reference object** of your event is the object for which you need to create an event: `Check`, `Piscine Go`, etc. +- The **registration starts at** indicates when registration of the event begins. +- The **registration ends at** indicates when registration of the event ends. +- The **event starts at** indicates when the event begins. + +> NB: +> +> - End of registration can't be before its beginning. +> - Start of event can't be before end of registration. +> - Date and Time input is not yet working in firefox but should be added soon by mozilla. In the mean while use chrome for adding events + +### Settings for you event + +> In the event you have created, 3 categories must be checked: +> +> 1. General settings +> 2. Registration's settings +> 3. Event's settings + +#### General settings + +Capture d’écran 2019-08-22 à 11 39 26 + +General settings of your event can be set after creation of the event. By default, it is the values indicated in the **reference object**. + +- **Capacity** + - During the regitration, the capacity doesn't apply. When registration ends, we register the amount defined by the **capacity** to the event _(ordered by registration date)_. + - If someone unregister to the event during a registration, it release one place. + - During a registration, users can see if their place is guaranteed or if they are in waiting list. + - If the event has children which are event themselves, they will use by default the capacity of the parent event + if no capacity was defined on this child. +- **Description** (facultative) + - It can be used to describe the topic of the event, or to add some practical informations: location, documents to provide, accessibility, etc. + +#### Registration + +Capture d’écran 2019-08-22 à 11 39 37 + +- End of registration can't be after start of registration. +- Dates can't be updated after it's passed. +- The **registration duration** indicated in the **reference object** is reminded under the inputs to help you fill the informations. +- Same for the **event start delay**. +- The list of users in the registration, pending or accepeted, is accessible by clicking on the link 'N users registered', at the left bottom of this categrory. + +#### Event + +Capture d’écran 2019-08-22 à 11 39 49 + +- End of event can't be after start of event. +- Dates can't be updated after it's passed. +- The **end of event** is calculated by default by adding the **event duration** indicated in the **reference object** to the **start of event** date. + - If the event contains other events, the **end of event** can't be before the end of the last child event. +- The **event duration** indicated in the **reference object** is reminded under the inputs to help you fill the informations. + - If the event contains other events, the **minimum end of event** is indicated under the inputs to help you fill the informations. +- The list of users selected for the event at its creation is accessible by clicking on the link 'N users registered', at the left bottom of this categrory. + +#### Children (facultative) + +Capture d’écran 2019-08-22 à 18 24 49 + +This category appears only if the event has children which are events itself. + +- Children settings can't be overloaded. +- Each event child presents: + - Its **Start** and **end** (according to the children settings of the **reference object**) + - Its **capacity** + - Its **groups size** + - Reminder: in `hackatons` or `rushes`, candidates or students registered to the are divided in groups of N persons. diff --git a/docs/img/4.png b/docs/img/4.png deleted file mode 100644 index 459f2cb23..000000000 Binary files a/docs/img/4.png and /dev/null differ diff --git a/docs/img/56507169-6505a500-6518-11e9-89bb-04c7fd9b41ca.png b/docs/img/56507169-6505a500-6518-11e9-89bb-04c7fd9b41ca.png new file mode 100644 index 000000000..73fa42e87 Binary files /dev/null and b/docs/img/56507169-6505a500-6518-11e9-89bb-04c7fd9b41ca.png differ diff --git a/docs/img/56507180-6afb8600-6518-11e9-97a5-4dcff8f0a069.png b/docs/img/56507180-6afb8600-6518-11e9-97a5-4dcff8f0a069.png new file mode 100644 index 000000000..eb6e1f42d Binary files /dev/null and b/docs/img/56507180-6afb8600-6518-11e9-97a5-4dcff8f0a069.png differ diff --git a/docs/img/56507445-3936ef00-6519-11e9-90c8-d85056e9330b.png b/docs/img/56507445-3936ef00-6519-11e9-90c8-d85056e9330b.png new file mode 100644 index 000000000..eda82e86b Binary files /dev/null and b/docs/img/56507445-3936ef00-6519-11e9-90c8-d85056e9330b.png differ diff --git a/docs/img/56517407-cb98bc00-6534-11e9-98d6-a2b1c0193a38.png b/docs/img/56517407-cb98bc00-6534-11e9-98d6-a2b1c0193a38.png new file mode 100644 index 000000000..6be361943 Binary files /dev/null and b/docs/img/56517407-cb98bc00-6534-11e9-98d6-a2b1c0193a38.png differ diff --git a/docs/img/56517421-d0f60680-6534-11e9-86ef-97fb9e59786e.png b/docs/img/56517421-d0f60680-6534-11e9-86ef-97fb9e59786e.png new file mode 100644 index 000000000..05ba53061 Binary files /dev/null and b/docs/img/56517421-d0f60680-6534-11e9-86ef-97fb9e59786e.png differ diff --git a/docs/img/56518936-a1e19400-6538-11e9-81c7-520ffd365cff.png b/docs/img/56518936-a1e19400-6538-11e9-81c7-520ffd365cff.png new file mode 100644 index 000000000..7e4fce070 Binary files /dev/null and b/docs/img/56518936-a1e19400-6538-11e9-81c7-520ffd365cff.png differ diff --git a/docs/img/6.png b/docs/img/6.png deleted file mode 100644 index e1f5c94a3..000000000 Binary files a/docs/img/6.png and /dev/null differ diff --git a/docs/img/63525316-64e0da80-c4f5-11e9-9e61-57d5a73da9b1.png b/docs/img/63525316-64e0da80-c4f5-11e9-9e61-57d5a73da9b1.png new file mode 100644 index 000000000..654f8ea55 Binary files /dev/null and b/docs/img/63525316-64e0da80-c4f5-11e9-9e61-57d5a73da9b1.png differ diff --git a/docs/img/63525543-c86b0800-c4f5-11e9-8820-60d9ff33994f.png b/docs/img/63525543-c86b0800-c4f5-11e9-8820-60d9ff33994f.png new file mode 100644 index 000000000..186018d9a Binary files /dev/null and b/docs/img/63525543-c86b0800-c4f5-11e9-8820-60d9ff33994f.png differ diff --git a/docs/img/63532891-9d87b080-c503-11e9-8ff2-46c7a5b19c12.png b/docs/img/63532891-9d87b080-c503-11e9-8ff2-46c7a5b19c12.png new file mode 100644 index 000000000..68e76757c Binary files /dev/null and b/docs/img/63532891-9d87b080-c503-11e9-8ff2-46c7a5b19c12.png differ diff --git a/docs/img/63533088-02430b00-c504-11e9-9675-bcab7bec825c.png b/docs/img/63533088-02430b00-c504-11e9-9675-bcab7bec825c.png new file mode 100644 index 000000000..09e1a5dab Binary files /dev/null and b/docs/img/63533088-02430b00-c504-11e9-9675-bcab7bec825c.png differ diff --git a/docs/img/63533145-21419d00-c504-11e9-8e80-fb4f53d93b00.png b/docs/img/63533145-21419d00-c504-11e9-8e80-fb4f53d93b00.png new file mode 100644 index 000000000..db5a2275d Binary files /dev/null and b/docs/img/63533145-21419d00-c504-11e9-8e80-fb4f53d93b00.png differ diff --git a/docs/img/63533589-015ea900-c505-11e9-8b77-b45b620cd171.png b/docs/img/63533589-015ea900-c505-11e9-8b77-b45b620cd171.png new file mode 100644 index 000000000..9d8651a79 Binary files /dev/null and b/docs/img/63533589-015ea900-c505-11e9-8b77-b45b620cd171.png differ diff --git a/docs/img/63533613-0facc500-c505-11e9-90e8-94254cef5ce3.png b/docs/img/63533613-0facc500-c505-11e9-90e8-94254cef5ce3.png new file mode 100644 index 000000000..cfc6daf10 Binary files /dev/null and b/docs/img/63533613-0facc500-c505-11e9-90e8-94254cef5ce3.png differ diff --git a/docs/img/63533641-1d624a80-c505-11e9-9cd1-e1d156dd7fc4.png b/docs/img/63533641-1d624a80-c505-11e9-9cd1-e1d156dd7fc4.png new file mode 100644 index 000000000..68139292d Binary files /dev/null and b/docs/img/63533641-1d624a80-c505-11e9-9cd1-e1d156dd7fc4.png differ diff --git a/docs/img/7.png b/docs/img/7.png deleted file mode 100644 index 92f0c1c02..000000000 Binary files a/docs/img/7.png and /dev/null differ diff --git a/docs/img/8.png b/docs/img/8.png deleted file mode 100644 index 0e688d67e..000000000 Binary files a/docs/img/8.png and /dev/null differ diff --git a/docs/img/9.png b/docs/img/9.png deleted file mode 100644 index 350a53603..000000000 Binary files a/docs/img/9.png and /dev/null differ diff --git a/docs/img/add-child-to-parent-object.png b/docs/img/add-child-to-parent-object.png new file mode 100644 index 000000000..86a1c806f Binary files /dev/null and b/docs/img/add-child-to-parent-object.png differ diff --git a/docs/img/all-object-page.png b/docs/img/all-object-page.png new file mode 100644 index 000000000..24e5fad7a Binary files /dev/null and b/docs/img/all-object-page.png differ diff --git a/docs/img/child-capture.png b/docs/img/child-capture.png new file mode 100644 index 000000000..3336ec72e Binary files /dev/null and b/docs/img/child-capture.png differ diff --git a/docs/img/children.png b/docs/img/children.png new file mode 100644 index 000000000..caf88e40f Binary files /dev/null and b/docs/img/children.png differ diff --git a/docs/img/document-to-sign-step-example.png b/docs/img/document-to-sign-step-example.png new file mode 100644 index 000000000..d32531003 Binary files /dev/null and b/docs/img/document-to-sign-step-example.png differ diff --git a/docs/img/exam-object-attributes.png b/docs/img/exam-object-attributes.png new file mode 100644 index 000000000..5fd99463b Binary files /dev/null and b/docs/img/exam-object-attributes.png differ diff --git a/docs/img/form-step-example.png b/docs/img/form-step-example.png new file mode 100644 index 000000000..3a596eed8 Binary files /dev/null and b/docs/img/form-step-example.png differ diff --git a/docs/img/go-to-objects.png b/docs/img/go-to-objects.png new file mode 100644 index 000000000..671da94c8 Binary files /dev/null and b/docs/img/go-to-objects.png differ diff --git a/docs/img/object-attributes.png b/docs/img/object-attributes.png new file mode 100644 index 000000000..c490ca38a Binary files /dev/null and b/docs/img/object-attributes.png differ diff --git a/docs/img/object-edit-overview.png b/docs/img/object-edit-overview.png new file mode 100644 index 000000000..fee93fcf7 Binary files /dev/null and b/docs/img/object-edit-overview.png differ diff --git a/docs/img/piscine-object-attributes.png b/docs/img/piscine-object-attributes.png new file mode 100644 index 000000000..dba2c5586 Binary files /dev/null and b/docs/img/piscine-object-attributes.png differ diff --git a/docs/img/1.png b/docs/img/ubuntu-installation/1.png similarity index 100% rename from docs/img/1.png rename to docs/img/ubuntu-installation/1.png diff --git a/docs/img/2.png b/docs/img/ubuntu-installation/2.png similarity index 100% rename from docs/img/2.png rename to docs/img/ubuntu-installation/2.png diff --git a/docs/img/3.png b/docs/img/ubuntu-installation/3.png similarity index 100% rename from docs/img/3.png rename to docs/img/ubuntu-installation/3.png diff --git a/docs/img/ubuntu-installation/4.png b/docs/img/ubuntu-installation/4.png new file mode 100644 index 000000000..cbeb11ab9 Binary files /dev/null and b/docs/img/ubuntu-installation/4.png differ diff --git a/docs/img/5.png b/docs/img/ubuntu-installation/5.png similarity index 100% rename from docs/img/5.png rename to docs/img/ubuntu-installation/5.png diff --git a/docs/img/ubuntu-installation/6.png b/docs/img/ubuntu-installation/6.png new file mode 100644 index 000000000..bb8ff4923 Binary files /dev/null and b/docs/img/ubuntu-installation/6.png differ diff --git a/docs/img/usb-configuration/1.png b/docs/img/usb-configuration/1.png new file mode 100644 index 000000000..58edb3d28 Binary files /dev/null and b/docs/img/usb-configuration/1.png differ diff --git a/docs/img/usb-configuration/2.png b/docs/img/usb-configuration/2.png new file mode 100644 index 000000000..498377252 Binary files /dev/null and b/docs/img/usb-configuration/2.png differ diff --git a/docs/img/usb-configuration/3.png b/docs/img/usb-configuration/3.png new file mode 100644 index 000000000..cbdc16b6c Binary files /dev/null and b/docs/img/usb-configuration/3.png differ diff --git a/docs/img/usb-configuration/4.png b/docs/img/usb-configuration/4.png new file mode 100644 index 000000000..2fcf14081 Binary files /dev/null and b/docs/img/usb-configuration/4.png differ diff --git a/docs/img/usb-configuration/5.png b/docs/img/usb-configuration/5.png new file mode 100644 index 000000000..17851f5c8 Binary files /dev/null and b/docs/img/usb-configuration/5.png differ diff --git a/docs/img/usb-configuration/6.png b/docs/img/usb-configuration/6.png new file mode 100644 index 000000000..027abca2f Binary files /dev/null and b/docs/img/usb-configuration/6.png differ diff --git a/docs/img/usb-configuration/7.png b/docs/img/usb-configuration/7.png new file mode 100644 index 000000000..3088645bf Binary files /dev/null and b/docs/img/usb-configuration/7.png differ diff --git a/docs/img/usb-configuration/8.png b/docs/img/usb-configuration/8.png new file mode 100644 index 000000000..64d79653f Binary files /dev/null and b/docs/img/usb-configuration/8.png differ diff --git a/docs/img/usb-configuration/9.png b/docs/img/usb-configuration/9.png new file mode 100644 index 000000000..f720ebf8f Binary files /dev/null and b/docs/img/usb-configuration/9.png differ diff --git a/docs/modular-steps-management.md b/docs/modular-steps-management.md index 38d3e1fe2..9c1f07b80 100644 --- a/docs/modular-steps-management.md +++ b/docs/modular-steps-management.md @@ -1,77 +1,84 @@ # Sign up & onboarding's Administration section - Modular steps management ## Usage -> After their first authentication in the app, every candidate has to do his **sign up** and his **onboarding**. The steps that compose the **sign up** and the **administration** section of the onboarding are either: -> * Forms (identification, medical information, etc.) -> * Documents to sign (general conditions, charts, regulations, etc.) -> -> All the sections are modular: you can add, update, delete and order them as you wish. -> -> This documentation explains how to manage these steps. + +After their first authentication in the app, every candidate has to do his **sign up** and his **onboarding**. The steps that compose the **sign up** and the **administration** section of the onboarding are either: + +- Forms (identification, medical information, etc.) +- Documents to sign (general conditions, charts, regulations, etc.) + +All the sections are modular: you can add, update, delete and order them as you wish. + +This documentation explains how to manage these steps. ## Create your step child object + ### Create a new object for your step in the admin -> Information is available for object's creation: [Object creation](https://github.com/01-edu/public/blob/master/doc/object-creation.md) -* This object must have the same type as its future parent object (*signup* or *onboarding*). +> Information is available for object's creation: [Object creation](object-creation.md) + +- This object must have the same type as its future parent object (_signup_ or _onboarding_). -> Your step is then available in the *Admin*. You can find it in the section of its type (*SignUp* or *Onboarding*) or thanks to the search bar of the cursus object's page. - +> Your step is then available in the _Admin_. You can find it in the section of its type (_SignUp_ or _Onboarding_) or thanks to the search bar of the cursus object's page. ### Add this new object as a child of your parent's object -* Edit the parent object: *Sign up* or *Administration* +- Edit the parent object: _Sign up_ or _Administration_ -> Information is available for object's creation: [Child object creation](https://github.com/01-edu/public/blob/master/doc/child-object-creation.md) +> Information is available for object's creation: [Child object creation](object-child-creation.md) ## Settings for a `form` step -> In the step object you have created, 2 attributes must be filled: -> 1. Subtype -> 2. Form + +In the step object you have created, 2 attributes must be filled: + +1. Subtype +2. Form ### Description #### Edit the step object you have created : -> in *Object attributes* -Capture d’écran 2019-04-22 à 15 59 33 +> in _Object attributes_ +Capture d’écran 2019-04-22 à 15 59 33 -* Add a new key **subtype** of type `String` with the exact value 'form-step' -* Add a new key **form** of type `Object` - * Form can have several sections. Each section is displayed with a title, and its inputs. - > NB: The submission of the form will check the required inputs of all the sections created for the form. - * To create a section, add a new key to the form object, of type `Object`, that contains: - * A **title** key of type `String`. The value of this property will be the title displayed in the top of the form section. +- Add a new key **subtype** of type `String` with the exact value 'form-step' +- Add a new key **form** of type `Object` + - Form can have several sections. Each section is displayed with a title, and its inputs. + > NB: The submission of the form will check the required inputs of all the sections created for the form. + - To create a section, add a new key to the form object, of type `Object`, that contains: + - A **title** key of type `String`. The value of this property will be the title displayed in the top of the form section. > If there is only one section in the form step, and no section title is needed, this property can be ignored. - * An **inputs** key of type `Object`, which will contain all the inputs of the section. For each wanted input, add a new `Object` element in the "inputs" object. - > The key of this object will be used as the "name" attribute of your input. + - An **inputs** key of type `Object`, which will contain all the inputs of the section. For each wanted input, add a new `Object` element in the "inputs" object. + > The key of this object will be used as the "name" attribute of your input. > The values will be considered as the properties of your input. #### Defining an input: -* A **type** key of type `String` must be declared. It defines the type of the input : `tel`, `text`, `date`, `select`, `radio`, `switch`, `checkbox`, `textarea`, `countries`. -* All other attributes needed for the input can be added to the object, according to the input type: `placeholder`, `id`, `required`, `label`, `items`, `emptyItems`, `index`, etc... - -#### Important indication: -* The **index** property is used to order the inputs. It will not be passed onto the input. Be mindful not to set the same index twice. -* The **type** property is required. It will be used to determine the kind of input should be generated. It is passed onto the input only if the input type attribute is required (type 'tel' or 'text' for example, but not for type 'select' - in this case, we will generate a select element) - - * A special type 'countries' has been added to the classicals. It generate a `Select` (containing all the countries) with a search bar. 'Items' property is handled by the app. - * It's recommended to add 'min' and 'max' properties to input type 'date' (no default value are set). -* `onChange` prop are ignored as the event is handled by the app. -* For `switch` and `checkbox` input types, the default value has to be set as a boolean property named **value**. -* More information for each inputs is available in the design documentation: - * [textInput documentation](https://alem.01-edu.org/design/Components/FormInputs/TextInput) - used for inputs type 'text', 'tel', and 'date' - * [textArea documentation](https://alem.01-edu.org/design/Components/FormInputs/TextArea) - * [select documentation](https://alem.01-edu.org/design/Components/FormControls/Select) - * [radio button documentation](https://alem.01-edu.org/design/Components/FormControls/Radio) - * [switch documentation](https://alem.01-edu.org/design/Components/FormControls/Switch) - * [checkbox documentation](https://alem.01-edu.org/design/Components/FormControls/Checkbox) +- A **type** key of type `String` must be declared. It defines the type of the input : `tel`, `text`, `date`, `select`, `radio`, `switch`, `checkbox`, `textarea`, `countries`. +- All other attributes needed for the input can be added to the object, according to the input type: `placeholder`, `id`, `required`, `label`, `items`, `emptyItems`, `index`, etc... + +#### Important indication: + +- The **index** property is used to order the inputs. It will not be passed onto the input. Be mindful not to set the same index twice. +- The **type** property is required. It will be used to determine the kind of input should be generated. It is passed onto the input only if the input type attribute is required (type 'tel' or 'text' for example, but not for type 'select' - in this case, we will generate a select element) + + - A special type 'countries' has been added to the classicals. It generate a `Select` (containing all the countries) with a search bar. 'Items' property is handled by the app. + - It's recommended to add 'min' and 'max' properties to input type 'date' (no default value are set). + +- `onChange` prop are ignored as the event is handled by the app. +- For `switch` and `checkbox` input types, the default value has to be set as a boolean property named **value**. +- More information for each inputs is available in the design documentation: + - [textInput documentation](https://01.alem.school/design/Components/FormInputs/TextInput) - used for inputs type 'text', 'tel', and 'date' + - [textArea documentation](https://01.alem.school/design/Components/FormInputs/TextArea) + - [select documentation](https://01.alem.school/design/Components/FormControls/Select) + - [radio button documentation](https://01.alem.school/design/Components/FormControls/Radio) + - [switch documentation](https://01.alem.school/design/Components/FormControls/Switch) + - [checkbox documentation](https://01.alem.school/design/Components/FormControls/Checkbox) ### Examples -Here is an example of the form step's attributes. It presents a form with two sections, and an example of each kind of input type. +Here is an example of the form step's attributes. It presents a form with two sections, and an example of each kind of input type. > NB : this example object is provided in the admin, in the onboarding section: 'Form step example'. @@ -173,14 +180,14 @@ Here is an example of the form step's attributes. It presents a form with two se This 'form' step would look like this: - -![form step example](https://user-images.githubusercontent.com/35296671/56816457-7cf06800-683b-11e9-9003-6f83b4545033.png) +![form-step-example](img/form-step-example.png) ## Settings for a `document to sign` step + The newly created child can be customized with these attributes : | name | fullfillment | -| ---------- | --------- | +| ---------- | ------------ | | subtype | **required** | | text | **required** | | buttonText | optionnal | @@ -191,17 +198,21 @@ The newly created child can be customized with these attributes : #### To set up the child object you have created with these elements: 1. Edit you step object -2. Go to *Object attributes* +2. Go to _Object attributes_ 3. Add the following attributes: - * Add a new key **subtype** of type `String` with the exact value 'sign-step' - * Add a new key **text** of type `String` with the text of your document to sign as value - * Add a new key **buttonText** of type `String` with the text that you want to display in the submit button of your step. Default value for this attribute is 'Sign'. - * Add a new key **checkbox** of type `Object`, if the user has to be forced to click on a checkbox before validating his document (ex: 'I have read and accepted the conditions'). In the checkbox object, the following attributes should be defined: - * A **label** key of type `String`, for the text associated to the checkbox - * A **required** key of type `Boolean`, set at true if the user has to check it - * A **name** key of type `String` - * All other attributes wanted for the checkbox. + - Add a new key **subtype** of type `String` with the exact value 'sign-step' + - Add a new key **text** of type `String` with the text of your document to sign as value + - Add a new key **buttonText** of type `String` with the text that you want to display in the submit button of your step. Default value for this attribute is 'Sign'. + - Add a new key **checkbox** of type `Object`, if the user has to be forced to click on a checkbox before validating his document (ex: 'I have read and accepted the conditions'). In the checkbox object, the following attributes should be defined: + - A **label** key of type `String`, for the text associated to the checkbox + - A **required** key of type `Boolean`, set at true if the user has to check it + - A **name** key of type `String` + - All other attributes wanted for the checkbox. + - Add a new key **link** of type `Object`, if a link must be added to the step (ex: download of a .pdf version of the document to sign). In the link object, the following attributes should be defined: + - A **href** key of type `String`, with the link you want to add to the step + - A **label** key of type `String`, for the text displayed for the link (by default, '> Link to the document' is displayed) + - All other attributes wanted for the link. ### Examples @@ -213,14 +224,21 @@ Here is an example of the structure a 'document to sign' step could have: "text": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent ornare non sem eu pretium. Integer porttitor risus eget nibh iaculis, ac lacinia orci dictum. Nunc ullamcorper consequat enim in posuere. Aliquam volutpat est odio, vel maximus arcu maximus sit amet. Donec ultricies faucibus magna id luctus. Duis et dapibus elit. In vestibulum ipsum erat, at commodo tortor convallis vel. Nunc ut ultrices nulla. Etiam lorem justo, consequat a consectetur a, porttitor non turpis. Mauris eu mollis nisl, id dignissim quam. Curabitur condimentum sollicitudin rutrum. Aenean blandit, arcu nec ullamcorper rhoncus, lectus sem lacinia lorem, venenatis dignissim velit mi et sapien. Nullam posuere augue ut magna ullamcorper dignissim. Ut rhoncus sapien vel nulla commodo finibus. Cras non leo vel urna finibus volutpat. Praesent et ex eget diam tincidunt suscipit. Phasellus bibendum neque vel placerat iaculis. Vestibulum bibendum ultrices ipsum, non sodales lectus. Cras eget orci eget elit blandit scelerisque at ut nulla. Integer ligula eros, eleifend quis sodales a, porttitor sit amet neque. Fusce mollis magna at lectus varius, quis suscipit mi cursus. Etiam id imperdiet metus, in malesuada quam. Aliquam facilisis nunc non sapien condimentum, quis iaculis nisl auctor. Nunc lorem sapien, interdum vel efficitur ac, dapibus a diam. Ut ante urna, sodales in bibendum vel, lacinia ut mauris. In vel placerat leo. In libero dui, tincidunt at sem id, faucibus sollicitudin elit.", "buttonText": "Sign chart", "checkbox": { - "name":"acceptChart", - "label":"I have read and accepted the Chart 01", - "required":true + "name": "acceptChart", + "label": "I have read and accepted the Chart 01", + "required": true + }, + "link": { + "label": "Download Chart 01", + "href": "https://help.github.com/en/articles/creating-an-issue", + "download": true, + "target": "_blank" } } ``` -This 'document to sign' step would look like this: +NB : `target` & `download` are forwarded to the a html element as they are valid html properties -![document to sign step example](https://user-images.githubusercontent.com/35296671/56504782-8f079900-6511-11e9-9a0e-bb638b6d7d03.png) +This 'document to sign' step would look like this: +![document-to-sign-step-example](img/document-to-sign-step-example.png) diff --git a/docs/object-attribute-reference.md b/docs/object-attribute-reference.md index a35f4867a..6012b609d 100644 --- a/docs/object-attribute-reference.md +++ b/docs/object-attribute-reference.md @@ -1,20 +1,21 @@ # Object Attribute Reference + ## List all **USABLE** preset object attributes -| Attribute | Type | Value | Description | -|-------------------|-----------|-------|-------------| -| `xp` | function | `exerciceExpCalculation`, `examExpCalculation` or `raidExpCalculation` | Amount of exeperience points that an object will give. | -| `correctionPrice` | function | `correctionPrice` | Amount of correction points needed to test an exercise. | -| `duration` | number | | | -| `time` | string | | | -| `info` | object | | | +| Attribute | Type | Value | Description | +| ----------------- | -------- | ---------------------------------------------------------------------- | ------------------------------------------------------- | +| `xp` | function | `exerciceExpCalculation`, `examExpCalculation` or `raidExpCalculation` | Amount of experience points that an object will give. | +| `correctionPrice` | function | `correctionPrice` | Amount of correction points needed to test an exercise. | +| `duration` | number | | | +| `time` | string | | | +| `info` | object | | | ## List all **RESERVED** preset object attributes -| Attribute | Type | Value | Description | -|-------------------|-----------|-------|-------------| -| `scopeStart` | function | | | -| `scopeEnd` | function | | | -| `startDay` | function | | | -| `status` | function | | | -| `week` | function | | | +| Attribute | Type | Value | Description | +| ------------ | -------- | ----- | ----------- | +| `scopeStart` | function | | | +| `scopeEnd` | function | | | +| `startDay` | function | | | +| `status` | function | | | +| `week` | function | | | diff --git a/docs/object-attribute-system.md b/docs/object-attribute-system.md index 8aea0fc16..5f403bc48 100644 --- a/docs/object-attribute-system.md +++ b/docs/object-attribute-system.md @@ -23,7 +23,7 @@ Once created, the new attributes appears right bellow and the ability to associa Any attribute can be delete by clicking on the 'trash' icon on the right hand of it. Here an example of how the section looks like. -![object-attributes](https://user-images.githubusercontent.com/15313830/56677487-88675600-66b8-11e9-9781-26dc0ee6301d.png) +![object-attributes](img/object-attributes.png) ## Attributes and RelationShips @@ -49,10 +49,10 @@ The following json shows how the object would be represented: ``` Children -![children](https://user-images.githubusercontent.com/15313830/56679319-b189e580-66bc-11e9-8f2a-3d51eb1486d4.png) +![children](img/children.png) Child -![chilld-capture](https://user-images.githubusercontent.com/15313830/56679320-b189e580-66bc-11e9-90ab-c8f69f531876.png) +![child-capture](img/child-capture.png) ## Detailed example @@ -151,12 +151,15 @@ All done, now when rendering an object, attributes are merged like so: ``` First we apply the **default attributes** from the referenced object. + > Here `duration` and `language` are applied. Then we apply the **children attributes** to every child. + > In this case we override every `duration` to 4800 and add the new `xp` attribute. After that we apply the **relation attributes**, that are the most specific and as such, override all others attributes. + > In this case only the `printalphabet` relation had attributes and so we apply -the given `duration` to the final merged object. +> the given `duration` to the final merged object. diff --git a/docs/object-child-creation.md b/docs/object-child-creation.md index 45c8d7e86..fd02a2169 100644 --- a/docs/object-child-creation.md +++ b/docs/object-child-creation.md @@ -1,33 +1,40 @@ # Admin object's management - create a child object ## Usage -> Objects of the Admin can be configured : -> * By setting particular **attributes** to the object -> * By associating **children** to the object -> -> Children can be added, deleted, reordered in the list. Also, it's possible to configure it in a special way for the parent object, by setting children attributes for all the children. -> -> This documentation explains how to associate a child to a parent object. + +Objects of the Admin can be configured : + +- By setting particular **attributes** to the object +- By associating **children** to the object + +Children can be added, deleted, reordered in the list. Also, it's possible to configure it in a special way for the parent object, by setting children attributes for all the children. + +This documentation explains how to associate a child to a parent object. ### Create a new object for your child in the admin -> Information is available for object's creation: [Modular step management](https://github.com/01-edu/public/blob/master/doc/object-creation.md) + +> Information is available for object's creation: [Object Creation](object-creation.md) ### Add this new object as a child of your parent's object #### 1. Edit the parent object -Capture d’écran 2019-04-22 à 19 24 23 -Capture d’écran 2019-04-22 à 19 24 10 -#### 2. Go to *Children* > *Add a child* -![add child to parent object](https://user-images.githubusercontent.com/35296671/56506977-de50c800-6517-11e9-9c71-d19a1ec4e5cd.png) +Capture d’écran 2019-04-22 à 19 24 23 +Capture d’écran 2019-04-22 à 19 24 10 + +#### 2. Go to _Children_ > _Add a child_ + +![add-child-to-parent-object](img/add-child-to-parent-object.png) #### 3. Set up the new child: -* Enter its name in the input "Add a child name" -* Select your step object in the select input -* Click on "ADD" - -> Your step is then related to its parent. You can see it in the *Children* section of the parent's object. There, you can now: -> * Delete the child from its parent (the actual object of your child will not be deleted). -> * Reorder it in the children's list, by dragging it to the place you want. -> * Update its original settings by clicking on the eye icon of its reference (redirection to object edit page of the child). -Capture d’écran 2019-04-22 à 19 51 12 + +- Enter its name in the input "Add a child name" +- Select your step object in the select input +- Click on "ADD" + +Your step is then related to its parent. You can see it in the _Children_ section of the parent's object. There, you can now: + +- Delete the child from its parent (the actual object of your child will not be deleted). +- Reorder it in the children's list, by dragging it to the place you want. +- Update its original settings by clicking on the eye icon of its reference (redirection to object edit page of the child). + Capture d’écran 2019-04-22 à 19 51 12 diff --git a/docs/object-creation.md b/docs/object-creation.md index 1fa5d31f4..4723f7845 100644 --- a/docs/object-creation.md +++ b/docs/object-creation.md @@ -1,53 +1,58 @@ # Admin object's management - create an object ## Usage -> Elements of the app are managed through objects in *Admin*. -> Objects of the Admin are first created and defined: -> * By their **title**, -> * By their **type**. +Elements of the app are managed through objects in _Admin_. -> Then it can be configured through: -> * Attributes, -> * Children. +Objects of the Admin are first created and defined: -> This documentation explains how to create an object. +- By their **title**, +- By their **type**. + +Then it can be configured through: + +- Attributes, +- Children. + +> This documentation explains how to create an object. ### Create a new object in the admin -> (in *Admin* > *Add new object*) - -Capture d’écran 2019-04-22 à 15 57 37 -Capture d’écran 2019-04-22 à 15 58 21 - - -* The **title** of your object will be the title displayed to your candidates. Use an intellegible title for your user. - > NB: you can always edit it in the *Admin* - -* The **type** depends on the nature of your object: - * **Campus** is used to declare a school. - * Examples: *Alem*, *Madeira*, etc. - * Campus can contains cursus: *Alem* contains for example *01-classical* and *Piscine Go*. - * **Cursus** is used to declare a course. - * Examples: *01-classical*, *Piscine Go*, etc. - * Cursuses can contains cursuses: the main cursus *01-classical*, for example, contains cursuses like *Piscine Go*, but also all the branches that the student have access to, as *Web*, *Security*, *Algorythm*, *Design*, etc. - * Cursuses can contains quests: *Piscine Go* of *01-classical* contains quests like *Quest 1* or *Quest 2*. - * **Quest** is used to declare a project. - * Examples: *Quest 1*, *Quest 2*, etc. - * Quest contains exercises: *Quest 1* of *Piscine Go* contains exercises like *printalphabet* or *printcomb*. - * Exercise is used to declare exercises - * Examples: *printalphabet*, *printcomb*, *atoi*, etc. - * Exercises doesn't contains any children. - * Signup is used to declare steps of the registration. - * Examples: *Using our services*, *Tell us more about you*, etc. - * One major object *Sign up* contains all the sign up's modular steps : *Using our services*, *Tell us more about you*, etc. - * Onbaording is used to declare steps of the onbaording. - * Examples: *Toad*, *Administration*, *Additional Informations*, *Chart 01*, etc. - * Three main objects define the major steps of the onboarding : *Toad*, *Administration*, *Piscine*. - * *Administration* contains modular steps: *Additional Informations*, *Chart 01*, etc. - -> The child object is then available in the *Admin*. It can be found in the section of its type or thanks to the search bar of the cursus object's page. - -> More information is available: -> * for setting attributes of an object: (soon available) -> * for setting children of an object: [Child object creation](https://github.com/01-edu/public/blob/master/doc/child-object-creation.md) -> * for creation of modular steps in Sign up and onboarding's Administration object: [Modular step management](https://github.com/01-edu/public/blob/master/doc/modular-steps-management.md) + +> (in _Admin_ > _Add new object_) + +Capture d’écran 2019-04-22 à 15 57 37 +Capture d’écran 2019-04-22 à 15 58 21 + +- The **title** of your object will be the title displayed to your candidates. Use an intellegible title for your user. + + > NB: you can always edit it in the _Admin_ + +- The **type** depends on the nature of your object: + - **Campus** is used to declare a school. + - Examples: _Alem_, _Madeira_, etc. + - Campus can contains cursus: _Alem_ contains for example _01-classical_ and _Piscine Go_. + - **Cursus** is used to declare a course. + - Examples: _01-classical_, _Piscine Go_, etc. + - Cursuses can contains cursuses: the main cursus _01-classical_, for example, contains cursuses like _Piscine Go_, but also all the branches that the student have access to, as _Web_, _Security_, _Algorythm_, _Design_, etc. + - Cursuses can contains quests: _Piscine Go_ of _01-classical_ contains quests like _Quest 1_ or _Quest 2_. + - **Quest** is used to declare a project. + - Examples: _Quest 1_, _Quest 2_, etc. + - Quest contains exercises: _Quest 1_ of _Piscine Go_ contains exercises like _printalphabet_ or _printcomb_. + - Exercise is used to declare exercises + - Examples: _printalphabet_, _printcomb_, _atoi_, etc. + - Exercises doesn't contains any children. + - Signup is used to declare steps of the registration. + - Examples: _Using our services_, _Tell us more about you_, etc. + - One major object _Sign up_ contains all the sign up's modular steps : _Using our services_, _Tell us more about you_, etc. + - Onbaording is used to declare steps of the onbaording. + - Examples: _Toad_, _Administration_, _Additional Informations_, _Chart 01_, etc. + - Three main objects define the major steps of the onboarding : _Toad_, _Administration_, _Piscine_. + - _Administration_ contains modular steps: _Additional Informations_, _Chart 01_, etc. + +The child object is then available in the _Admin_. It can be found in the section of its type or thanks to the search bar of the cursus object's page. + +More information is available: + +- for setting attributes of an object: (soon available) +- for setting children of an object: [Child object creation](object-child-creation.md) +- for creation of modular steps in Sign up and onboarding's Administration object: [Modular step management](modular-steps-management.md) diff --git a/docs/object-edit.md b/docs/object-edit.md index 272ca098c..5434d1c53 100644 --- a/docs/object-edit.md +++ b/docs/object-edit.md @@ -4,31 +4,31 @@ ## Page Composition -![object-edit-overview](https://user-images.githubusercontent.com/15313830/56667480-ceff8500-66a5-11e9-98c7-792d598f2394.png) +![object-edit-overview](img/object-edit-overview.png) ### Pin 1 -- Link back to the "Objects" page ; -- Editable name field, hit 'enter' or 'cmd + s' or click on the floppy-disk icon to save ; -- Major dependencies visualisation, (where my object is used as a child), click the label to navigate to the dependence ; -- External URL, this is an optional parameter, it's use to point at an other source of content or information needed by the object. We generaly use to point at a Git repository ; +- Link back to the "Objects" page ; +- Editable name field, hit 'enter' or 'cmd + s' or click on the floppy-disk icon to save ; +- Major dependencies visualisation, (where my object is used as a child), click the label to navigate to the dependence ; +- External URL, this is an optional parameter, it's use to point at an other source of content or information needed by the object. We generaly use to point at a Git repository ; ### Pin 2 -- Delete Button, Warning there, it will destroy your object! ; -- Type of your Object (`organisation`, `campus`, `onboarding`, `cursus`, `quest`, `exercise`), save on select ; -- Status of your Object (`draft`, `online`, `offline`), save on select ; -- The first and last name of the original author ; +- Delete Button, Warning there, it will destroy your object! ; +- Type of your Object (`organisation`, `campus`, `onboarding`, `cursus`, `quest`, `exercise`), save on select ; +- Status of your Object (`draft`, `online`, `offline`), save on select ; +- The first and last name of the original author ; ### Pin 3 -- Object Attribute edition area, manage all the attributes relative to this Object. These attributes will be exposed to its relationship ; +- Object Attribute edition area, manage all the attributes relative to this Object. These attributes will be exposed to its relationship ; ### Pin 4 -- Object Children edition area ; -- Children Attributes edition area, these attributes impact and overload all the following children. Works the same way as standard attributes ; -- Add a child, allows to add a child to the children list, more information here -> [Object Child creation](https://github.com/01-edu/public/blob/master/doc/object-child-creation.md) ; -- Children List, allows you to reorganise, delete and edit child. Each child can be overload with its own attributes, the edition works the same way as the original attributes ; +- Object Children edition area ; +- Children Attributes edition area, these attributes impact and overload all the following children. Works the same way as standard attributes ; +- Add a child, allows to add a child to the children list, more information here -> [Object Child creation](object-child-creation.md) ; +- Children List, allows you to reorganise, delete and edit child. Each child can be overload with its own attributes, the edition works the same way as the original attributes ; -More informations about attribute overload system [here] ((https://github.com/01-edu/public/blob/master/doc/object-attribute-overload-system.md) +More informations about attribute overload system [here](object-attribute-system.md) diff --git a/docs/objects.md b/docs/objects.md index 21cb3a7a7..81414db7e 100644 --- a/docs/objects.md +++ b/docs/objects.md @@ -11,19 +11,19 @@ It structure can be visualized in two parts. The first one is the definition of This is the minimal structure of an object: -- name -- type (`organisation`, `campus`, `onboarding`, `cursus`, `quest`, `exercise`) -- status (`draft`, `online`, `offline`) -- attrs {} -- childrenAttrs {} -- children {} +- name +- type (`organisation`, `campus`, `onboarding`, `cursus`, `quest`, `exercise`) +- status (`draft`, `online`, `offline`) +- attrs {} +- childrenAttrs {} +- children {} ## Browse Objects: To access your Objects, go to the admin dashboard and then click on the _manage object_ link within the "Object" card. -![go-to-objects](https://user-images.githubusercontent.com/15313830/56653756-46bdb780-6686-11e9-98ba-18e382987e9c.png) +![go-to-objects](img/go-to-objects.png) Objects are sorted by type in different sections. This page offer a search bar that allow you query the objects by name. In the top-right corner, click the _add a new object_ button to create a new object. Fill a name, select a type and click _create_ to validate your creation. You will be redirected to the Object Edition page (document is here). -![all-object-page](https://user-images.githubusercontent.com/15313830/56654475-137c2800-6688-11e9-880b-75092397890d.png) +![all-object-page](img/all-object-page.png) diff --git a/docs/os-deployment.md b/docs/os-deployment.md new file mode 100644 index 000000000..a572ab6df --- /dev/null +++ b/docs/os-deployment.md @@ -0,0 +1,30 @@ +# OS Deployment + +## Image creation steps + +- [Installation of Ubuntu](ubuntu-installation.md) + - minimal OS installation (downloads ~200 MB) + - Software installation (downloads ~900 MB) + - Optimization + - improve speed + - reduce image size + - reduce power (CPU) & memory usage + - reduce surface of attack + - reduce bandwidth usage + - Customization + - machine-dependent (drivers, bug workarounds...) + - time zone of the school + - school scripts + - Cleaning + - logs + - temporary files + - histories + - caches + - auto-generated IDs +- Preparation of the disk image + - zero unallocated space of filesystem (~7 GB of data remains) + - (optional) create compressed image with [lz4](https://lz4.github.io/lz4) (the resulting image is ~3.2 GB) + +## Network installation + +- Boot through PXE [UDPcast](http://udpcast.linux.lu) which allows an efficient transfer of the disk image (using multicast or broadcast) diff --git a/docs/piscine-go-curriculum.md b/docs/piscine-go-curriculum.md index 16198562b..23c912464 100644 --- a/docs/piscine-go-curriculum.md +++ b/docs/piscine-go-curriculum.md @@ -12,27 +12,27 @@ Notions: basic usage and interaction with a command line terminal. Videos: -- 1-2 Curl with the GitHub api and Example of Sh file | https://www.youtube.com/watch?v=A0Mqc215igw -- 1-3 Touch , Chmod and Echo | https://www.youtube.com/watch?v=21h-vsuXgDU -- 1-4 find and grep | https://www.youtube.com/watch?v=7a1JSWHhJlM -- 1-5 cut sed and tr | https://www.youtube.com/watch?v=Nil7rVP3eMI -- 1-6 jq and wc | https://www.youtube.com/watch?v=cQmcaOseuiA& +- 1-2 `curl` with the GitHub api and Example of shell file | https://www.youtube.com/watch?v=A0Mqc215igw +- 1-3 `touch`, `chmod` and `echo` | https://www.youtube.com/watch?v=21h-vsuXgDU +- 1-4 `find` and `grep` | https://www.youtube.com/watch?v=7a1JSWHhJlM +- 1-5 `cut`, `sed` and `tr` | https://www.youtube.com/watch?v=Nil7rVP3eMI +- 1-6 `jq` and `wc` | https://www.youtube.com/watch?v=cQmcaOseuiA& Exercices: -- introduction | https://public.01-edu.org/subjects/introduction.en -- make-it-better | https://public.01-edu.org/subjects/make-it-better.en -- to-git-or-not-to-git | https://public.01-edu.org/subjects/to-git-or-not-to-git.en -- who-are-you | https://public.01-edu.org/subjects/who-are-you.en -- cl-camp1 | https://public.01-edu.org/subjects/cl-camp1.en -- cl-camp2 | https://public.01-edu.org/subjects/cl-camp2.en -- cl-camp3 | https://public.01-edu.org/subjects/cl-camp3.en -- cl-camp4 | https://public.01-edu.org/subjects/cl-camp4.en -- cl-camp5 | https://public.01-edu.org/subjects/cl-camp5.en -- cl-camp6 | https://public.01-edu.org/subjects/cl-camp6.en -- cl-camp7 | https://public.01-edu.org/subjects/cl-camp7.en -- cl-camp8 | https://public.01-edu.org/subjects/cl-camp8.en -- now-get-to-work | https://public.01-edu.org/subjects/now-get-to-work.en +- introduction | https://public.01-edu.org/subjects/introduction.en +- make-it-better | https://public.01-edu.org/subjects/make-it-better.en +- to-git-or-not-to-git | https://public.01-edu.org/subjects/to-git-or-not-to-git.en +- who-are-you | https://public.01-edu.org/subjects/who-are-you.en +- cl-camp1 | https://public.01-edu.org/subjects/cl-camp1.en +- cl-camp2 | https://public.01-edu.org/subjects/cl-camp2.en +- cl-camp3 | https://public.01-edu.org/subjects/cl-camp3.en +- cl-camp4 | https://public.01-edu.org/subjects/cl-camp4.en +- cl-camp5 | https://public.01-edu.org/subjects/cl-camp5.en +- cl-camp6 | https://public.01-edu.org/subjects/cl-camp6.en +- cl-camp7 | https://public.01-edu.org/subjects/cl-camp7.en +- cl-camp8 | https://public.01-edu.org/subjects/cl-camp8.en +- now-get-to-work | https://public.01-edu.org/subjects/now-get-to-work.en ### Quest 2 @@ -42,21 +42,21 @@ Notions: Variables declaration, Loops, if and else statement, usage of z01.Print Videos: -- 02-01-If and Else Statements in Go | https://www.youtube.com/watch?v=rnF1_SfeGE4 -- 02-02-ForLoops | https://www.youtube.com/watch?v=Bt47lx6q2-4 -- 02-03-PrintRune function | https://www.youtube.com/watch?v=o8JrvI3jqoM -- 02-04-Variables Declaration and ascii | https://www.youtube.com/watch?v=RCNOV8m0hJQ +- 02-01-If and Else Statements in Go | https://www.youtube.com/watch?v=rnF1_SfeGE4 +- 02-02-ForLoops | https://www.youtube.com/watch?v=Bt47lx6q2-4 +- 02-03-PrintRune function | https://www.youtube.com/watch?v=o8JrvI3jqoM +- 02-04-Variables Declaration and ascii | https://www.youtube.com/watch?v=RCNOV8m0hJQ Exercices: -- printalphabet | https://public.01-edu.org/subjects/printalphabet.en -- printreversealphabet | https://public.01-edu.org/subjects/printreversealphabet.en -- prindigits | https://public.01-edu.org/subjects/printdigits.en -- isnegative | https://public.01-edu.org/subjects/isnegative.en -- printcomb | https://public.01-edu.org/subjects/printcomb.en -- printcomb2 | https://public.01-edu.org/subjects/printcomb2.en -- printnbr | https://public.01-edu.org/subjects/printnbr.en -- printcombn | https://public.01-edu.org/subjects/printcombn.en +- printalphabet | https://public.01-edu.org/subjects/printalphabet.en +- printreversealphabet | https://public.01-edu.org/subjects/printreversealphabet.en +- prindigits | https://public.01-edu.org/subjects/printdigits.en +- isnegative | https://public.01-edu.org/subjects/isnegative.en +- printcomb | https://public.01-edu.org/subjects/printcomb.en +- printcomb2 | https://public.01-edu.org/subjects/printcomb2.en +- printnbr | https://public.01-edu.org/subjects/printnbr.en +- printcombn | https://public.01-edu.org/subjects/printcombn.en ### Quest 3 @@ -66,25 +66,25 @@ Notions: String Manupulation, Range Loops, Pointers, Modulo and Division relativ Videos: -- 03-01-StringsManipulation | https://www.youtube.com/watch?v=8LplJN_8iOU -- 03-02-RangeLoop | https://www.youtube.com/watch?v=i89N4cjh1-g -- 03-03-Pointers on variables | https://www.youtube.com/watch?v=owVPa5b1BMc -- 03-04-Modulo and Division | https://www.youtube.com/watch?v=NVan-9-Ioec +- 03-01-StringsManipulation | https://www.youtube.com/watch?v=8LplJN_8iOU +- 03-02-RangeLoop | https://www.youtube.com/watch?v=i89N4cjh1-g +- 03-03-Pointers on variables | https://www.youtube.com/watch?v=owVPa5b1BMc +- 03-04-Modulo and Division | https://www.youtube.com/watch?v=NVan-9-Ioec Exercices: -- pointone | https://public.01-edu.org/subjects/pointone.en -- ultimatepointone | https://public.01-edu.org/subjects/ultimatepointone.en -- divmod | https://public.01-edu.org/subjects/divmod.en -- ultimatedivmod | https://public.01-edu.org/subjects/ultimatedivmod.en -- printstr | https://public.01-edu.org/subjects/printstr.en -- strlen | https://public.01-edu.org/subjects/strlen.en -- swap | https://public.01-edu.org/subjects/swap.en -- strrev | https://public.01-edu.org/subjects/strrev.en -- basicatoi | https://public.01-edu.org/subjects/basicatoi.en -- basicatoi2 | https://public.01-edu.org/subjects/basicatoi2.en -- atoi | https://public.01-edu.org/subjects/atoi.en -- sortintegerable | https://public.01-edu.org/subjects/sortintegertable.en +- pointone | https://public.01-edu.org/subjects/pointone.en +- ultimatepointone | https://public.01-edu.org/subjects/ultimatepointone.en +- divmod | https://public.01-edu.org/subjects/divmod.en +- ultimatedivmod | https://public.01-edu.org/subjects/ultimatedivmod.en +- printstr | https://public.01-edu.org/subjects/printstr.en +- strlen | https://public.01-edu.org/subjects/strlen.en +- swap | https://public.01-edu.org/subjects/swap.en +- strrev | https://public.01-edu.org/subjects/strrev.en +- basicatoi | https://public.01-edu.org/subjects/basicatoi.en +- basicatoi2 | https://public.01-edu.org/subjects/basicatoi2.en +- atoi | https://public.01-edu.org/subjects/atoi.en +- sortintegerable | https://public.01-edu.org/subjects/sortintegertable.en ### Exam 1 (4hours) @@ -106,19 +106,19 @@ Notions: Iterative and recursive programmation Videos: -- 04-01-Iterativity and Recursivity | https://www.youtube.com/watch?v=oCZDdAID5Ik +- 04-01-Iterativity and Recursivity | https://www.youtube.com/watch?v=oCZDdAID5Ik Exercices: -- iterativefactorial | https://public.01-edu.org/subjects/iterativefactorial.en -- recursivefactorial | https://public.01-edu.org/subjects/recursivefactorial.en -- iterativepower | https://public.01-edu.org/subjects/iterativepower.en -- recursivepower | https://public.01-edu.org/subjects/recursivepower.en -- fibonacci | https://public.01-edu.org/subjects/fibonacci.en -- sqrt | https://public.01-edu.org/subjects/sqrt.en -- isprime | https://public.01-edu.org/subjects/isprime.en -- findnextprime | https://public.01-edu.org/subjects/findnextprime.en -- eightqueens | https://public.01-edu.org/subjects/eightqueens.en +- iterativefactorial | https://public.01-edu.org/subjects/iterativefactorial.en +- recursivefactorial | https://public.01-edu.org/subjects/recursivefactorial.en +- iterativepower | https://public.01-edu.org/subjects/iterativepower.en +- recursivepower | https://public.01-edu.org/subjects/recursivepower.en +- fibonacci | https://public.01-edu.org/subjects/fibonacci.en +- sqrt | https://public.01-edu.org/subjects/sqrt.en +- isprime | https://public.01-edu.org/subjects/isprime.en +- findnextprime | https://public.01-edu.org/subjects/findnextprime.en +- eightqueens | https://public.01-edu.org/subjects/eightqueens.en ### Quest 5 @@ -128,28 +128,28 @@ Notions: String Manipulation and medium-advanced algorithmia Videos: -- 05-01-Runes, Bytes and Strings | https://www.youtube.com/watch?v=-eIU5ISID64 +- 05-01-Runes, Bytes and Strings | https://www.youtube.com/watch?v=-eIU5ISID64 Exercices: -- firstrune | https://public.01-edu.org/subjects/firstrune.en -- nrune | https://public.01-edu.org/subjects/nrune.en -- lastrune | https://public.01-edu.org/subjects/lastrune.en -- index | https://public.01-edu.org/subjects/index.en -- compare | https://public.01-edu.org/subjects/compare.en -- toupper | https://public.01-edu.org/subjects/toupper.en -- tolower | https://public.01-edu.org/subjects/tolower.en -- capitalize | https://public.01-edu.org/subjects/capitalize.en -- isalpha | https://public.01-edu.org/subjects/isalpha.en -- isnumeric | https://public.01-edu.org/subjects/isnumeric.en -- islower | https://public.01-edu.org/subjects/islower.en -- isupper | https://public.01-edu.org/subjects/isupper.en -- isprintable | https://public.01-edu.org/subjects/isprintable.en -- concat | https://public.01-edu.org/subjects/concat.en -- basicjoin | https://public.01-edu.org/subjects/basicjoin.en -- join | https://public.01-edu.org/subjects/join.en -- printnbrbase | https://public.01-edu.org/subjects/printnbrbase.en -- atoibase | https://public.01-edu.org/subjects/atoibase.en +- firstrune | https://public.01-edu.org/subjects/firstrune.en +- nrune | https://public.01-edu.org/subjects/nrune.en +- lastrune | https://public.01-edu.org/subjects/lastrune.en +- index | https://public.01-edu.org/subjects/index.en +- compare | https://public.01-edu.org/subjects/compare.en +- toupper | https://public.01-edu.org/subjects/toupper.en +- tolower | https://public.01-edu.org/subjects/tolower.en +- capitalize | https://public.01-edu.org/subjects/capitalize.en +- isalpha | https://public.01-edu.org/subjects/isalpha.en +- isnumeric | https://public.01-edu.org/subjects/isnumeric.en +- islower | https://public.01-edu.org/subjects/islower.en +- isupper | https://public.01-edu.org/subjects/isupper.en +- isprintable | https://public.01-edu.org/subjects/isprintable.en +- concat | https://public.01-edu.org/subjects/concat.en +- basicjoin | https://public.01-edu.org/subjects/basicjoin.en +- join | https://public.01-edu.org/subjects/join.en +- printnbrbase | https://public.01-edu.org/subjects/printnbrbase.en +- atoibase | https://public.01-edu.org/subjects/atoibase.en ### Quest 6 @@ -159,14 +159,14 @@ Notions: Arguments manipulation in programs Videos: -- 06-01-Os.Args | https://www.youtube.com/watch?v=I1xt_TLRhF0 +- 06-01-Os.Args | https://www.youtube.com/watch?v=I1xt_TLRhF0 Exercices: -- printprogramname | https://public.01-edu.org/subjects/printprogramname.en -- printparams | https://public.01-edu.org/subjects/printparams.en -- revparams | https://public.01-edu.org/subjects/revparams.en -- sortparams | https://public.01-edu.org/subjects/sortparams.en +- printprogramname | https://public.01-edu.org/subjects/printprogramname.en +- printparams | https://public.01-edu.org/subjects/printparams.en +- revparams | https://public.01-edu.org/subjects/revparams.en +- sortparams | https://public.01-edu.org/subjects/sortparams.en ### Quest 7 @@ -176,17 +176,17 @@ Notions: Usage of Make and Append Videos: -- 07-01-Make and Append methods | https://www.youtube.com/watch?v=2HHVUM0YQuI +- 07-01-Make and Append methods | https://www.youtube.com/watch?v=2HHVUM0YQuI Exercices: -- appendrange | https://public.01-edu.org/subjects/apprendrange.en -- makerange | https://public.01-edu.org/subjects/makerange.en -- concatparams | https://public.01-edu.org/subjects/concatparams.en -- splitwhitespaces | https://public.01-edu.org/subjects/splitwhitespaces.en -- printwordstables | https://public.01-edu.org/subjects/printwordstables.en -- convertbase | https://public.01-edu.org/subjects/converbase.en -- split | https://public.01-edu.org/subjects/split.en +- appendrange | https://public.01-edu.org/subjects/apprendrange.en +- makerange | https://public.01-edu.org/subjects/makerange.en +- concatparams | https://public.01-edu.org/subjects/concatparams.en +- splitwhitespaces | https://public.01-edu.org/subjects/splitwhitespaces.en +- printwordstables | https://public.01-edu.org/subjects/printwordstables.en +- convertbase | https://public.01-edu.org/subjects/converbase.en +- split | https://public.01-edu.org/subjects/split.en ### Exam 2 (4hours) @@ -208,16 +208,16 @@ Notions: Creation of struct types and file manipulation (Open, Read, Close metho Videos: -- 08-01-Structures in Go | https://www.youtube.com/watch?v=-24M7r7VuLY -- 08-02-File Manipulation in go | https://www.youtube.com/watch?v=8vUgchQGhcQ +- 08-01-Structures in Go | https://www.youtube.com/watch?v=-24M7r7VuLY +- 08-02-File Manipulation in go | https://www.youtube.com/watch?v=8vUgchQGhcQ Exercices: -- bool | https://public.01-edu.org/subjects/bool.en -- point | https://public.01-edu.org/subjects/point.en -- displayfile | https://public.01-edu.org/subjects/displayfile.en -- cat | https://public.01-edu.org/subjects/cat.en -- ztail | https://public.01-edu.org/subjects/ztail.en +- bool | https://public.01-edu.org/subjects/bool.en +- point | https://public.01-edu.org/subjects/point.en +- displayfile | https://public.01-edu.org/subjects/displayfile.en +- cat | https://public.01-edu.org/subjects/cat.en +- ztail | https://public.01-edu.org/subjects/ztail.en ### Quest 9 @@ -227,18 +227,18 @@ Notions: Advance function prototyping Videos: -- 09-01-Functions as Arguments | https://www.youtube.com/watch?v=lw8jUwsluAE +- 09-01-Functions as Arguments | https://www.youtube.com/watch?v=lw8jUwsluAE Exercices: -- foreach | https://public.01-edu.org/subjects/foreach.en -- map | https://public.01-edu.org/subjects/map.en -- any | https://public.01-edu.org/subjects/any.en -- countif | https://public.01-edu.org/subjects/countif.en -- issorted | https://public.01-edu.org/subjects/issorted.en -- doop | https://public.01-edu.org/subjects/doop.en -- sortwordarr | https://public.01-edu.org/subjects/sortwordarr.en -- advancedsortwordarr | https://public.01-edu.org/subjects/advancedsortwordarr.en +- foreach | https://public.01-edu.org/subjects/foreach.en +- map | https://public.01-edu.org/subjects/map.en +- any | https://public.01-edu.org/subjects/any.en +- countif | https://public.01-edu.org/subjects/countif.en +- issorted | https://public.01-edu.org/subjects/issorted.en +- doop | https://public.01-edu.org/subjects/doop.en +- sortwordarr | https://public.01-edu.org/subjects/sortwordarr.en +- advancedsortwordarr | https://public.01-edu.org/subjects/advancedsortwordarr.en ### Quest 10 @@ -248,18 +248,18 @@ Notions: All previously viewed concepts in team work Exercices: -- rot14 | https://public.01-edu.org/subjects/rot14.en -- abort | https://public.01-edu.org/subjects/abort.en -- collatzcountdown | https://public.01-edu.org/subjects/collatzcountdown.en -- comcheck | https://public.01-edu.org/subjects/comcheck.en -- enigma | https://public.01-edu.org/subjects/enigma.en -- pilot | https://public.01-edu.org/subjects/pilot.en -- fixthemain | https://public.01-edu.org/subjects/fixthemain.en -- compact | https://public.01-edu.org/subjects/compact.en -- activebits | https://public.01-edu.org/subjects/activebits.en -- max | https://public.01-edu.org/subjects/max.en -- join | https://public.01-edu.org/subjects/join.en -- unmatch | https://public.01-edu.org/subjects/unmatch.en +- rot14 | https://public.01-edu.org/subjects/rot14.en +- abort | https://public.01-edu.org/subjects/abort.en +- collatzcountdown | https://public.01-edu.org/subjects/collatzcountdown.en +- comcheck | https://public.01-edu.org/subjects/comcheck.en +- enigma | https://public.01-edu.org/subjects/enigma.en +- pilot | https://public.01-edu.org/subjects/pilot.en +- fixthemain | https://public.01-edu.org/subjects/fixthemain.en +- compact | https://public.01-edu.org/subjects/compact.en +- activebits | https://public.01-edu.org/subjects/activebits.en +- max | https://public.01-edu.org/subjects/max.en +- join | https://public.01-edu.org/subjects/join.en +- unmatch | https://public.01-edu.org/subjects/unmatch.en ### Exam 3 (4hours) @@ -281,25 +281,25 @@ Notions: Pointers manipulation and data structure Videos: -- 11-01-Linked Lists Introduction | https://www.youtube.com/watch?v=EPICVEbylU0 +- 11-01-Linked Lists Introduction | https://www.youtube.com/watch?v=EPICVEbylU0 Exercices: -- listpushback | https://public.01-edu.org/subjects/listpushback.en -- listpushfront | https://public.01-edu.org/subjects/listpushfront.en -- listsize | https://public.01-edu.org/subjects/listsize.en -- listlast | https://public.01-edu.org/subjects/listlast.en -- listclear | https://public.01-edu.org/subjects/listclear.en -- listat | https://public.01-edu.org/subjects/listat.en -- listreverse | https://public.01-edu.org/subjects/listreverse.en -- listforeach | https://public.01-edu.org/subjects/listforeach.en -- listforeachif | https://public.01-edu.org/subjects/listforeachif.en -- listfind | https://public.01-edu.org/subjects/listfind.en -- listremoveif | https://public.01-edu.org/subjects/listremoveif.en -- listmerge | https://public.01-edu.org/subjects/listmerge.en -- listsort | https://public.01-edu.org/subjects/listsort.en -- sortlistinsert | https://public.01-edu.org/subjects/sortlistinsert.en -- sortedlistmerge | https://public.01-edu.org/subjects/sortedlistmerge.en +- listpushback | https://public.01-edu.org/subjects/listpushback.en +- listpushfront | https://public.01-edu.org/subjects/listpushfront.en +- listsize | https://public.01-edu.org/subjects/listsize.en +- listlast | https://public.01-edu.org/subjects/listlast.en +- listclear | https://public.01-edu.org/subjects/listclear.en +- listat | https://public.01-edu.org/subjects/listat.en +- listreverse | https://public.01-edu.org/subjects/listreverse.en +- listforeach | https://public.01-edu.org/subjects/listforeach.en +- listforeachif | https://public.01-edu.org/subjects/listforeachif.en +- listfind | https://public.01-edu.org/subjects/listfind.en +- listremoveif | https://public.01-edu.org/subjects/listremoveif.en +- listmerge | https://public.01-edu.org/subjects/listmerge.en +- listsort | https://public.01-edu.org/subjects/listsort.en +- sortlistinsert | https://public.01-edu.org/subjects/sortlistinsert.en +- sortedlistmerge | https://public.01-edu.org/subjects/sortedlistmerge.en ### Quest 12 @@ -309,21 +309,21 @@ Notions: Advanced Data Structure using binary trees Videos: -- 12-01-Introduction to Binary Trees | https://www.youtube.com/watch?v=3g2WCqWNIVs +- 12-01-Introduction to Binary Trees | https://www.youtube.com/watch?v=3g2WCqWNIVs Exercices: -- btreeinsertdata | https://public.01-edu.org/subjects/btreeinsertdata.en -- btreeapplyinorder | https://public.01-edu.org/subjects/btreeapplyinorder.en -- btreeapplypreorder | https://public.01-edu.org/subjects/btreeapplypreorder.en -- btreesearchitem | https://public.01-edu.org/subjects/btreesearchitem.en -- btreelevelcount | https://public.01-edu.org/subjects/btreelevelcount.en -- btreeisbinary | https://public.01-edu.org/subjects/btreeisbinary.en -- btreeapplylevel | https://public.01-edu.org/subjects/btreeapplylevel.en -- btreemax | https://public.01-edu.org/subjects/btreemax.en -- btreemin | https://public.01-edu.org/subjects/btreemin.en -- btreetransplant | https://public.01-edu.org/subjects/btreetransplant.en -- btreedeletenode | https://public.01-edu.org/subjects/btreedeletenode.en +- btreeinsertdata | https://public.01-edu.org/subjects/btreeinsertdata.en +- btreeapplyinorder | https://public.01-edu.org/subjects/btreeapplyinorder.en +- btreeapplypreorder | https://public.01-edu.org/subjects/btreeapplypreorder.en +- btreesearchitem | https://public.01-edu.org/subjects/btreesearchitem.en +- btreelevelcount | https://public.01-edu.org/subjects/btreelevelcount.en +- btreeisbinary | https://public.01-edu.org/subjects/btreeisbinary.en +- btreeapplylevel | https://public.01-edu.org/subjects/btreeapplylevel.en +- btreemax | https://public.01-edu.org/subjects/btreemax.en +- btreemin | https://public.01-edu.org/subjects/btreemin.en +- btreetransplant | https://public.01-edu.org/subjects/btreetransplant.en +- btreedeletenode | https://public.01-edu.org/subjects/btreedeletenode.en ### Exam 4 - Final Exam (8hours) diff --git a/docs/principles.md b/docs/principles.md new file mode 100644 index 000000000..901cbb529 --- /dev/null +++ b/docs/principles.md @@ -0,0 +1,37 @@ +# Principles + +## Make a simple system (less complexity) + +Rationale : + +- Reduce the number of potential bugs and problems +- The remaining bugs will be easier to identify/isolate & fix +- Easier maintenance +- Lower human capital required + +## Limit security & filtering mechanisms + +Especially during the launch, rationale : + +- Reduce complexity (see above) +- Alem is a school, not a bank, so the security requirements are lower +- Some students will be able to bypass security systems in all cases + - And they will spread the word quickly +- The only reliable way to identify students will be security cameras and staff attention + - Students will share accounts and USB drives + - They will open connections to the outside and there is no definitive way to prevent this +- We will "hire" the students who have found vulnerabilities using technical skills and creativity + - We cannot anticipate every breach hundreds of students will find & exploit +- Focus on endpoint security rather than network security (firewall on each node) + - Reduce complexity of the network and make it more flexible + +## Promote open, neutral network & technologies + +Rationale : + +- Students will spend more time learning things and exchanging ideas than bypassing censorship +- Students will have more extensive knowledge and skills +- It is better to make them aware of their situation than to try to stop them +- A student's motivation is very much influenced by his or her environment + - An environment with limitations will limit the spectrum of things that stimulate the student's curiosity +- A focus will made on increasing student's empowerement in order to make them feel accountable for their own actions. If the student cheats, he has to understand that he is only hindering his own progress. diff --git a/docs/responsibilities.md b/docs/responsibilities.md new file mode 100644 index 000000000..7f546b883 --- /dev/null +++ b/docs/responsibilities.md @@ -0,0 +1,31 @@ +# Responsibilities + +## Alem + +- Hardware + - Maintenance & replacement of parts + - HP machines + - Inventory (associates MAC address or other ID to the physical location of the machine) + - [BIOS configuration](bios-configuration.md) + - Connected on Ethernet network + - Audio & USB extension cables (to protect the PC ports) + - Computers & cables are physically attached to the table (to prevent stealing or damage) + - Monitor brightness (the default might be too high and it cannot be controlled by software) + - Server (virtualized with at least these dedicated resources) + - CPU : 8 threads + - RAM : 64 GB + - SSD : 512 GB + - NIC : pass-through or bridged ? (see with Vitalii) +- Software + - DHCP + - DNS + - PXE + - Image creation & deployment (with the help of team 01) + +## 01 + +- Software maintenance + - Implement the features requested or identified at the Alem School + - Bug fix +- Technical advice +- Pedagogical support diff --git a/docs/tasks.md b/docs/tasks.md new file mode 100644 index 000000000..1d72d7949 --- /dev/null +++ b/docs/tasks.md @@ -0,0 +1,11 @@ +# Tasks + +- [x] Install, connect, check the server and the HP clients (_Alem_, _Vitalii_) +- [x] Check the settings of the virtual machine (_01_, _Vitalii_) +- [x] Install the server (_01_, _Vitalii_) +- [x] Tests & benchmark of the server (_01_) +- [x] Test the [OS deployment](https://github.com/01-edu/public/blob/master/docs/os-deployment.md) (_01_, _Vitalii_) +- [ ] Write process documentation (_01_, _Alem_, _Vitalii_) +- [ ] Ensure the tester only works inside the school (_01_, _Alem_) +- [ ] Ensure the exam app works as expected (_01_, _Alem_) +- [ ] Test the entire piscine (_01_, _Alem_) diff --git a/docs/ubuntu-installation.md b/docs/ubuntu-installation.md index 3acb73645..f32e75098 100644 --- a/docs/ubuntu-installation.md +++ b/docs/ubuntu-installation.md @@ -6,20 +6,18 @@ Download and boot the [last Ubuntu release](http://releases.ubuntu.com/19.04/ubu Follow the steps : -![img1](img/1.png) -![img2](img/2.png) -![img3](img/3.png) +![img1](img/ubuntu-installation/1.png) +![img2](img/ubuntu-installation/2.png) +![img3](img/ubuntu-installation/3.png) The partitioning is : -1) 256 MB : EFI partition -2) 20 GB : system partition -3) 32 GB : unused partition (will be used later) -4) rest : unused partition (will be used later) +1. 256 MB : EFI partition +2. 20 GB : system partition -![img4](img/4.png) -![img5](img/5.png) -![img6](img/6.png) +![img4](img/ubuntu-installation/4.png) +![img5](img/ubuntu-installation/5.png) +![img6](img/ubuntu-installation/6.png) Remove the installation disk and then reboot. @@ -27,43 +25,42 @@ Skip the welcoming window. Don't install updates if Ubuntu asks to. The scripts will. -Start the disk utility to name partitions so that OverlayFS can identify them. +## OS customization -3) 32 GB - **Partition 3** : `01-tmp-home` -4) rest - **Partition 4** : `01-tmp-system` +You can overwrite the files of the folder `system` by setting an environment variable named `OVERWRITE` with the format : `Destination folder;Git URL`. -The same procedure is required to make USB disk usable for the students, the partition name must be : `01-home` +For example to write the content of the repository [github.com/xpetit/custom](https://github.com/xpetit/custom) in the system folder : -![img7](img/7.png) -![img8](img/8.png) -![img9](img/9.png) +```shell +export OVERWRITE='.;https://github.com/xpetit/custom.git' +``` ## OS configuration +Run a terminal and type these commands : + ```shell -student@tmp-hostname:~$ wget github.com/01-edu/public/archive/master.zip -student@tmp-hostname:~$ unzip master.zip -student@tmp-hostname:~$ cd public-master/scripts -student@tmp-hostname:~$ sudo ./install_client.sh -[...] -Ask for student user password (will be removed later) -[...] -Ask to set the root password -[...] -Long installation/configuration process -[...] -student@tmp-hostname:~$ cat dconfig.txt | dconf load / -student@tmp-hostname:~$ reboot +unset HISTFILE +sudo apt-get -y install curl +bash <(curl -sSL raw.githubusercontent.com/01-edu/public/master/scripts/kickstart.sh) ``` +The script will ask for student user password (which will be deleted after) and then after a long configuration process it will restart the computer. + The system is now read-only, every data is written to a temporary partition. The session is password-less. -To gain a superuser terminal with read/write access to the filesystem, type these commands: +To gain a superuser terminal, use SSH : -```shell -student@tmp-hostname:~$ su - -Password: -root@tmp-hostname:~# overlayroot-chroot +```console +user@remote:~$ ssh -p521 root@IP_ADDRESS +``` + +To gain access with read/write access to the filesystem, use this command : + +```console +root@ubuntu:~# overlayroot-chroot +INFO: Chrooting into [/media/root-ro] +root@ubuntu:/# ``` diff --git a/docs/usb-configuration.md b/docs/usb-configuration.md new file mode 100644 index 000000000..4a530532f --- /dev/null +++ b/docs/usb-configuration.md @@ -0,0 +1,44 @@ +# USB CONFIGURATION + +Requirements : + +1. 32 GB +2. interface type: 3.0 + +Follow the steps : + +> Execute the "disks" program + +![img1](img/usb-configuration/1.png) + +> Choose the usb drive to configure and press format disk + +![img2](img/usb-configuration/2.png) + +> Choose "Compatible with modern systems and hard disks > 2TB(GPT)" + +![img3](img/usb-configuration/3.png) + +![img4](img/usb-configuration/4.png) + +> Create new partition (size == all memory) + +![img5](img/usb-configuration/5.png) + +> Volume name: any +> Erase: none +> Type: other + +![img6](img/usb-configuration/6.png) + +> Choose F2FS + +![img7](img/usb-configuration/7.png) + +> Format created partition + +![img8](img/usb-configuration/8.png) + +> The new name must be 01-home + +![img9](img/usb-configuration/9.png) diff --git a/scripts/dconfig.txt b/scripts/dconfig.txt index fb66080cc..fcabcd7c4 100644 --- a/scripts/dconfig.txt +++ b/scripts/dconfig.txt @@ -67,6 +67,7 @@ default-size-columns=160 [org/gnome/desktop/background] show-desktop-icons=false +picture-uri='file:///usr/share/backgrounds/01/wallpaper.png' [org/gnome/desktop/peripherals/mouse] accel-profile='flat' @@ -115,7 +116,7 @@ ambient-enabled=false [org/gnome/shell] enable-hot-corners=true -favorite-apps=['firefox.desktop', 'org.gnome.Nautilus.desktop', 'org.gnome.Terminal.desktop', 'sublime_text.desktop', 'vscodium.desktop', 'org.gnome.Calculator.desktop', 'gnome-control-center.desktop', 'org.gnome.tweaks.desktop', 'lock_screen.desktop', 'suspend_session.desktop', 'yelp.desktop'] +favorite-apps=['firefox.desktop', 'org.gnome.Nautilus.desktop', 'org.gnome.Terminal.desktop', 'sublime_text.desktop', 'codium.desktop', 'org.gnome.Calculator.desktop', 'gnome-control-center.desktop', 'org.gnome.tweaks.desktop', 'lock_screen.desktop', 'suspend_session.desktop', 'yelp.desktop'] [org/gnome/system/location] enabled=false diff --git a/scripts/grub.sh b/scripts/grub.sh index ad7678119..502f8e430 100755 --- a/scripts/grub.sh +++ b/scripts/grub.sh @@ -8,8 +8,6 @@ cd $SCRIPT_DIR DISK=$1 -apt-get -y install grub-efi-amd64 - sed -i -e 's/message=/message_null=/g' /etc/grub.d/10_linux cat <> /etc/default/grub diff --git a/scripts/install_client.sh b/scripts/install_client.sh index a5d2db866..b36df9a3d 100755 --- a/scripts/install_client.sh +++ b/scripts/install_client.sh @@ -9,13 +9,6 @@ SCRIPT_DIR="$(cd -P "$(dirname "$BASH_SOURCE")" && pwd)" cd $SCRIPT_DIR . set.sh -# Set root password -passwd root - -# Remove user password -passwd -d student -cp /etc/shadow /etc/shadow- - SSH_PORT=521 DISK=$(lsblk -o tran,kname,hotplug,type,fstype -pr | grep -e nvme -e sata | @@ -24,10 +17,26 @@ DISK=$(lsblk -o tran,kname,hotplug,type,fstype -pr | sort | head -n1) +systemctl stop unattended-upgrades.service + +sgdisk -n0:0:+32G "$DISK" +sgdisk -N0 "$DISK" +sgdisk -c3:01-tmp-home "$DISK" +sgdisk -c4:01-tmp-system "$DISK" + apt-get update apt-get -y upgrade apt-get -y autoremove --purge +# Remove outdated kernels +old_kernels=$(ls -1 /boot/config-* | sed '$d' | xargs -n1 basename | cut -d- -f2,3) + +for old_kernel in $old_kernels; do + dpkg -P $(dpkg-query -f '${binary:Package}\n' -W *"$old_kernel"*) +done + +apt-get -yf install + . bash_tweaks.sh . ssh.sh . firewall.sh @@ -38,6 +47,7 @@ apt-get -y autoremove --purge . fx.sh . sublime.sh . vscode.sh +. libreoffice.sh # Install additional packages PKGS=" @@ -60,23 +70,51 @@ rm /usr/share/initramfs-tools/hooks/fsck cp -r system /tmp cd /tmp/system -sed -i -e "s|::DISK::|$DISK|g" etc/udev/rules.d/10-local.rules - -PART=$(lsblk -pro kname,partlabel | grep 01-tmp-system | cut -d' ' -f1) -sed -i -e "s|::PART::|$PART|g" usr/share/initramfs-tools/scripts/init-premount/reformat -apt-get -y install overlayroot -echo overlayroot=\"device:dev=$PART,recurse=0\" >> /etc/overlayroot.conf +# Overwrite with custom files from Git repository +if test -v OVERWRITE; then + folder=$(echo "$OVERWRITE" | cut -d';' -f1) + url=$(echo "$OVERWRITE" | cut -d';' -f2) + if git ls-remote -q "$url" &>/dev/null; then + tmp=$(mktemp -d) + git clone --depth 1 "$url" "$tmp" + rm -rf "$tmp"/.git + cp -aT "$tmp" "$folder" + rm -rf "$tmp" + fi +fi # Fix permissions find . -type d -exec chmod 755 {} \; find . -type f -exec chmod 644 {} \; find . -type f -exec /bin/sh -c "file {} | grep -q 'shell script' && chmod +x {}" \; +find . -type f -exec /bin/sh -c "file {} | grep -q 'public key' && chmod 400 {}" \; + +sed -i -e "s|::DISK::|$DISK|g" etc/udev/rules.d/10-local.rules + +# Generate wallpaper +cd usr/share/backgrounds/01 +test ! -e wallpaper.png && composite logo.png background.png wallpaper.png +cd /tmp/system + cp --preserve=mode -RT . / cd $SCRIPT_DIR rm -rf /tmp/system +apt-get -y install overlayroot +echo overlayroot=\"device:dev=/dev/disk/by-partlabel/01-tmp-system,recurse=0\" >> /etc/overlayroot.conf + update-initramfs -u +# Remove root & user password +passwd -d root +passwd -d student +cp /etc/shadow /etc/shadow- + +# Remove user abilities +gpasswd -d student sudo +gpasswd -d student lpadmin +gpasswd -d student sambashare + . clean.sh diff --git a/scripts/kickstart.sh b/scripts/kickstart.sh new file mode 100755 index 000000000..20c48811c --- /dev/null +++ b/scripts/kickstart.sh @@ -0,0 +1,48 @@ +#!/usr/bin/env bash + +# Run me with: +# +# bash <(curl -Ss raw.githubusercontent.com/01-edu/public/master/scripts/kickstart.sh) + +# Treat unset variables as an error when substituting. +set -u + +# Exit immediately if a command exits with a non-zero status. +set -e + +# Set the variable corresponding to the return value of a pipeline is the status +# of the last command to exit with a non-zero status, or zero if no command +# exited with a non-zero status +set -o pipefail + +# Separate tokens on newlines only +IFS=' +' + +# The value of this parameter is expanded like PS1 and the expanded value is the +# prompt printed before the command line is echoed when the -x option is set +# (see The Set Builtin). The first character of the expanded value is replicated +# multiple times, as necessary, to indicate multiple levels of indirection. +# \D{%F %T} prints date like this : 2019-12-31 23:59:59 +PS4='-\D{%F %T} ' + +# Print commands and their arguments as they are executed. +set -x + +# Skip dialogs during apt-get install commands +export DEBIAN_FRONTEND=noninteractive # DEBIAN_PRIORITY=critical + +gsettings set org.gnome.desktop.session idle-delay 0 +gsettings set org.gnome.desktop.screensaver lock-enabled false + +cd +wget github.com/01-edu/public/archive/master.zip +unzip master.zip + +cd public-master/scripts +sudo -E ./install_client.sh +cat dconfig.txt | dconf load / + +cd +rm -rf master.zip public-master +reboot diff --git a/scripts/libreoffice.sh b/scripts/libreoffice.sh new file mode 100755 index 000000000..6d39a3524 --- /dev/null +++ b/scripts/libreoffice.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +# Install VSCode + +SCRIPT_DIR="$(cd -P "$(dirname "$BASH_SOURCE")" && pwd)" +cd $SCRIPT_DIR +. set.sh + +apt-get -y install libreoffice diff --git a/scripts/nodejs.sh b/scripts/nodejs.sh index c08f012a9..9aa678e3d 100755 --- a/scripts/nodejs.sh +++ b/scripts/nodejs.sh @@ -6,5 +6,5 @@ SCRIPT_DIR="$(cd -P "$(dirname "$BASH_SOURCE")" && pwd)" cd $SCRIPT_DIR . set.sh -curl -sL https://deb.nodesource.com/setup_10.x | bash - +curl -sL https://deb.nodesource.com/setup_12.x | bash - apt-get -y install nodejs diff --git a/scripts/preseed.cfg b/scripts/preseed.cfg new file mode 100644 index 000000000..5fdd31b57 --- /dev/null +++ b/scripts/preseed.cfg @@ -0,0 +1,21 @@ +# d-i debconf/priority select critical + +d-i anna/choose_modules string network-console +d-i preseed/early_command string anna-install network-console +d-i network-console/authorized_keys_url string https://raw.githubusercontent.com/xpetit/.ssh/master/id_ed25519.pub +d-i network-console/password-disabled boolean true + +d-i debian-installer/locale string en_US +d-i console-keymaps-at/keymap select us +d-i keyboard-configuration/xkb-keymap select us + +d-i mirror/country string manual +d-i mirror/http/hostname string deb.debian.org +d-i mirror/http/directory string /debian +d-i mirror/http/proxy string + +#d-i netcfg/choose_interface select auto +#d-i netcfg/get_hostname string debian +#d-i netcfg/get_domain string local + +d-i hw-detect/load_firmware boolean true diff --git a/scripts/ssh.sh b/scripts/ssh.sh index 3e0a56771..e0f8a1b51 100755 --- a/scripts/ssh.sh +++ b/scripts/ssh.sh @@ -16,10 +16,3 @@ Port $SSH_PORT PasswordAuthentication no AllowUsers root EOF - -mkdir -p /root/.ssh -chmod -f 700 /root/.ssh -# echo 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIH30lZP4V26RVWWvAW91jM7UBSN68+xkuJc5cRionpMc' >> /root/.ssh/authorized_keys -chmod -f 600 /root/.ssh/authorized_keys || true - -systemctl restart sshd.service diff --git a/scripts/system/etc/gdm3/PostLogin/Default b/scripts/system/etc/gdm3/PostLogin/Default index 904367da7..e2acb90fa 100755 --- a/scripts/system/etc/gdm3/PostLogin/Default +++ b/scripts/system/etc/gdm3/PostLogin/Default @@ -25,39 +25,24 @@ PS4='-\D{%F %T} ' # Print commands and their arguments as they are executed. set -x -sleep 0.5 - -# Find the removable F2FS partition -PART=$(lsblk -pro kname,partlabel | grep 01-home | cut -d' ' -f1) - # Make sure the mountpoints are free -( - lsof -t $HOME | xargs kill -9 - umount $HOME - umount /mnt -) || true - -if test "$PART" -then - mount -o noatime "$PART" /mnt +kill $(lsof -t "$HOME" /mnt) ||: +umount "$HOME" /mnt ||: + +if test -e /dev/disk/by-partlabel/01-home; then + mount -o noatime /dev/disk/by-partlabel/01-home /mnt else - # No removable F2FS partition found - PART=$(lsblk -pro kname,partlabel | grep 01-tmp-home | cut -d' ' -f1) - - if test -z "$PART" - then - # No local partition found, error - exit 1 - fi - - # We don't care about data consistency since the partition is temporary - /sbin/mke2fs -t ext4 -O ^has_journal -F "$PART" - mount -o noatime,nobarrier "$PART" /mnt + # Fails if no local partition is found + test -e /dev/disk/by-partlabel/01-tmp-home || exit 1 + + # We don't care about data consistency since the partition is temporary so disable journaling + /sbin/mke2fs -t ext4 -O ^has_journal -F /dev/disk/by-partlabel/01-tmp-home + mount -o noatime,nobarrier /dev/disk/by-partlabel/01-tmp-home /mnt fi -USER_PATH=/mnt/.01/$USER -TEMP_PATH=/mnt/.01/tmp +user_path=/mnt/.01/user +temp_path=/mnt/.01/tmp -mkdir -p $USER_PATH $TEMP_PATH -chown -R $USER:$USER $USER_PATH $TEMP_PATH -mount -t overlay -o lowerdir=$HOME,upperdir=$USER_PATH,workdir=$TEMP_PATH overlay $HOME +mkdir -p "$user_path" "$temp_path" +chown -R "$USER":"$USER" "$user_path" "$temp_path" +mount -t overlay -o lowerdir="$HOME",upperdir="$user_path",workdir="$temp_path" overlay "$HOME" diff --git a/scripts/system/etc/gdm3/PostSession/Default b/scripts/system/etc/gdm3/PostSession/Default index 034bd6a80..21aba95dc 100755 --- a/scripts/system/etc/gdm3/PostSession/Default +++ b/scripts/system/etc/gdm3/PostSession/Default @@ -16,9 +16,11 @@ PS4='-\D{%F %T} ' # Print commands and their arguments as they are executed. set -x -passwd -d $USER -sync -sleep 0.5 -lsof -t $HOME | xargs kill || true -umount -l $HOME -umount -l /mnt +passwd -d "$USER" ||: +systemctl stop user@1000.service + +# Make sure the mountpoints are free +kill $(lsof -t "$HOME" /mnt) $(ps --no-headers -u "$USER" -o pid) +umount "$HOME" /mnt +umount /dev/disk/by-partlabel/01-home ||: +wipefs -a /dev/disk/by-partlabel/01-tmp-home diff --git a/scripts/system/usr/share/backgrounds/01/background.png b/scripts/system/usr/share/backgrounds/01/background.png new file mode 100644 index 000000000..2a06dfb7b Binary files /dev/null and b/scripts/system/usr/share/backgrounds/01/background.png differ diff --git a/scripts/system/usr/share/backgrounds/01/logo.png b/scripts/system/usr/share/backgrounds/01/logo.png new file mode 100644 index 000000000..719b8a659 Binary files /dev/null and b/scripts/system/usr/share/backgrounds/01/logo.png differ diff --git a/scripts/system/usr/share/initramfs-tools/scripts/init-premount/reformat b/scripts/system/usr/share/initramfs-tools/scripts/init-premount/reformat index 4a04b9924..3464ead80 100755 --- a/scripts/system/usr/share/initramfs-tools/scripts/init-premount/reformat +++ b/scripts/system/usr/share/initramfs-tools/scripts/init-premount/reformat @@ -15,6 +15,6 @@ esac . /scripts/functions -/bin/mke2fs -F -t ext4 -O ^has_journal ::PART:: > /dev/null 2>&1 +/bin/mke2fs -F -t ext4 -O ^has_journal /dev/disk/by-partlabel/01-tmp-system > /dev/null 2>&1 exit 0 diff --git a/scripts/ubuntu_tweaks.sh b/scripts/ubuntu_tweaks.sh index 48f5d1a7b..2209d28ae 100755 --- a/scripts/ubuntu_tweaks.sh +++ b/scripts/ubuntu_tweaks.sh @@ -39,6 +39,7 @@ swapoff /swapfile || true rm -f /swapfile sed -i '/swapfile/d' /etc/fstab + # Purge unused Ubuntu packages PKGS=" apport @@ -87,7 +88,6 @@ systemctl disable $SERVICES SERVICES=" grub-common.service -NetworkManager-wait-online.service plymouth-quit-wait.service " systemctl mask $SERVICES @@ -104,6 +104,7 @@ gnome-calculator gnome-system-monitor gnome-tweaks i3lock +imagemagick mpv zenity " diff --git a/subjects/abort.en.md b/subjects/abort.en.md index c9cfb12f4..1eb4398b8 100644 --- a/subjects/abort.en.md +++ b/subjects/abort.en.md @@ -33,8 +33,8 @@ func main() { And its output : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test 5 -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/abort.fr.md b/subjects/abort.fr.md index 16951323e..bb6722fc2 100644 --- a/subjects/abort.fr.md +++ b/subjects/abort.fr.md @@ -33,8 +33,8 @@ func main() { Et son résultat : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test 5 -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/activebits.en.md b/subjects/activebits.en.md index 44c5220d2..7c4217fef 100644 --- a/subjects/activebits.en.md +++ b/subjects/activebits.en.md @@ -33,8 +33,8 @@ func main() { And its output : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test 3 -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/activebits.fr.md b/subjects/activebits.fr.md index 24e9de392..4ae7c03c9 100644 --- a/subjects/activebits.fr.md +++ b/subjects/activebits.fr.md @@ -33,8 +33,8 @@ func main() { Et son résultat : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test 3 -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/addprimesum.en.md b/subjects/addprimesum.en.md index baa1cf9a9..10b6de75d 100644 --- a/subjects/addprimesum.en.md +++ b/subjects/addprimesum.en.md @@ -2,19 +2,19 @@ ### Instructions -Write a program that takes a positive integer as argument and displays the sum of all prime numbers inferior or equal to it followed by a newline. +Write a program that takes a positive integer as argument and displays the sum of all prime numbers inferior or equal to it followed by a newline(`'\n`'). -- If the number of arguments is not 1, or if the argument is not a positive number, the program displays 0 followed by a newline. +- If the number of arguments is different from 1, or if the argument is not a positive number, the program displays `0` followed by a newline. -Examples of outputs : +### Usage ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test 5 +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test 5 10 -student@ubuntu:~/piscine/test$ ./test 7 +student@ubuntu:~/piscine-go/test$ ./test 7 17 -student@ubuntu:~/piscine/test$ ./test 57 +student@ubuntu:~/piscine-go/test$ ./test 57 0 -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/addprimesum.fr.md b/subjects/addprimesum.fr.md index baa1cf9a9..4c8266a4b 100644 --- a/subjects/addprimesum.fr.md +++ b/subjects/addprimesum.fr.md @@ -2,19 +2,19 @@ ### Instructions -Write a program that takes a positive integer as argument and displays the sum of all prime numbers inferior or equal to it followed by a newline. +Écrire un programme qui prend un entier positif comme argument et qui affiche la somme de tous les nombres premiers inférieurs ou égaux à celui-ci, suivie d'un newline(`'\n`'). -- If the number of arguments is not 1, or if the argument is not a positive number, the program displays 0 followed by a newline. +- Si le nombre d'arguments est différent de 1, ou si l'argument n'est pas un nombre positif, le programme affiche `0` suivi d'un newline. -Examples of outputs : +### Utilisation ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test 5 +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test 5 10 -student@ubuntu:~/piscine/test$ ./test 7 +student@ubuntu:~/piscine-go/test$ ./test 7 17 -student@ubuntu:~/piscine/test$ ./test 57 +student@ubuntu:~/piscine-go/test$ ./test 57 0 -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/advancedsortwordarr.en.md b/subjects/advancedsortwordarr.en.md index c51dc1f0c..09c162959 100644 --- a/subjects/advancedsortwordarr.en.md +++ b/subjects/advancedsortwordarr.en.md @@ -35,8 +35,8 @@ func main() { And its output : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test [1 2 3 A B C a b c] -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/advancedsortwordarr.fr.md b/subjects/advancedsortwordarr.fr.md index ba52968aa..4d13440d9 100644 --- a/subjects/advancedsortwordarr.fr.md +++ b/subjects/advancedsortwordarr.fr.md @@ -35,8 +35,8 @@ func main() { Et son résultat : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test [1 2 3 A B C a b c] -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/alphamirror.en.md b/subjects/alphamirror.en.md index 96058e434..ccac3f433 100644 --- a/subjects/alphamirror.en.md +++ b/subjects/alphamirror.en.md @@ -13,7 +13,7 @@ The case of the letter stays the same, for example : The final result will be followed by a newline(`'\n'`). -If the number of arguments is not 1, the program displays only a newline(`'\n'`). +If the number of arguments is different from 1, the program displays only a newline(`'\n'`). ### Usage diff --git a/subjects/alphamirror.fr.md b/subjects/alphamirror.fr.md index ed8f0cc65..21213e927 100644 --- a/subjects/alphamirror.fr.md +++ b/subjects/alphamirror.fr.md @@ -11,7 +11,7 @@ Les majuscules restent des majuscules, de même pour le minuscules, par exemple Le résultat final sera suivi d'un newline(`'\n'`). -Si le nombre d'arguments n'est pas 1, le programme affiche seulement un newline(`'\n'`). +Si le nombre d'arguments est différent de 1, le programme affiche seulement un newline(`'\n'`). ### Utilisation diff --git a/subjects/any.en.md b/subjects/any.en.md index 4f94fdad1..303eb64fa 100644 --- a/subjects/any.en.md +++ b/subjects/any.en.md @@ -40,9 +40,9 @@ func main() { And its output : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test false true -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/any.fr.md b/subjects/any.fr.md index 77afa5a14..c1312a2ac 100644 --- a/subjects/any.fr.md +++ b/subjects/any.fr.md @@ -40,9 +40,9 @@ func main() { Et son résultat : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test false true -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/appendrange.en.md b/subjects/appendrange.en.md index a521a7087..71b7cd75e 100644 --- a/subjects/appendrange.en.md +++ b/subjects/appendrange.en.md @@ -40,9 +40,9 @@ func main() { And its output : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test [5 6 7 8 9] [] -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/appendrange.fr.md b/subjects/appendrange.fr.md index 801e060f6..c0c31179a 100644 --- a/subjects/appendrange.fr.md +++ b/subjects/appendrange.fr.md @@ -39,9 +39,9 @@ func main() { Et son résultat : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test [5 6 7 8 9] [] -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/atoi.en.md b/subjects/atoi.en.md index 64271f6d3..33fff5d9e 100644 --- a/subjects/atoi.en.md +++ b/subjects/atoi.en.md @@ -4,13 +4,13 @@ - Write a [function](TODO-LINK) that simulates the behaviour of the `Atoi` function in Go. `Atoi` transforms a number represented as a `string` in a number represented as an `int`. -- Atoi returns `0` if the `string` is not considered as a valid number. For this exercise **non-valid `string` chains will be tested**. Some will contain non-digits characters. +- `Atoi` returns `0` if the `string` is not considered as a valid number. For this exercise **non-valid `string` chains will be tested**. Some will contain non-digits characters. - For this exercise the handling of the signs + or - **does have** to be taken into account. - This function will **only** have to return the `int` `nbr`. For this exercise the `error` return of atoi is not required. -### Format required +### Expected function ```go func Atoi(s string) int { @@ -63,8 +63,8 @@ func main() { And its output : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test 12345 12345 0 @@ -73,5 +73,5 @@ student@ubuntu:~/piscine/test$ ./test -1234 0 0 -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/atoi.fr.md b/subjects/atoi.fr.md index 4ccbff94c..ae3be54a3 100644 --- a/subjects/atoi.fr.md +++ b/subjects/atoi.fr.md @@ -2,9 +2,9 @@ ### Instructions -- Écrire une fonction qui reproduit le comportement de la fonction atoi en Go. Atoi transforme un nombre représenté en `string` (chaîne de caractères) en `int` (entier). +- Écrire une fonction qui reproduit le comportement de la fonction `Atoi` en Go. `Atoi` transforme un nombre représenté en `string` (chaîne de caractères) en `int` (entier). -- Atoi retourne `0` si la `string` n'est pas considéré un nombre valide. Pour cet exercice des **`string` non valides seront testées!**. Certaines contiendront d'autres charactères que des chiffres. +- `Atoi` retourne `0` si la `string` n'est pas considéré un nombre valide. Pour cet exercice des **`string` non valides seront testées!**. Certaines contiendront d'autres caractères que des chiffres. - Pour cet exercice la gestion des signes + ou - **doit être** prise en compte. @@ -63,8 +63,8 @@ func main() { Et son résultat : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test 12345 12345 0 @@ -73,5 +73,5 @@ student@ubuntu:~/piscine/test$ ./test -1234 0 0 -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/atoibase.en.md b/subjects/atoibase.en.md index f582db427..94fa2534c 100644 --- a/subjects/atoibase.en.md +++ b/subjects/atoibase.en.md @@ -48,12 +48,12 @@ func main() { And its output : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test 125 125 125 125 0 -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/atoibase.fr.md b/subjects/atoibase.fr.md index a69605619..3d67678ef 100644 --- a/subjects/atoibase.fr.md +++ b/subjects/atoibase.fr.md @@ -2,15 +2,15 @@ ### Instructions -Écrire une fonction qui prend un nombre `string` et sa base `string` en paramètres et retournes sa convertion en `int`. +Écrire une fonction qui prend un nombre `string` et sa base `string` en paramètres et retourne sa conversion en `int`. -Si la base n'est pas valide elle retournes `0`: +Si la base n'est pas valide elle retourne `0`: -Régles de validité d'une base : +Règles de validité d'une base : -- Une base doit contenir au moins 2 charactères. -- Chaque charactère d'une base doit être unique. -- Une base ne doit pas contenir les charactères `+` ou `-`. +- Une base doit contenir au moins 2 caractères. +- Chaque caractère d'une base doit être unique. +- Une base ne doit pas contenir les caractères `+` ou `-`. Seuls des nombres en `string` valides seront testés. @@ -48,12 +48,12 @@ func main() { Et son résultat : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test 125 125 125 125 0 -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/basicatoi.en.md b/subjects/basicatoi.en.md index 37685d334..c56fadc50 100644 --- a/subjects/basicatoi.en.md +++ b/subjects/basicatoi.en.md @@ -48,10 +48,10 @@ func main() { And its output : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test 12345 12345 0 -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/basicatoi.fr.md b/subjects/basicatoi.fr.md index 1f9f02836..d2eba2111 100644 --- a/subjects/basicatoi.fr.md +++ b/subjects/basicatoi.fr.md @@ -48,10 +48,10 @@ func main() { Et son résultat : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test 12345 12345 0 -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/basicatoi2.en.md b/subjects/basicatoi2.en.md index 16ba8ed3c..5472c6f62 100644 --- a/subjects/basicatoi2.en.md +++ b/subjects/basicatoi2.en.md @@ -52,11 +52,11 @@ func main() { And its output : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test 12345 12345 0 0 -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/basicatoi2.fr.md b/subjects/basicatoi2.fr.md index 7c9e01136..e6be4da4d 100644 --- a/subjects/basicatoi2.fr.md +++ b/subjects/basicatoi2.fr.md @@ -4,7 +4,7 @@ - Écrire une fonction qui reproduit le comportement de la fonction atoi en Go. Atoi transforme un nombre représenté en `string` (chaîne de caractères) en `int` (entier). -- Atoi retourne `0` si la `string` n'est pas considéré un nombre valide. Pour cet exercice des **`string` non valides seront testées!**. Certaines contiendront d'autres charactères que des chiffres. +- Atoi retourne `0` si la `string` n'est pas considérée comme un nombre valide. Pour cet exercice des **`string` non valides seront testées!**. Certaines contiendront d'autres caractères que des chiffres. - Pour cet exercice la gestion des signes + ou - ne doit pas être prise en compte. @@ -52,11 +52,11 @@ func main() { Et son résultat : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test 12345 12345 0 0 -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/basicjoin.en.md b/subjects/basicjoin.en.md index b1cfa29c9..ee43d8bb0 100644 --- a/subjects/basicjoin.en.md +++ b/subjects/basicjoin.en.md @@ -33,8 +33,8 @@ func main() { And its output : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test Hello! How are you? -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/basicjoin.fr.md b/subjects/basicjoin.fr.md index 8b1921c04..4f93ea566 100644 --- a/subjects/basicjoin.fr.md +++ b/subjects/basicjoin.fr.md @@ -33,8 +33,8 @@ func main() { Et son résultat : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test Hello! How are you? -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/brackets.en.md b/subjects/brackets.en.md index 9b981d461..ac1d20995 100644 --- a/subjects/brackets.en.md +++ b/subjects/brackets.en.md @@ -2,23 +2,20 @@ ### Instructions -Write a program that takes an undefined number of strings in arguments. For each -argument, the program prints on the standard output "OK" followed by a newline -if the expression is correctly bracketed, otherwise it prints "Error" followed by +Write a program that takes an undefined number of `strings` in arguments. For each +argument, if the expression is correctly bracketed, the program prints on the standard output `OK` followed by a newline(`'\n'`), otherwise it prints "Error" followed by a newline. - -Symbols considered as `brackets` are brackets `(` and `)`, square brackets `[` -and `]`and braces `{` and `}`. Every other symbols are simply ignored. +Symbols considered as `brackets` are parentheses `(` and `)`, square brackets `[` +and `]` and curly braces `{` and `}`. Every other symbols are simply ignored. An opening bracket must always be closed by the good closing bracket in the -correct order. A string which do not contains any bracket is considered as a -correctly bracketed string. - -If there is no arguments, the program must print only a newline. +correct order. A `string` which does not contain any bracket is considered as a +correctly bracketed `string`. +If there is no argument, the program must print only a newline. -Examples of outputs : +### Usage ```console student@ubuntu:~/student/brackets$ go build diff --git a/subjects/brackets.fr.md b/subjects/brackets.fr.md index 9b981d461..d0fc3bd5d 100644 --- a/subjects/brackets.fr.md +++ b/subjects/brackets.fr.md @@ -2,23 +2,17 @@ ### Instructions -Write a program that takes an undefined number of strings in arguments. For each -argument, the program prints on the standard output "OK" followed by a newline -if the expression is correctly bracketed, otherwise it prints "Error" followed by -a newline. +Écrire un programme qui prend un nombre indéfini de `strings` en arguments. Pour chaque +argument, si l'expression est correctement "entre parenthèses" (bracketed), le programme affiche sur la sortie standard `OK` suivi d'un newline(`'\n'`), autrement il affiche `Error` suivi d'un newline. +Les symboles considérés comme des `parenthèses` sont les parenthèses `(` et `)`, les crochets `[` +et `]` et les accolades `{` et `}`. Tout autre symbole est simplement ignoré. -Symbols considered as `brackets` are brackets `(` and `)`, square brackets `[` -and `]`and braces `{` and `}`. Every other symbols are simply ignored. +Une parenthèse ouvrante doit toujours être fermée par la parenthèse correspondante dans l'ordre correct. Une `string` qui ne contient aucune parenthèse est considérée comme une `string` correctement "entre parenthèses". -An opening bracket must always be closed by the good closing bracket in the -correct order. A string which do not contains any bracket is considered as a -correctly bracketed string. +Si il n'y a pas d'argument, le programme affiche seulement un newline. -If there is no arguments, the program must print only a newline. - - -Examples of outputs : +### Utilisation ```console student@ubuntu:~/student/brackets$ go build diff --git a/subjects/brainfuck.en.md b/subjects/brainfuck.en.md index 8964585b5..a42af67a7 100644 --- a/subjects/brainfuck.en.md +++ b/subjects/brainfuck.en.md @@ -2,12 +2,12 @@ ### Instructions -Write a Brainfuck interpreter program. +Write a `Brainfuck` interpreter program. The source code will be given as first parameter. -The code will always be valid, with no more than 4096 operations. -Brainfuck is a minimalist language. It consists of an array of bytes -(in our case, let's say 2048 bytes) initialized to zero, -and a pointer to its first byte. +The code will always be valid, with less than 4096 operations. +`Brainfuck` is a minimalist language. It consists of an array of bytes +(in this exercice 2048 bytes) all initialized with zero, +and with a pointer to its first byte. Every operator consists of a single character : @@ -16,12 +16,12 @@ Every operator consists of a single character : - '+' increment the pointed byte ; - '-' decrement the pointed byte ; - '.' print the pointed byte on standard output ; -- '[' go to the matching ']' if the pointed byte is 0 (while start) ; -- ']' go to the matching '[' if the pointed byte is not 0 (while end). +- '[' go to the matching ']' if the pointed byte is 0 (loop start) ; +- ']' go to the matching '[' if the pointed byte is not 0 (loop end). Any other character is a comment. -Examples of outputs : +### Usage ```console student@ubuntu:~/student/brainfuck$ go build diff --git a/subjects/brainfuck.fr.md b/subjects/brainfuck.fr.md index 8964585b5..c69935bd5 100644 --- a/subjects/brainfuck.fr.md +++ b/subjects/brainfuck.fr.md @@ -2,26 +2,26 @@ ### Instructions -Write a Brainfuck interpreter program. -The source code will be given as first parameter. -The code will always be valid, with no more than 4096 operations. -Brainfuck is a minimalist language. It consists of an array of bytes -(in our case, let's say 2048 bytes) initialized to zero, -and a pointer to its first byte. +Écrire un program interpréteur du `Brainfuck`. +Le code source sera donné en premier paramètre. +Le code sera toujours valide, avec moins de 4096 operations. +Le `Brainfuck` est un langage minimaliste. Il consiste en un slice de bytes (octet) +(dans cet exercise 2048 bytes) tous initialisés à zéro, +et avec un pointeur sur le premier byte. -Every operator consists of a single character : +Chaque opérateur consiste en un seul caractère : -- '>' increment the pointer ; -- '<' decrement the pointer ; -- '+' increment the pointed byte ; -- '-' decrement the pointed byte ; -- '.' print the pointed byte on standard output ; -- '[' go to the matching ']' if the pointed byte is 0 (while start) ; -- ']' go to the matching '[' if the pointed byte is not 0 (while end). +- '>' incrémente le pointeur ; +- '<' décrémente le pointeur ; +- '+' incrémente le byte pointé ; +- '-' décrémente le byte pointé ; +- '.' affiche le byte pointé sur la sortie standard ; +- '[' se rend à son ']' correspondant si le byte pointé est 0 (début de la boucle) ; +- ']' se rend à son '[' correspondant si le byte pointé n'est pas 0 (fin de la boucle). -Any other character is a comment. +Tout autre caractère est un commentaire. -Examples of outputs : +### Utilisation ```console student@ubuntu:~/student/brainfuck$ go build diff --git a/subjects/btreeapplybylevel.en.md b/subjects/btreeapplybylevel.en.md index 37547bb50..942ab89a1 100644 --- a/subjects/btreeapplybylevel.en.md +++ b/subjects/btreeapplybylevel.en.md @@ -7,7 +7,7 @@ Write a function, `BTreeApplyByLevel`, that applies the function given by `fn` t ### Expected function ```go -func BTreeApplyByLevel(root *TreeNode, fn interface{}) { +func BTreeApplyByLevel(root *TreeNode, f func(...interface{}) (int, error)) { } ``` diff --git a/subjects/btreeapplyinorder.en.md b/subjects/btreeapplyinorder.en.md index 0318f9ab6..540394858 100644 --- a/subjects/btreeapplyinorder.en.md +++ b/subjects/btreeapplyinorder.en.md @@ -38,11 +38,11 @@ func main() { And its output : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test 1 4 5 7 -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/btreeapplyinorder.fr.md b/subjects/btreeapplyinorder.fr.md index d37414197..e633a5763 100644 --- a/subjects/btreeapplyinorder.fr.md +++ b/subjects/btreeapplyinorder.fr.md @@ -38,11 +38,11 @@ func main() { Et son résultat : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test 1 4 5 7 -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/btreeapplypostorder.en.md b/subjects/btreeapplypostorder.en.md index 0a6b7a095..dafba8b07 100644 --- a/subjects/btreeapplypostorder.en.md +++ b/subjects/btreeapplypostorder.en.md @@ -37,11 +37,11 @@ func main() { And its output : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test 1 5 7 4 -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/btreeapplypostorder.fr.md b/subjects/btreeapplypostorder.fr.md index 8d6d596e7..320e14929 100644 --- a/subjects/btreeapplypostorder.fr.md +++ b/subjects/btreeapplypostorder.fr.md @@ -37,11 +37,11 @@ func main() { Et son résultat : ```console -student@ubuntu:~/piscine/btreeinsertdata$ go build -student@ubuntu:~/piscine/btreeinsertdata$ ./btreeinsertdata +student@ubuntu:~/piscine-go/btreeinsertdata$ go build +student@ubuntu:~/piscine-go/btreeinsertdata$ ./btreeinsertdata 1 5 7 4 -student@ubuntu:~/piscine/btreeinsertdata$ +student@ubuntu:~/piscine-go/btreeinsertdata$ ``` diff --git a/subjects/btreeapplypreorder.en.md b/subjects/btreeapplypreorder.en.md index 3fe6b3143..3a00e4629 100644 --- a/subjects/btreeapplypreorder.en.md +++ b/subjects/btreeapplypreorder.en.md @@ -37,11 +37,11 @@ func main() { And its output : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test 4 1 7 5 -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/btreeapplypreorder.fr.md b/subjects/btreeapplypreorder.fr.md index 8eba30056..ff1310076 100644 --- a/subjects/btreeapplypreorder.fr.md +++ b/subjects/btreeapplypreorder.fr.md @@ -37,11 +37,11 @@ func main() { Et son résultat : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test 4 1 7 5 -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/btreeinsertdata.en.md b/subjects/btreeinsertdata.en.md index 2125affc0..df65e8eea 100644 --- a/subjects/btreeinsertdata.en.md +++ b/subjects/btreeinsertdata.en.md @@ -47,11 +47,11 @@ func main() { And its output : ```console -student@ubuntu:~/piscine/btreeinsertdata$ go build -student@ubuntu:~/piscine/btreeinsertdata$ ./btreeinsertdata +student@ubuntu:~/piscine-go/btreeinsertdata$ go build +student@ubuntu:~/piscine-go/btreeinsertdata$ ./btreeinsertdata 1 4 5 7 -student@ubuntu:~/piscine/btreeinsertdata$ +student@ubuntu:~/piscine-go/btreeinsertdata$ ``` diff --git a/subjects/btreeinsertdata.fr.md b/subjects/btreeinsertdata.fr.md index 76899a1c1..af21d518e 100644 --- a/subjects/btreeinsertdata.fr.md +++ b/subjects/btreeinsertdata.fr.md @@ -46,11 +46,11 @@ func main() { Et son résultat : ```console -student@ubuntu:~/piscine/btreeinsertdata$ go build -student@ubuntu:~/piscine/btreeinsertdata$ ./btreeinsertdata +student@ubuntu:~/piscine-go/btreeinsertdata$ go build +student@ubuntu:~/piscine-go/btreeinsertdata$ ./btreeinsertdata 1 4 5 7 -student@ubuntu:~/piscine/btreeinsertdata$ +student@ubuntu:~/piscine-go/btreeinsertdata$ ``` diff --git a/subjects/btreeprintroot.en.md b/subjects/btreeprintroot.en.md index 68c311704..10cd6dd90 100644 --- a/subjects/btreeprintroot.en.md +++ b/subjects/btreeprintroot.en.md @@ -38,10 +38,10 @@ func main() { And its output : ```console -student@ubuntu:~/piscine/printroot$ go build -student@ubuntu:~/piscine/printroot$ ./printroot +student@ubuntu:~/piscine-go/printroot$ go build +student@ubuntu:~/piscine-go/printroot$ ./printroot who are you -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/btreeprintroot.fr.md b/subjects/btreeprintroot.fr.md index 4b6da978b..7f3894601 100644 --- a/subjects/btreeprintroot.fr.md +++ b/subjects/btreeprintroot.fr.md @@ -38,10 +38,10 @@ func main() { Et son résultat : ```console -student@ubuntu:~/piscine/printroot$ go build -student@ubuntu:~/piscine/printroot$ ./printroot +student@ubuntu:~/piscine-go/printroot$ go build +student@ubuntu:~/piscine-go/printroot$ ./printroot who are you -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/btreesearchitem.en.md b/subjects/btreesearchitem.en.md index cc8c41053..475d3314c 100644 --- a/subjects/btreesearchitem.en.md +++ b/subjects/btreesearchitem.en.md @@ -63,11 +63,11 @@ func main() { And its output : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test Item selected -> 7 Parent of selected item -> 4 Left child of selected item -> 5 Right child of selected item -> nil -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/btreesearchitem.fr.md b/subjects/btreesearchitem.fr.md index bf5cf598d..4f378c84f 100644 --- a/subjects/btreesearchitem.fr.md +++ b/subjects/btreesearchitem.fr.md @@ -63,11 +63,11 @@ func main() { Et son résultat : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test Item selected -> 7 Parent of selected item -> 4 Left child of selected item -> 5 Right child of selected item -> nil -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/capitalize.en.md b/subjects/capitalize.en.md index 44f4d6472..2eb6efb41 100644 --- a/subjects/capitalize.en.md +++ b/subjects/capitalize.en.md @@ -34,8 +34,8 @@ func main() { And its output : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test Hello! How Are You? How+Are+Things+4you? -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/capitalize.fr.md b/subjects/capitalize.fr.md index 526660aa7..18c5348e7 100644 --- a/subjects/capitalize.fr.md +++ b/subjects/capitalize.fr.md @@ -2,7 +2,7 @@ ### Instructions -Écrire une fonction qui met en majuscule la premiere lettre de chaque mot et en minuscule les autres lettres du reste du mot d'une `string`. +Écrire une fonction qui met en majuscule la première lettre de chaque mot et en minuscule les autres lettres du reste du mot d'une `string`. Un mot est une suite de caractères **alphanumériques**. @@ -34,8 +34,8 @@ func main() { Et son résultat : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test Hello! How Are You? How+Are+Things+4you? -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/cl-camp2.en.md b/subjects/cl-camp2.en.md index 9f7e7cca2..3ac44176d 100644 --- a/subjects/cl-camp2.en.md +++ b/subjects/cl-camp2.en.md @@ -11,7 +11,7 @@ A line is a sequence of characters preceding the [end of line](https://en.wikipe ### Usage ```console -student@ubuntu:~/piscine/test$ cat -e r +student@ubuntu:~/piscine-go/test$ cat -e r R$ -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/cl-camp2.fr.md b/subjects/cl-camp2.fr.md index dfc323498..0d806145c 100644 --- a/subjects/cl-camp2.fr.md +++ b/subjects/cl-camp2.fr.md @@ -11,7 +11,7 @@ Une ligne est une suite de caractères précédant le caractère [fin de ligne]( ### Utilisation ```console -student@ubuntu:~/piscine/test$ cat -e r +student@ubuntu:~/piscine-go/test$ cat -e r R$ -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/cl-camp4.en.md b/subjects/cl-camp4.en.md index 0ffc7771b..8dfaed0a1 100644 --- a/subjects/cl-camp4.en.md +++ b/subjects/cl-camp4.en.md @@ -17,8 +17,8 @@ Create a file `myfamily.sh`, which will show a subject's family (key: relatives) ### Usage ```console -student@ubuntu:~/piscine/test$ export HERO_ID=1 -student@ubuntu:~/piscine/test$ ./myfamily.sh +student@ubuntu:~/piscine-go/test$ export HERO_ID=1 +student@ubuntu:~/piscine-go/test$ ./myfamily.sh Marlo Chandler-Jones (wife); Polly (aunt); Mrs. Chandler (mother-in-law); Keith Chandler, Ray Chandler, three unidentified others (brothers-in-law); unidentified father (deceased); Jackie Shorr (alleged mother; unconfirmed) -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/cl-camp4.fr.md b/subjects/cl-camp4.fr.md index de43b2004..2ae90dcb1 100644 --- a/subjects/cl-camp4.fr.md +++ b/subjects/cl-camp4.fr.md @@ -17,8 +17,8 @@ Créer un fichier `myfamily.sh`, qui affichera la famille d'un individu (clef: r ### Utilisation ```console -student@ubuntu:~/piscine/test$ export HERO_ID=1 -student@ubuntu:~/piscine/test$ ./myfamily.sh +student@ubuntu:~/piscine-go/test$ export HERO_ID=1 +student@ubuntu:~/piscine-go/test$ ./myfamily.sh Marlo Chandler-Jones (wife); Polly (aunt); Mrs. Chandler (mother-in-law); Keith Chandler, Ray Chandler, three unidentified others (brothers-in-law); unidentified father (deceased); Jackie Shorr (alleged mother; unconfirmed) -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/cl-camp5.en.md b/subjects/cl-camp5.en.md index 578fb6032..252ad4aae 100644 --- a/subjects/cl-camp5.en.md +++ b/subjects/cl-camp5.en.md @@ -13,11 +13,11 @@ That command will only show the name of the files without the `.sh`. ### Usage ```console -student@ubuntu:~/piscine/test$ ./lookagain.sh | cat -e +student@ubuntu:~/piscine-go/test$ ./lookagain.sh | cat -e file1$ file2$ file3$ -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` ### Hint diff --git a/subjects/cl-camp5.fr.md b/subjects/cl-camp5.fr.md index 1f6e3f56d..0b5f932ff 100644 --- a/subjects/cl-camp5.fr.md +++ b/subjects/cl-camp5.fr.md @@ -13,11 +13,11 @@ Cette commande montrera le nom des fichiers sans le`.sh`. ### Utilisation ```console -student@ubuntu:~/piscine/test$ ./lookagain.sh | cat -e +student@ubuntu:~/piscine-go/test$ ./lookagain.sh | cat -e file1$ file2$ file3$ -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` ### Indice diff --git a/subjects/cl-camp6.en.md b/subjects/cl-camp6.en.md index 585438bc6..9b728fe0f 100644 --- a/subjects/cl-camp6.en.md +++ b/subjects/cl-camp6.en.md @@ -9,7 +9,7 @@ Create a file `countfiles.sh`, which will print the number **(and only the numbe ### Usage ```console -student@ubuntu:~/piscine/test$ ./countfiles.sh | cat -e +student@ubuntu:~/piscine-go/test$ ./countfiles.sh | cat -e 12$ -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/cl-camp6.fr.md b/subjects/cl-camp6.fr.md index f5577df39..23da145f9 100644 --- a/subjects/cl-camp6.fr.md +++ b/subjects/cl-camp6.fr.md @@ -9,7 +9,7 @@ Créer un fichier `countfiles.sh`, qui affichera le nombre **(et seulement le no ### Utilisation ```console -student@ubuntu:~/piscine/test$ ./countfiles.sh | cat -e +student@ubuntu:~/piscine-go/test$ ./countfiles.sh | cat -e 12$ -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/cl-camp7.en.md b/subjects/cl-camp7.en.md index bbbfabed5..e1337abe0 100644 --- a/subjects/cl-camp7.en.md +++ b/subjects/cl-camp7.en.md @@ -9,7 +9,7 @@ Create a file `"\?$*'ChouMi'*$?\"` that will contain "01" and **nothing else**. ### Usage ```console -student@ubuntu:~/piscine/test$ ls | cat -e -"\?$*'ChouMi'*$?\" $ -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ls | cat -e +"\?$*'ChouMi'*$?\"$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/cl-camp7.fr.md b/subjects/cl-camp7.fr.md index c316524b4..764a80ea4 100644 --- a/subjects/cl-camp7.fr.md +++ b/subjects/cl-camp7.fr.md @@ -9,7 +9,7 @@ Créer un fichier `"\?$*'ChouMi'*$?\"` qui contiendra "01" et **rien d'autre**. ### Utilisation ```console -student@ubuntu:~/piscine/test$ ls | cat -e +student@ubuntu:~/piscine-go/test$ ls | cat -e "\?$*'ChouMi'*$?\" $ -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/collatzcountdown.en.md b/subjects/collatzcountdown.en.md index 02607c56e..85dbc8df3 100644 --- a/subjects/collatzcountdown.en.md +++ b/subjects/collatzcountdown.en.md @@ -33,8 +33,8 @@ func main() { And its output : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test 10 -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/comcheck.en.md b/subjects/comcheck.en.md index 17b6674de..b1190914c 100644 --- a/subjects/comcheck.en.md +++ b/subjects/comcheck.en.md @@ -11,10 +11,10 @@ Write a program `comcheck` that displays on the standard output `Alert!!!` follo ### Usage ```console -student@ubuntu:~/piscine/comcheck$ go build -student@ubuntu:~/piscine/comcheck$ ./comcheck "I" "Will" "Enter" "the" "galaxy" +student@ubuntu:~/piscine-go/comcheck$ go build +student@ubuntu:~/piscine-go/comcheck$ ./comcheck "I" "Will" "Enter" "the" "galaxy" Alert!!! -student@ubuntu:~/piscine/comcheck$ ./comcheck "galaxy 01" "do" "you" "hear" "me" +student@ubuntu:~/piscine-go/comcheck$ ./comcheck "galaxy 01" "do" "you" "hear" "me" Alert!!! -student@ubuntu:~/piscine/comcheck$ +student@ubuntu:~/piscine-go/comcheck$ ``` diff --git a/subjects/comcheck.fr.md b/subjects/comcheck.fr.md index 181f5e5ca..dd890cc4c 100644 --- a/subjects/comcheck.fr.md +++ b/subjects/comcheck.fr.md @@ -11,10 +11,10 @@ ### Usage ```console -student@ubuntu:~/piscine/comcheck$ go build -student@ubuntu:~/piscine/comcheck$ ./comcheck "I" "Will" "Enter" "the" "galaxy" +student@ubuntu:~/piscine-go/comcheck$ go build +student@ubuntu:~/piscine-go/comcheck$ ./comcheck "I" "Will" "Enter" "the" "galaxy" Alert!!! -student@ubuntu:~/piscine/comcheck$ ./comcheck "galaxy 01" "do" "you" "hear" "me" +student@ubuntu:~/piscine-go/comcheck$ ./comcheck "galaxy 01" "do" "you" "hear" "me" Alert!!! -student@ubuntu:~/piscine/comcheck$ +student@ubuntu:~/piscine-go/comcheck$ ``` diff --git a/subjects/compact.en.md b/subjects/compact.en.md index 5c637f851..40ee7df79 100644 --- a/subjects/compact.en.md +++ b/subjects/compact.en.md @@ -53,8 +53,8 @@ func main() { And its output : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test a b @@ -65,5 +65,5 @@ Size after compacting: 3 a b c -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/compact.fr.md b/subjects/compact.fr.md index aaeb5b8e3..54f2f339c 100644 --- a/subjects/compact.fr.md +++ b/subjects/compact.fr.md @@ -53,8 +53,8 @@ func main() { Et son résultat : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test a b @@ -65,5 +65,5 @@ Size after compacting: 3 a b c -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/compare.en.md b/subjects/compare.en.md index 9133ea0c8..2ac075c46 100644 --- a/subjects/compare.en.md +++ b/subjects/compare.en.md @@ -34,10 +34,10 @@ func main() { And its output : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test 0 -1 1 -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/compare.fr.md b/subjects/compare.fr.md index 9f27f0c0a..c227fe0ff 100644 --- a/subjects/compare.fr.md +++ b/subjects/compare.fr.md @@ -34,10 +34,10 @@ func main() { Et son résultat : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test 0 -1 1 -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/concat.en.md b/subjects/concat.en.md index c5b4644ce..67f2fc8bf 100644 --- a/subjects/concat.en.md +++ b/subjects/concat.en.md @@ -33,8 +33,8 @@ func main() { And its output : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test Hello! How are you? -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/concat.fr.md b/subjects/concat.fr.md index 20f7feeb0..7976aae9b 100644 --- a/subjects/concat.fr.md +++ b/subjects/concat.fr.md @@ -33,8 +33,8 @@ func main() { Et son résultat : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test Hello! How are you? -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/concatparams.en.md b/subjects/concatparams.en.md index b9425ecdb..de48463ec 100644 --- a/subjects/concatparams.en.md +++ b/subjects/concatparams.en.md @@ -34,11 +34,11 @@ func main() { And its output : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test Hello how are you? -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/concatparams.fr.md b/subjects/concatparams.fr.md index b5e5084c0..0836badc5 100644 --- a/subjects/concatparams.fr.md +++ b/subjects/concatparams.fr.md @@ -34,11 +34,11 @@ func main() { Et son résultat : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test Hello how are you? -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/convertbase.en.md b/subjects/convertbase.en.md index 760e34539..0f4862a55 100644 --- a/subjects/convertbase.en.md +++ b/subjects/convertbase.en.md @@ -36,8 +36,8 @@ func main() { And its output : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test 43 -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/convertbase.fr.md b/subjects/convertbase.fr.md index 76899372b..64c5d6e26 100644 --- a/subjects/convertbase.fr.md +++ b/subjects/convertbase.fr.md @@ -36,8 +36,8 @@ func main() { Et son résultat : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test 43 -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/countdown.en.md b/subjects/countdown.en.md index adf526884..04658497f 100644 --- a/subjects/countdown.en.md +++ b/subjects/countdown.en.md @@ -8,8 +8,8 @@ newline(`'\n'`). ### Usage ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test 9876543210 -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/countdown.fr.md b/subjects/countdown.fr.md index 550a60104..2c3cd90cb 100644 --- a/subjects/countdown.fr.md +++ b/subjects/countdown.fr.md @@ -7,8 +7,8 @@ ### Utilisation ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test 9876543210 -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/countif.en.md b/subjects/countif.en.md index 234987de4..727ce5870 100644 --- a/subjects/countif.en.md +++ b/subjects/countif.en.md @@ -36,9 +36,9 @@ func main() { And its output : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test 0 2 -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/countif.fr.md b/subjects/countif.fr.md index 7db913a68..77b6a87a2 100644 --- a/subjects/countif.fr.md +++ b/subjects/countif.fr.md @@ -36,9 +36,9 @@ func main() { Et son résultat : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test 0 2 -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/createelem.en.md b/subjects/createelem.en.md index ecdb9ea7e..bf0e0657a 100644 --- a/subjects/createelem.en.md +++ b/subjects/createelem.en.md @@ -38,8 +38,8 @@ func main() { And its output : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test &{1234} -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/createelem.fr.md b/subjects/createelem.fr.md index ecdb9ea7e..32521643f 100644 --- a/subjects/createelem.fr.md +++ b/subjects/createelem.fr.md @@ -2,9 +2,9 @@ ### Instructions -Write a function `CreateElem` that creates a new element of type`Node`. +Écrire une fonction `CreateElem` qui crée un nouvel élément de type `Node`. -### Expected function and structure +### Fonction attendue et structure ```go type Node struct { @@ -16,9 +16,9 @@ func CreateElem(n *Node, value int) { } ``` -### Usage +### Utilisation -Here is a possible [program](TODO-LINK) to test your function : +Voici un éventuel [programme](TODO-LINK) pour tester votre fonction : ```go package main @@ -35,11 +35,11 @@ func main() { } ``` -And its output : +Et son résultat : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test &{1234} -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/displaya.en.md b/subjects/displaya.en.md index 2e0e6f539..37e8f96bd 100644 --- a/subjects/displaya.en.md +++ b/subjects/displaya.en.md @@ -10,12 +10,12 @@ string, the program just writes `a` followed by a newline(`'\n'`). If the number ### Usage ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test "abc" +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test "abc" a -student@ubuntu:~/piscine/test$ ./test "bcvbvA" +student@ubuntu:~/piscine-go/test$ ./test "bcvbvA" a -student@ubuntu:~/piscine/test$ ./test "nbv" +student@ubuntu:~/piscine-go/test$ ./test "nbv" a -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/displaya.fr.md b/subjects/displaya.fr.md index fc14657c9..21bd7c7af 100644 --- a/subjects/displaya.fr.md +++ b/subjects/displaya.fr.md @@ -7,12 +7,12 @@ ### Utilisation ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test "abc" +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test "abc" a -student@ubuntu:~/piscine/test$ ./test "bcvbvA" +student@ubuntu:~/piscine-go/test$ ./test "bcvbvA" a -student@ubuntu:~/piscine/test$ ./test "nbv" +student@ubuntu:~/piscine-go/test$ ./test "nbv" a -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/displayfirstparam.en.md b/subjects/displayfirstparam.en.md index 2f0cffaef..986dc459a 100644 --- a/subjects/displayfirstparam.en.md +++ b/subjects/displayfirstparam.en.md @@ -7,11 +7,11 @@ Write a program that takes `strings` as arguments, and displays its first argume ### Usage ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test hello there +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test hello there hello -student@ubuntu:~/piscine/test$ ./test "hello there" how are you +student@ubuntu:~/piscine-go/test$ ./test "hello there" how are you hello there -student@ubuntu:~/piscine/test$ ./test -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ./test +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/displayfirstparam.fr.md b/subjects/displayfirstparam.fr.md index 4b50eeb9e..7f74947e5 100644 --- a/subjects/displayfirstparam.fr.md +++ b/subjects/displayfirstparam.fr.md @@ -7,11 +7,11 @@ ### Utilisation ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test hello there +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test hello there hello -student@ubuntu:~/piscine/test$ ./test "hello there" how are you +student@ubuntu:~/piscine-go/test$ ./test "hello there" how are you hello there -student@ubuntu:~/piscine/test$ ./test -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ./test +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/displaylastparam.en.md b/subjects/displaylastparam.en.md index 557c47593..27d059377 100644 --- a/subjects/displaylastparam.en.md +++ b/subjects/displaylastparam.en.md @@ -7,13 +7,13 @@ Write a program that takes `strings` as arguments, and displays its last argumen ### Expected output ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test hello there +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test hello there there -student@ubuntu:~/piscine/test$ ./test "hello there" how are you +student@ubuntu:~/piscine-go/test$ ./test "hello there" how are you you -student@ubuntu:~/piscine/test$ ./test "hello there" +student@ubuntu:~/piscine-go/test$ ./test "hello there" hello there -student@ubuntu:~/piscine/test$ ./test -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ./test +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/displaylastparam.fr.md b/subjects/displaylastparam.fr.md index 8114ee0b3..26e63f1fb 100644 --- a/subjects/displaylastparam.fr.md +++ b/subjects/displaylastparam.fr.md @@ -7,13 +7,13 @@ ### Expected output ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test hello there +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test hello there there -student@ubuntu:~/piscine/test$ ./test "hello there" how are you +student@ubuntu:~/piscine-go/test$ ./test "hello there" how are you you -student@ubuntu:~/piscine/test$ ./test "hello there" +student@ubuntu:~/piscine-go/test$ ./test "hello there" hello there -student@ubuntu:~/piscine/test$ ./test -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ./test +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/displayz.en.md b/subjects/displayz.en.md index 07cb8d9a9..1ed71cec7 100644 --- a/subjects/displayz.en.md +++ b/subjects/displayz.en.md @@ -10,12 +10,12 @@ string, the program just writes `z` followed by a newline(`'\n'`). If the number ### Usage ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test "xyz" +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test "xyz" z -student@ubuntu:~/piscine/test$ ./test "bcvbvZ" +student@ubuntu:~/piscine-go/test$ ./test "bcvbvZ" z -student@ubuntu:~/piscine/test$ ./test "nbv" +student@ubuntu:~/piscine-go/test$ ./test "nbv" z -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ ./test ``` diff --git a/subjects/displayz.fr.md b/subjects/displayz.fr.md index 62fc4f2f5..d4af3c100 100644 --- a/subjects/displayz.fr.md +++ b/subjects/displayz.fr.md @@ -7,12 +7,12 @@ ### Utilisation ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test "xyz" +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test "xyz" z -student@ubuntu:~/piscine/test$ ./test "bcvbvZ" +student@ubuntu:~/piscine-go/test$ ./test "bcvbvZ" z -student@ubuntu:~/piscine/test$ ./test "nbv" +student@ubuntu:~/piscine-go/test$ ./test "nbv" z -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ ./test ``` diff --git a/subjects/divmod.en.md b/subjects/divmod.en.md index 1deb4ce1d..6d2ab871e 100644 --- a/subjects/divmod.en.md +++ b/subjects/divmod.en.md @@ -42,9 +42,9 @@ func main() { And its output : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test 6 1 -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/divmod.fr.md b/subjects/divmod.fr.md index 5af68c2ff..fb79adda6 100644 --- a/subjects/divmod.fr.md +++ b/subjects/divmod.fr.md @@ -42,9 +42,9 @@ func main() { Et son résultat : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test 6 1 -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/doop.en.md b/subjects/doop.en.md index 1fdd5a9f8..58ac5b07f 100644 --- a/subjects/doop.en.md +++ b/subjects/doop.en.md @@ -14,27 +14,27 @@ In case of an invalid operator the programs prints `0`. In case of an invalid number of arguments the program prints nothing. -The program has to handle the modulo and division operations by 0 as shown on the output examples below. +The program has to handle the modulo and division operations by 0 as shown on the output examples below. `fmt.Print` is authorized. -Examples of outputs : +### Usage ```console -student@ubuntu:~/piscine/test$ go build doop.go -student@ubuntu:~/piscine/test$ ./doop -student@ubuntu:~/piscine/test$ ./doop 1 + 1 +student@ubuntu:~/piscine-go/test$ go build doop.go +student@ubuntu:~/piscine-go/test$ ./doop +student@ubuntu:~/piscine-go/test$ ./doop 1 + 1 2 -student@ubuntu:~/piscine/test$ ./doop hello + 1 | cat -e +student@ubuntu:~/piscine-go/test$ ./doop hello + 1 | cat -e 0$ -student@ubuntu:~/piscine/test$ ./doop 1 p 1 +student@ubuntu:~/piscine-go/test$ ./doop 1 p 1 0 -student@ubuntu:~/piscine/test$ ./doop 1 + 1 +student@ubuntu:~/piscine-go/test$ ./doop 1 + 1 2 -student@ubuntu:~/piscine/test$ ./doop 1 / 0 | cat -e +student@ubuntu:~/piscine-go/test$ ./doop 1 / 0 | cat -e No division by 0$ -student@ubuntu:~/piscine/test$ ./doop 1 % 0 | cat -e +student@ubuntu:~/piscine-go/test$ ./doop 1 % 0 | cat -e No modulo by 0$ -student@ubuntu:~/piscine/test$ ./doop 1 "*" 1 +student@ubuntu:~/piscine-go/test$ ./doop 1 "*" 1 1 ``` diff --git a/subjects/doop.fr.md b/subjects/doop.fr.md index 5075e6cc2..8f799ea1c 100644 --- a/subjects/doop.fr.md +++ b/subjects/doop.fr.md @@ -22,21 +22,21 @@ Le programme doit géré les opérations modulo et division par 0 comme dans les ### Utilisation ```console -student@ubuntu:~/piscine/test$ go build doop.go -student@ubuntu:~/piscine/test$ ./doop -student@ubuntu:~/piscine/test$ ./doop 1 + 1 +student@ubuntu:~/piscine-go/test$ go build doop.go +student@ubuntu:~/piscine-go/test$ ./doop +student@ubuntu:~/piscine-go/test$ ./doop 1 + 1 2 -student@ubuntu:~/piscine/test$ ./doop hello + 1 | cat -e +student@ubuntu:~/piscine-go/test$ ./doop hello + 1 | cat -e 0$ -student@ubuntu:~/piscine/test$ ./doop 1 p 1 +student@ubuntu:~/piscine-go/test$ ./doop 1 p 1 0 -student@ubuntu:~/piscine/test$ ./doop 1 + 1 +student@ubuntu:~/piscine-go/test$ ./doop 1 + 1 2 -student@ubuntu:~/piscine/test$ ./doop 1 / 0 +student@ubuntu:~/piscine-go/test$ ./doop 1 / 0 No division by 0 -student@ubuntu:~/piscine/test$ ./doop 1 % 0 +student@ubuntu:~/piscine-go/test$ ./doop 1 % 0 No modulo by 0 -student@ubuntu:~/piscine/test$ ./doop 1 * 1 +student@ubuntu:~/piscine-go/test$ ./doop 1 * 1 1 ``` diff --git a/subjects/eightqueens.en.md b/subjects/eightqueens.en.md index 9964bfdd0..bad19e06a 100644 --- a/subjects/eightqueens.en.md +++ b/subjects/eightqueens.en.md @@ -1,6 +1,6 @@ ## eightqueens -### Intructions +### Instructions Write a function that prints the solutions to the [eight queens puzzle](https://en.wikipedia.org/wiki/Eight_queens_puzzle). @@ -9,8 +9,8 @@ Recursivity must be used to solve this problem. It should print something like this : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test 15863724 16837425 17468253 diff --git a/subjects/eightqueens.fr.md b/subjects/eightqueens.fr.md index 927baa65b..b3e9640ee 100644 --- a/subjects/eightqueens.fr.md +++ b/subjects/eightqueens.fr.md @@ -1,6 +1,6 @@ ## eightqueens -### Intructions +### Instructions Écrire une [fonction](TODO-LINK) qui affiche toutes les solutions du [problème des huit dames](https://en.wikipedia.org/wiki/Eight_queens_puzzle). @@ -9,8 +9,8 @@ La récursion doit être utilisée pour résoudre ce problème. L'affichage sera quelque chose comme ça : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test 15863724 16837425 17468253 diff --git a/subjects/enigma.en.md b/subjects/enigma.en.md index 5f8e01225..ce2d533b3 100644 --- a/subjects/enigma.en.md +++ b/subjects/enigma.en.md @@ -74,8 +74,8 @@ func main() { And its output : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test 5 2 7 @@ -85,5 +85,5 @@ After using Enigma 6 5 7 -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/enigma.fr.md b/subjects/enigma.fr.md index 3a1bb321f..5451e4dff 100644 --- a/subjects/enigma.fr.md +++ b/subjects/enigma.fr.md @@ -73,8 +73,8 @@ func main() { Et son résultat : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test 5 2 7 @@ -84,5 +84,5 @@ After using Enigma 6 5 7 -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/expandstr.en.md b/subjects/expandstr.en.md index 62be75bff..67717cfde 100644 --- a/subjects/expandstr.en.md +++ b/subjects/expandstr.en.md @@ -2,17 +2,17 @@ ### Instructions -Write a program that takes a string and displays it with exactly three spaces +Write a program that takes a `string` and displays it with exactly three spaces between each word, with no spaces or tabs at either the beginning nor the end. -The string will be followed by a newline. +The `string` will be followed by a newline(`'\n'`). A word is a sequence of alphanumerical characters. -If the number of parameters is not 1, or if there are no words, the program displays +If the number of parameters is not 1, or if there are no word, the program displays a newline. -Examples of outputs : +### Usage ```console student@ubuntu:~/student/expandstr$ go build diff --git a/subjects/expandstr.fr.md b/subjects/expandstr.fr.md index 62be75bff..3d13ae81a 100644 --- a/subjects/expandstr.fr.md +++ b/subjects/expandstr.fr.md @@ -2,17 +2,15 @@ ### Instructions -Write a program that takes a string and displays it with exactly three spaces -between each word, with no spaces or tabs at either the beginning nor the end. +Écrire un programme qui prend une `string` et qui l'affiche avec exactement 3 espaces entre chaque mot, sans espace ou tabulation ni au début ni à la fin. -The string will be followed by a newline. +La `string` sera suivie d'un newline(`'\n'`). -A word is a sequence of alphanumerical characters. +Un mot est une suite de caractères alphanumériques. -If the number of parameters is not 1, or if there are no words, the program displays -a newline. +Si le nombre de paramètres n'est pas 1, ou si il n'y a pas de mot, le programme affiche un newline. -Examples of outputs : +### Utilisation ```console student@ubuntu:~/student/expandstr$ go build diff --git a/subjects/fibonacci.en.md b/subjects/fibonacci.en.md index 47ad3862c..47e89f3d9 100644 --- a/subjects/fibonacci.en.md +++ b/subjects/fibonacci.en.md @@ -1,6 +1,6 @@ ## fibonacci -### Intructions +### Instructions Write an **recursive** function that returns the value of fibonacci sequence matching the index passed as parameter. @@ -17,7 +17,7 @@ A negative index will return `-1`. ```go package main -func Fibonacci(int index) int { +func Fibonacci(index int) int { } ``` @@ -43,8 +43,8 @@ func main() { And its output : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test 3 -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/fibonacci.fr.md b/subjects/fibonacci.fr.md index c6b5b0a22..be9191788 100644 --- a/subjects/fibonacci.fr.md +++ b/subjects/fibonacci.fr.md @@ -1,6 +1,6 @@ ## fibonacci -### Intructions +### Instructions Écrire une fonction **récursive** qui renvoie la valeur de la suite de fibonacci correspondant à l'index passé en paramètre. @@ -17,7 +17,7 @@ Un index négatif renvoie `-1`. ```go package main -func Fibonacci(int index) int { +func Fibonacci(index int) int { } ``` @@ -43,9 +43,9 @@ func main() { Et son résultat : ```console -student@ubuntu:~/piscine/test$go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$go build +student@ubuntu:~/piscine-go/test$ ./test 3 -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/findnextprime.en.md b/subjects/findnextprime.en.md index 4e74607fc..6d844c848 100644 --- a/subjects/findnextprime.en.md +++ b/subjects/findnextprime.en.md @@ -1,6 +1,6 @@ ## findnextprime -### Intructions +### Instructions Write a function that returns the first prime number that is equal or superior to the `int` passed as parameter. @@ -9,7 +9,7 @@ The function must be optimized in order to avoid time-outs with the tester. ### Expected function ```go -func FindNextPrime(int nb) int { +func FindNextPrime(nb int) int { } ``` @@ -35,9 +35,9 @@ func main() { And its output : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test 5 5 -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/findnextprime.fr.md b/subjects/findnextprime.fr.md index 5af76ba66..a7c8e0882 100644 --- a/subjects/findnextprime.fr.md +++ b/subjects/findnextprime.fr.md @@ -1,6 +1,6 @@ ## findnextprime -### Intructions +### Instructions Écrire une fonction qui renvoie le premier nombre premier qui est égal ou supérieur à l'`int` passé en paramètre. @@ -9,7 +9,7 @@ La fonction devra être optimisée pour éviter les time-outs avec le testeur. ### Fonction attendue ```go -func FindNextPrime(int nb) int { +func FindNextPrime(nb int) int { } ``` @@ -37,9 +37,9 @@ func main() { Et son résultat : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test 5 5 -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/firstrune.en.md b/subjects/firstrune.en.md index f257da3dd..d4cd52feb 100644 --- a/subjects/firstrune.en.md +++ b/subjects/firstrune.en.md @@ -35,8 +35,8 @@ func main() { And its output : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test HSO -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/firstrune.fr.md b/subjects/firstrune.fr.md index 932cbe453..ebaf6eb35 100644 --- a/subjects/firstrune.fr.md +++ b/subjects/firstrune.fr.md @@ -35,8 +35,8 @@ func main() { Et son résultat : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test HSO -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/firstword.en.md b/subjects/firstword.en.md index 13ada5971..25fa1c061 100644 --- a/subjects/firstword.en.md +++ b/subjects/firstword.en.md @@ -13,14 +13,14 @@ Write a program that takes a `string` and displays its first word, followed by a ### Usage ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test "hello there" +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test "hello there" hello -student@ubuntu:~/piscine/test$ ./test "hello ......... bye" +student@ubuntu:~/piscine-go/test$ ./test "hello ......... bye" hello -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ ./test -student@ubuntu:~/piscine/test$ ./test "hello" "there" +student@ubuntu:~/piscine-go/test$ ./test "hello" "there" -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/firstword.fr.md b/subjects/firstword.fr.md index 4eedf04c2..74b78fb7d 100644 --- a/subjects/firstword.fr.md +++ b/subjects/firstword.fr.md @@ -13,14 +13,14 @@ ### Utilisation ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test "hello there" +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test "hello there" hello -student@ubuntu:~/piscine/test$ ./test "hello ......... bye" +student@ubuntu:~/piscine-go/test$ ./test "hello ......... bye" hello -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ ./test -student@ubuntu:~/piscine/test$ ./test "hello" "there" +student@ubuntu:~/piscine-go/test$ ./test "hello" "there" -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/foreach.en.md b/subjects/foreach.en.md index d21c6ca09..d47ec6520 100644 --- a/subjects/foreach.en.md +++ b/subjects/foreach.en.md @@ -29,8 +29,8 @@ func main() { And its output : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test 123456 -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/foreach.fr.md b/subjects/foreach.fr.md index 18ac85ac7..868b119b0 100644 --- a/subjects/foreach.fr.md +++ b/subjects/foreach.fr.md @@ -29,8 +29,8 @@ func main() { Et son résultat : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test 123456 -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/fprime.en.md b/subjects/fprime.en.md index 3335cdd2e..ae8697a70 100644 --- a/subjects/fprime.en.md +++ b/subjects/fprime.en.md @@ -2,29 +2,29 @@ ### Instructions -Write a program that takes a positive `int` and displays its prime factors on the standard output, followed by a newline. +Write a program that takes a positive `int` and displays its prime factors, followed by a newline(`'\n'`). -- Factors must be displayed in ascending order and separated by `*`, so that the expression in the output gives the right result. +- Factors must be displayed in ascending order and separated by `*`. -- If the number of parameters is not 1, the program displays a newline. +- If the number of parameters is different from 1, the program displays a newline. - The input, when there is one, will always be valid. -Example of output : +### Usage ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test 225225 +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test 225225 3*3*5*5*7*11*13 -student@ubuntu:~/piscine/test$ ./test 8333325 +student@ubuntu:~/piscine-go/test$ ./test 8333325 3*3*5*5*7*11*13*37 -student@ubuntu:~/piscine/test$ ./test 9539 +student@ubuntu:~/piscine-go/test$ ./test 9539 9539 -student@ubuntu:~/piscine/test$ ./test 804577 +student@ubuntu:~/piscine-go/test$ ./test 804577 804577 -student@ubuntu:~/piscine/test$ ./test 42 +student@ubuntu:~/piscine-go/test$ ./test 42 2*3*7 -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ ./test -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/fprime.fr.md b/subjects/fprime.fr.md index 3335cdd2e..bde628daf 100644 --- a/subjects/fprime.fr.md +++ b/subjects/fprime.fr.md @@ -2,29 +2,29 @@ ### Instructions -Write a program that takes a positive `int` and displays its prime factors on the standard output, followed by a newline. +Écrire un programme qui prend un `int` positif et qui affiche ses facteurs premiers sur la sortie standard, suivi d'un newline(`'\n'`). -- Factors must be displayed in ascending order and separated by `*`, so that the expression in the output gives the right result. +- Les facteurs doivent être affichés en ordre croissant et séparés par `*`. -- If the number of parameters is not 1, the program displays a newline. +- Si le nombre de paramètres est différent de 1, le programme affiche un newline. -- The input, when there is one, will always be valid. +- L'input (l'entrée), quand il y en a un, sera toujours valide. -Example of output : +### Utilisation ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test 225225 +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test 225225 3*3*5*5*7*11*13 -student@ubuntu:~/piscine/test$ ./test 8333325 +student@ubuntu:~/piscine-go/test$ ./test 8333325 3*3*5*5*7*11*13*37 -student@ubuntu:~/piscine/test$ ./test 9539 +student@ubuntu:~/piscine-go/test$ ./test 9539 9539 -student@ubuntu:~/piscine/test$ ./test 804577 +student@ubuntu:~/piscine-go/test$ ./test 804577 804577 -student@ubuntu:~/piscine/test$ ./test 42 +student@ubuntu:~/piscine-go/test$ ./test 42 2*3*7 -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ ./test -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/gcd.en.md b/subjects/gcd.en.md index b4080384e..64fe24d4f 100644 --- a/subjects/gcd.en.md +++ b/subjects/gcd.en.md @@ -2,17 +2,16 @@ ### Instructions -Write a program that takes two strings representing two strictly positive -integers that fit in an int. +Write a program that takes two `strings` representing two strictly positive +integers that fit in an `int`. -Display their greatest common divisor followed by a newline (It is always a -strictly positive integer). +The program displays their greatest common divisor followed by a newline('`\n`'). -If the number of parameters is not 2, display a newline. +If the number of parameters is different from 2, the program displays a newline. -All arguments tested will be valid positive `int` values. +All arguments tested will be positive `int` values. -Example of output : +### Usage ```console student@ubuntu:~/student/gcd$ go build diff --git a/subjects/gcd.fr.md b/subjects/gcd.fr.md index b4080384e..0fd724a4b 100644 --- a/subjects/gcd.fr.md +++ b/subjects/gcd.fr.md @@ -2,17 +2,15 @@ ### Instructions -Write a program that takes two strings representing two strictly positive -integers that fit in an int. +Écrire un programme qui prend deux `strings` représentant deux entiers strictement positifs qui rentrent dans un `int`. -Display their greatest common divisor followed by a newline (It is always a -strictly positive integer). +Afficher leur plus grand diviseur commun suivi d'un newline('`\n`'). -If the number of parameters is not 2, display a newline. +Si le nombre de paramètres est différent de 2, le programme affiche un newline. -All arguments tested will be valid positive `int` values. +Tous les arguments testés seront des `int` positifs. -Example of output : +### Utilisation ```console student@ubuntu:~/student/gcd$ go build diff --git a/subjects/hello.en.md b/subjects/hello.en.md index c0380fbc9..60207b56b 100644 --- a/subjects/hello.en.md +++ b/subjects/hello.en.md @@ -7,8 +7,8 @@ Write a program that displays "Hello World!" followed by a newline(`'\n'`). ### Usage ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test Hello World! -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/hello.fr.md b/subjects/hello.fr.md index cd50fd567..ac6c9f93f 100644 --- a/subjects/hello.fr.md +++ b/subjects/hello.fr.md @@ -7,8 +7,8 @@ ### Utilisation ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test Hello World! -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/hiddenp.en.md b/subjects/hiddenp.en.md index 7a71d84ee..4db88e82a 100644 --- a/subjects/hiddenp.en.md +++ b/subjects/hiddenp.en.md @@ -2,17 +2,17 @@ ### Instructions -Write a program named hiddenp that takes two strings and that, if the first string is hidden in the second one, displays 1 -followed by a newline, otherwise it displays 0 followed by a newline. +Write a program named `hiddenp` that takes two `strings` and that, if the first `string` is hidden in the second one, displays `1` +followed by a newline(`'\n'`), otherwise it displays `0` followed by a newline. -Let s1 and s2 be strings. It is considered that s1 is hidden in s2 if it is possible to +Let s1 and s2 be `strings`. It is considered that s1 is hidden in s2 if it is possible to find each character from s1 in s2, **in the same order as they appear in s1.** -If s1 is an empty string it is considered hidden in any string. +If s1 is an empty `string` it is considered hidden in any `string`. -If the number of parameters is not 2, the program displays a newline. +If the number of parameters is different from 2, the program displays a newline. -Example of output : +### Usage ```console student@ubuntu:~/student/hiddenp$ go build diff --git a/subjects/hiddenp.fr.md b/subjects/hiddenp.fr.md index 7a71d84ee..c563e3244 100644 --- a/subjects/hiddenp.fr.md +++ b/subjects/hiddenp.fr.md @@ -2,17 +2,16 @@ ### Instructions -Write a program named hiddenp that takes two strings and that, if the first string is hidden in the second one, displays 1 -followed by a newline, otherwise it displays 0 followed by a newline. +Écrire un programme nommé `hiddenp` qui prend deux `strings` et qui, si la première `string` est cachée dans la deuxième, affiche `1` +suivi d'un newline(`'\n'`), autrement il affiche `0` suivi d'un newline. -Let s1 and s2 be strings. It is considered that s1 is hidden in s2 if it is possible to -find each character from s1 in s2, **in the same order as they appear in s1.** +Considérons s1 et s2 comme étant des `strings`. Il est considéré que s1 est cachée dans s2 si il est possbile de trouver chaque caractère de s1 dans s2, **dans le même ordre d'apparence que s1.** -If s1 is an empty string it is considered hidden in any string. +Si s1 est une `string` vide elle est considérée cachée dans n'importe quelle `string`. -If the number of parameters is not 2, the program displays a newline. +Si le nombre de paramètres est différent de 2, le programme affiche un newline. -Example of output : +### Utilisation ```console student@ubuntu:~/student/hiddenp$ go build diff --git a/subjects/index.en.md b/subjects/index.en.md index 4210f76d2..7272ad1d0 100644 --- a/subjects/index.en.md +++ b/subjects/index.en.md @@ -34,10 +34,10 @@ func main() { And its output : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test 2 1 -1 -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/index.fr.md b/subjects/index.fr.md index fa2566387..dfad63ab9 100644 --- a/subjects/index.fr.md +++ b/subjects/index.fr.md @@ -34,10 +34,10 @@ func main() { Et son résultat : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test 2 1 -1 -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/inter.en.md b/subjects/inter.en.md index 4a91443d7..da04aadcf 100644 --- a/subjects/inter.en.md +++ b/subjects/inter.en.md @@ -6,15 +6,15 @@ Write a program that takes two `strings` and displays, without doubles, the char - The display will be followed by a newline(`'\n'`). -- If the number of arguments is not 2, the program displays a newline(`'\n'`). +- If the number of arguments is different from 2, the program displays a newline(`'\n'`). ### Usage ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test "padinton" "paqefwtdjetyiytjneytjoeyjnejeyj" +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test "padinton" "paqefwtdjetyiytjneytjoeyjnejeyj" padinto -student@ubuntu:~/piscine/test$ ./test ddf6vewg64f twthgdwthdwfteewhrtag6h4ffdhsd +student@ubuntu:~/piscine-go/test$ ./test ddf6vewg64f twthgdwthdwfteewhrtag6h4ffdhsd df6ewg4 -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/inter.fr.md b/subjects/inter.fr.md index 682f59f29..e5b8f153c 100644 --- a/subjects/inter.fr.md +++ b/subjects/inter.fr.md @@ -6,15 +6,15 @@ - L'affichage sera suivi d'un newline(`'\n'`). -- Si le nombre d'arguments n'est pas 2, le programme affiche un newline(`'\n'`). +- Si le nombre d'arguments est différent de 2, le programme affiche un newline(`'\n'`). ### Utilisation ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test "padinton" "paqefwtdjetyiytjneytjoeyjnejeyj" +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test "padinton" "paqefwtdjetyiytjneytjoeyjnejeyj" padinto -student@ubuntu:~/piscine/test$ ./test ddf6vewg64f twthgdwthdwfteewhrtag6h4ffdhsd +student@ubuntu:~/piscine-go/test$ ./test ddf6vewg64f twthgdwthdwfteewhrtag6h4ffdhsd df6ewg4 -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/introduction.en.md b/subjects/introduction.en.md index 65a4fe0a7..1744c853a 100644 --- a/subjects/introduction.en.md +++ b/subjects/introduction.en.md @@ -27,9 +27,9 @@ Where `{username}` is your `github username` If the `{username}` is `kigiri` : ```console -user@host:~/piscine$ ./hello.sh +user@host:~/piscine-go$ ./hello.sh Hello kigiri! -user@host:~/piscine$ +user@host:~/piscine-go$ ``` #### 3- go-say-hello diff --git a/subjects/introduction.fr.md b/subjects/introduction.fr.md index 06a075f68..0e7b2e90e 100644 --- a/subjects/introduction.fr.md +++ b/subjects/introduction.fr.md @@ -27,9 +27,9 @@ Où `{username}` est votre `github username` Si l'`{username}` est `kigiri` : ```console -user@host:~/piscine$ ./hello.sh +user@host:~/piscine-go$ ./hello.sh Hello kigiri! -user@host:~/piscine$ +user@host:~/piscine-go$ ``` #### 3- go-say-hello diff --git a/subjects/isalpha.en.md b/subjects/isalpha.en.md index 92cc667ff..298a9f020 100644 --- a/subjects/isalpha.en.md +++ b/subjects/isalpha.en.md @@ -36,11 +36,11 @@ func main() { And its output : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test false true false true -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/isalpha.fr.md b/subjects/isalpha.fr.md index 0bd3b2ce7..9540ce54f 100644 --- a/subjects/isalpha.fr.md +++ b/subjects/isalpha.fr.md @@ -36,11 +36,11 @@ func main() { Et son résultat : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test false true false true -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/islower.en.md b/subjects/islower.en.md index 71d43576f..c9015e4a2 100644 --- a/subjects/islower.en.md +++ b/subjects/islower.en.md @@ -34,9 +34,9 @@ func main() { And its output : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test true false -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/islower.fr.md b/subjects/islower.fr.md index 47b13436a..7234ef69b 100644 --- a/subjects/islower.fr.md +++ b/subjects/islower.fr.md @@ -34,9 +34,9 @@ func main() { Et son résultat : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test true false -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/isnegative.en.md b/subjects/isnegative.en.md index faa8b57ce..b8cf74bab 100644 --- a/subjects/isnegative.en.md +++ b/subjects/isnegative.en.md @@ -31,10 +31,10 @@ func main() { And its output : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test F F T -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/isnegative.fr.md b/subjects/isnegative.fr.md index 9804e33bd..d65ddea2c 100644 --- a/subjects/isnegative.fr.md +++ b/subjects/isnegative.fr.md @@ -31,10 +31,10 @@ func main() { Et son résultat : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test F F T -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/isnumeric.en.md b/subjects/isnumeric.en.md index 550dced3d..781e8f870 100644 --- a/subjects/isnumeric.en.md +++ b/subjects/isnumeric.en.md @@ -33,9 +33,9 @@ func main() { And its output : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test true false -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/isnumeric.fr.md b/subjects/isnumeric.fr.md index adaec9bae..0cfbb276b 100644 --- a/subjects/isnumeric.fr.md +++ b/subjects/isnumeric.fr.md @@ -34,9 +34,9 @@ func main() { Et son résultat : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test true false -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/ispowerof2.en.md b/subjects/ispowerof2.en.md index 9454cb39d..62ddde45f 100644 --- a/subjects/ispowerof2.en.md +++ b/subjects/ispowerof2.en.md @@ -4,9 +4,9 @@ Write a function that determines if a given number is a power of 2. -This function returns true if the given number is a power of 2, otherwise it returns false. +This function returns `true` if the given number is a power of 2, otherwise it returns `false`. -## Expected function +### Expected function ```go func IsPowerOf2(n uint) bool { diff --git a/subjects/ispowerof2.fr.md b/subjects/ispowerof2.fr.md index 9454cb39d..8147db777 100644 --- a/subjects/ispowerof2.fr.md +++ b/subjects/ispowerof2.fr.md @@ -2,11 +2,11 @@ ### Instructions -Write a function that determines if a given number is a power of 2. +Écrire une fonction qui détermine si un nombre donné est une puissance de 2. -This function returns true if the given number is a power of 2, otherwise it returns false. +Cette fonction retourne `true` si le nombre donné est une puissance de 2, autrement elle retourne `false`. -## Expected function +### Fonction attendue ```go func IsPowerOf2(n uint) bool { diff --git a/subjects/isprime.en.md b/subjects/isprime.en.md index 8dc2593b3..0962260cd 100644 --- a/subjects/isprime.en.md +++ b/subjects/isprime.en.md @@ -1,6 +1,6 @@ ## isprime -### Intructions +### Instructions Write a function that returns `true` if the `int` passed as parameter is a prime number. Otherwise it returns `false`. @@ -9,7 +9,7 @@ The function must be optimized in order to avoid time-outs with the tester. ### Expected function ```go -func IsPrime(int nb) bool { +func IsPrime(nb int) bool { } ``` @@ -35,9 +35,9 @@ func main() { And its output : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test true false -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/isprime.fr.md b/subjects/isprime.fr.md index b244d29aa..0903a2358 100644 --- a/subjects/isprime.fr.md +++ b/subjects/isprime.fr.md @@ -1,6 +1,6 @@ ## isprime -### Intructions +### Instructions Écrire une fonction qui renvoie `true` si l'`int` passé en paramètre est un nombre premier. Autrement elle renvoie `false`. @@ -9,7 +9,7 @@ La fonction devra être optimisée pour éviter les time-outs avec le testeur. ### Fonction attendue ```go -func IsPrime(int nb) bool { +func IsPrime(nb int) bool { } ``` @@ -35,9 +35,9 @@ func main() { Et son résultat : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test true false -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/isprintable.en.md b/subjects/isprintable.en.md index 04c131f83..e0006a70a 100644 --- a/subjects/isprintable.en.md +++ b/subjects/isprintable.en.md @@ -35,9 +35,9 @@ func main() { And its output : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test true false -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/isprintable.fr.md b/subjects/isprintable.fr.md index 9927cbeed..a19dad0df 100644 --- a/subjects/isprintable.fr.md +++ b/subjects/isprintable.fr.md @@ -35,9 +35,9 @@ func main() { Et son résultat : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test true false -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/issorted.en.md b/subjects/issorted.en.md index 97e5a23d3..249da6380 100644 --- a/subjects/issorted.en.md +++ b/subjects/issorted.en.md @@ -43,9 +43,9 @@ func main() { And its output : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test true false -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/issorted.fr.md b/subjects/issorted.fr.md index 031a8b294..1d378d409 100644 --- a/subjects/issorted.fr.md +++ b/subjects/issorted.fr.md @@ -42,9 +42,9 @@ func main() { Et son résultat : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test true false -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/isupper.en.md b/subjects/isupper.en.md index 66980bec7..396e5893e 100644 --- a/subjects/isupper.en.md +++ b/subjects/isupper.en.md @@ -34,9 +34,9 @@ func main() { And its output : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test true false -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/isupper.fr.md b/subjects/isupper.fr.md index 9b991785d..393bf54db 100644 --- a/subjects/isupper.fr.md +++ b/subjects/isupper.fr.md @@ -34,8 +34,8 @@ func main() { Et son résultat : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test true false stude0t@ubuntu:~$ diff --git a/subjects/iterativefactorial.en.md b/subjects/iterativefactorial.en.md index 2e882e558..7557d75fd 100644 --- a/subjects/iterativefactorial.en.md +++ b/subjects/iterativefactorial.en.md @@ -1,6 +1,6 @@ ## iterativefactorial -### Intructions +### Instructions Write an **iterative** function that returns the factorial of the `int` passed as parameter. @@ -9,7 +9,7 @@ Errors (non possible values or overflows) will return `0`. ### Expected function ```go -func IterativeFactorial(int nb) int { +func IterativeFactorial(nb int) int { } ``` @@ -35,8 +35,8 @@ func main() { And its output : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test 24 -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/iterativefactorial.fr.md b/subjects/iterativefactorial.fr.md index 79f2a2f24..2f98314e3 100644 --- a/subjects/iterativefactorial.fr.md +++ b/subjects/iterativefactorial.fr.md @@ -1,6 +1,6 @@ ## iterativefactorial -### Intructions +### Instructions Écrire une fonction **itérative** qui renvoie la factorielle d'un `int` passé en paramètre. @@ -9,7 +9,7 @@ Les erreurs (valeurs non possibles ou overflows) renverront `0`. ### Fonction attendue ```go -func IterativeFactorial(int nb) int { +func IterativeFactorial(nb int) int { } ``` @@ -35,8 +35,8 @@ func main() { Et son résultat : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test 24 -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/iterativepower.en.md b/subjects/iterativepower.en.md index a7d30fea4..17b8f575f 100644 --- a/subjects/iterativepower.en.md +++ b/subjects/iterativepower.en.md @@ -1,6 +1,6 @@ ## iterativepower -### Intructions +### Instructions Write an **iterative** function that returns the power of the `int` passed as parameter. @@ -9,7 +9,7 @@ Negative powers will return `0`. Overflows do **not** have to be dealt with. ### Expected function ```go -func IterativePower(int nb, int power) int { +func IterativePower(nb int, power int) int { } ``` @@ -37,8 +37,8 @@ func main() { And its output : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test 64 -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/iterativepower.fr.md b/subjects/iterativepower.fr.md index c4fac89d7..af3fc617c 100644 --- a/subjects/iterativepower.fr.md +++ b/subjects/iterativepower.fr.md @@ -1,6 +1,6 @@ ## iterativepower -### Intructions +### Instructions Écrire une fonction **itérative** qui renvoie la puissance de deux `int` passés en paramètre. @@ -9,7 +9,7 @@ Les puissances négatives renverront `0`. Les overflows **ne doivent pas** être ### Fonction attendue ```go -func IterativePower(int nb, int power) int { +func IterativePower(nb int, power int) int { } ``` @@ -37,8 +37,8 @@ func main() { Et son résultat : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test 64 -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/itoa.fr.md b/subjects/itoa.fr.md index f613beb43..e6e0bad6e 100644 --- a/subjects/itoa.fr.md +++ b/subjects/itoa.fr.md @@ -2,11 +2,11 @@ ### Instructions -- Write a function that simulates the behaviour of the `Itoa` function in Go. `Itoa` transforms a number represented as an`int` in a number represented as a `string`. +- Écrire une fonction qui reproduit le comportement de la fonction `Itoa` en Go. `Itoa` transforme un nombre représenté en `int` (entier) en `string` (chaîne de caractères). -- For this exercise the handling of the signs + or - **does have** to be taken into account. +- Pour cet exercice la gestion des signes + ou - **doit être** prise en compte. -## Expected function +## Fonction attendue ```go func Itoa(n int) string { diff --git a/subjects/itoabase.en.md b/subjects/itoabase.en.md index 2a1040edd..110054829 100644 --- a/subjects/itoabase.en.md +++ b/subjects/itoabase.en.md @@ -4,15 +4,15 @@ Write a function that: -- converts an integer value to a string using the specified base in the argument -- and then returns this string +- converts an `int` value to a `string` using the specified base in the argument +- and that returns this `string` -The base is expressed as an integer, from 2 to 16. The characters comprising +The base is expressed as an `int`, from 2 to 16. The characters comprising the base are the digits from 0 to 9, followed by uppercase letters from A to F. For example, the base `4` would be the equivalent of "0123" and the base `16` would be the equivalent of "0123456789ABCDEF". -If the value is negative, the resulting string has to be preceded with a +If the value is negative, the resulting `string` has to be preceded with a minus sign `-`. ### Expected function diff --git a/subjects/itoabase.fr.md b/subjects/itoabase.fr.md index 2a1040edd..d287831fb 100644 --- a/subjects/itoabase.fr.md +++ b/subjects/itoabase.fr.md @@ -2,20 +2,18 @@ ### Instructions -Write a function that: +Écrire une fonction qui: -- converts an integer value to a string using the specified base in the argument -- and then returns this string +- convertit une valeur `int` en `string` en utilisant la base spécifiée en argument +- et qui retourne cette `string` -The base is expressed as an integer, from 2 to 16. The characters comprising -the base are the digits from 0 to 9, followed by uppercase letters from A to F. +Cette base est exprimée comme un `int`, de 2 à 16. Les caractères compris dans la base sont les chiffres de 0 à 9, suivis des lettres majuscules de A à F. -For example, the base `4` would be the equivalent of "0123" and the base `16` would be the equivalent of "0123456789ABCDEF". +Par exemple, la base `4` sera équivalente à "0123" et la base `16` sera équivalente à "0123456789ABCDEF". -If the value is negative, the resulting string has to be preceded with a -minus sign `-`. +Si la valeur est négative, la `string` résultante doit être précédée d'un signe moins `-`. -### Expected function +### Fonction attendue ```go func ItoaBase(value, base int) string { diff --git a/subjects/join.en.md b/subjects/join.en.md index cf5800d35..d5daaba3c 100644 --- a/subjects/join.en.md +++ b/subjects/join.en.md @@ -33,8 +33,8 @@ func main() { And its output : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test Hello!: How: are: you? -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/join.fr.md b/subjects/join.fr.md index 03317193a..0a3584e6b 100644 --- a/subjects/join.fr.md +++ b/subjects/join.fr.md @@ -33,8 +33,8 @@ func main() { Et son résultat : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test Hello!: How: are: you? -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/lastrune.en.md b/subjects/lastrune.en.md index 03a110671..e9bd15217 100644 --- a/subjects/lastrune.en.md +++ b/subjects/lastrune.en.md @@ -35,8 +35,8 @@ func main() { And its output : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test !!! -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/lastrune.fr.md b/subjects/lastrune.fr.md index da208207d..fdd47229c 100644 --- a/subjects/lastrune.fr.md +++ b/subjects/lastrune.fr.md @@ -35,8 +35,8 @@ func main() { Et son résultat : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test !!! -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/lastword.en.md b/subjects/lastword.en.md index 0efe663cc..eedbc703d 100644 --- a/subjects/lastword.en.md +++ b/subjects/lastword.en.md @@ -8,7 +8,7 @@ Write a program that takes a `string` and displays its last word, followed by a - The output will be followed by a newline(`'\n'`). -- If the number of parameters is not 1, or if there are no words, the program displays a newline(`'\n'`). +- If the number of parameters is different from 1, or if there are no word, the program displays a newline(`'\n'`). ### Usage diff --git a/subjects/lastword.fr.md b/subjects/lastword.fr.md index d56a3a514..65b0a2c72 100644 --- a/subjects/lastword.fr.md +++ b/subjects/lastword.fr.md @@ -4,11 +4,11 @@ Écrire un programme qui prend une `string` et qui affiche son dernier mot, suivi d'un newline(`'\n'`). -- Un mot est une section de `string` délimité par des espace ou par le début/fin d'une `string`. +- Un mot est une section de `string` délimitée par des espaces ou par le début/fin d'une `string`. - L'output sera suivi d'un newline(`'\n'`). -- Si le nombre de paramètres n'est pas 1, ou si il n'y a pas de mots, le programme affiche un newline(`'\n'`). +- Si le nombre de paramètres est différent de 1, ou si il n'y a pas de mot, le programme affiche un newline(`'\n'`). ### Utilisation diff --git a/subjects/listat.en.md b/subjects/listat.en.md index 0ae017591..8f8d9aeef 100644 --- a/subjects/listat.en.md +++ b/subjects/listat.en.md @@ -50,10 +50,10 @@ func main() { And its output : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test 1 how are -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/listat.fr.md b/subjects/listat.fr.md index 9d7467ddb..6010b4294 100644 --- a/subjects/listat.fr.md +++ b/subjects/listat.fr.md @@ -50,10 +50,10 @@ func main() { Et son résultat : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test 1 how are -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/listclear.en.md b/subjects/listclear.en.md index 590f436d5..5bf9a8d93 100644 --- a/subjects/listclear.en.md +++ b/subjects/listclear.en.md @@ -58,11 +58,11 @@ func main() { And its output : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test ------list------ I -> 1 -> something -> 2 -> ------updated list------ -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/listclear.fr.md b/subjects/listclear.fr.md index fa073f9b9..80e33a767 100644 --- a/subjects/listclear.fr.md +++ b/subjects/listclear.fr.md @@ -58,11 +58,11 @@ func main() { Et son résultat : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test ------list------ I -> 1 -> something -> 2 -> ------updated list------ -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/listfind.en.md b/subjects/listfind.en.md index b17e4f45d..f7271e413 100644 --- a/subjects/listfind.en.md +++ b/subjects/listfind.en.md @@ -58,11 +58,11 @@ func main() { And its output : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test 0xc42000a0a0 hello2 -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` ### Note diff --git a/subjects/listfind.fr.md b/subjects/listfind.fr.md index 6f553abf6..2be405aee 100644 --- a/subjects/listfind.fr.md +++ b/subjects/listfind.fr.md @@ -58,11 +58,11 @@ func main() { Et son résultat : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test 0xc42000a0a0 hello2 -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` ### Note diff --git a/subjects/listforeach.en.md b/subjects/listforeach.en.md index d2f91bb4b..d0ab40d4c 100644 --- a/subjects/listforeach.en.md +++ b/subjects/listforeach.en.md @@ -63,7 +63,7 @@ func main() { piscine.ListPushBack(link, "3") piscine.ListPushBack(link, "5") - piscine.ListForEach(link, piscine.Add2) + piscine.ListForEach(link, piscine.Add2_node) it := link.Head for it != nil { @@ -76,11 +76,11 @@ func main() { And its output : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test 12 22 32 52 -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/listforeach.fr.md b/subjects/listforeach.fr.md index 75d6c2e58..042ecdedd 100644 --- a/subjects/listforeach.fr.md +++ b/subjects/listforeach.fr.md @@ -63,7 +63,7 @@ func main() { piscine.ListPushBack(link, "3") piscine.ListPushBack(link, "5") - piscine.ListForEach(link, piscine.Add2) + piscine.ListForEach(link, piscine.Add2_node) it := link.Head for it != nil { @@ -76,11 +76,11 @@ func main() { Et son résultat : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test 12 22 32 52 -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/listforeachif.en.md b/subjects/listforeachif.en.md index 497e3dc29..e1d0f163d 100644 --- a/subjects/listforeachif.en.md +++ b/subjects/listforeachif.en.md @@ -86,7 +86,7 @@ func PrintList(l *piscine.List) { fmt.Print(it.Data, "->") it = it.Next } - fmt.Println() + fmt.Print("nil","\n") } func main() { @@ -118,14 +118,17 @@ func main() { And its output : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test -1 -> hello -> 3 -> there -> 23 -> ! -> 54 -> +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test +1->hello->3->there->23->!->54->nil --------function applied-------- -hello -there -! +1 +3 +23 +54 --------function applied-------- -1 -> 1 -> 3 -> 1 -> 23 -> 1 -> 54 -> -student@ubuntu:~/piscine/test$ +1->2->3->2->23->2->54->nil + +student@ubuntu:~/piscine-go/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/listforeachif.fr.md b/subjects/listforeachif.fr.md index c0f6be181..9228f26ea 100644 --- a/subjects/listforeachif.fr.md +++ b/subjects/listforeachif.fr.md @@ -86,7 +86,7 @@ func PrintList(l *piscine.List) { fmt.Print(it.Data, "->") it = it.Next } - fmt.Println() + fmt.Print("nil","\n") } func main() { @@ -118,14 +118,15 @@ func main() { Et son résultat : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test -1 -> hello -> 3 -> there -> 23 -> ! -> 54 -> +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test +1->hello->3->there->23->!->54->nil --------function applied-------- -hello -there -! +1 +3 +23 +54 --------function applied-------- -1 -> 1 -> 3 -> 1 -> 23 -> 1 -> 54 -> -student@ubuntu:~/piscine/test$ +1->2->3->2->23->2->54->nil +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/listlast.en.md b/subjects/listlast.en.md index 4fa672ad8..84fad8c96 100644 --- a/subjects/listlast.en.md +++ b/subjects/listlast.en.md @@ -51,9 +51,9 @@ func main() { And its output : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test 1 -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/listlast.fr.md b/subjects/listlast.fr.md index d50831d1e..e3e137dad 100644 --- a/subjects/listlast.fr.md +++ b/subjects/listlast.fr.md @@ -51,9 +51,9 @@ func main() { Et son résultat : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test 1 -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/listmerge.en.md b/subjects/listmerge.en.md index 0a72201fe..529d0ed29 100644 --- a/subjects/listmerge.en.md +++ b/subjects/listmerge.en.md @@ -73,8 +73,13 @@ func main() { And its output : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test +-----first List------ +a -> b -> c -> d -> +-----second List------ +e -> f -> g -> h -> +-----Merged List----- a -> b -> c -> d -> e -> f -> g -> h -> -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/listmerge.fr.md b/subjects/listmerge.fr.md index acf7cce69..b9255c7dc 100644 --- a/subjects/listmerge.fr.md +++ b/subjects/listmerge.fr.md @@ -73,8 +73,8 @@ func main() { Et son résultat : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test a -> b -> c -> d -> e -> f -> g -> h -> -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/listpushback.en.md b/subjects/listpushback.en.md index 9cecd849b..ba735ee33 100644 --- a/subjects/listpushback.en.md +++ b/subjects/listpushback.en.md @@ -51,10 +51,10 @@ func main() { And its output : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test Hello man how are you -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/listpushback.fr.md b/subjects/listpushback.fr.md index e4637db86..cca420154 100644 --- a/subjects/listpushback.fr.md +++ b/subjects/listpushback.fr.md @@ -51,10 +51,10 @@ func main() { Et son résultat : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test Hello man how are you -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/listpushfront.en.md b/subjects/listpushfront.en.md index dd01e9fa9..6aac8e067 100644 --- a/subjects/listpushfront.en.md +++ b/subjects/listpushfront.en.md @@ -1,8 +1,8 @@ -## listpushback +## listpushfront ### Instructions -Write a function `ListPushBack` that inserts a new element `NodeL` at the beginning of the list `l` while using the structure `List` +Write a function `ListPushFront` that inserts a new element `NodeL` at the beginning of the list `l` while using the structure `List` ### Expected function and structure @@ -29,8 +29,9 @@ Here is a possible [program](TODO-LINK) to test your function : package main import ( - piscine ".." "fmt" + + piscine ".." ) func main() { @@ -43,19 +44,18 @@ func main() { it := link.Head for it != nil { - fmt.Println(it.Data) + fmt.Print(it.Data, " ") it = it.Next } + fmt.Println() } ``` And its output : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test -how are you -man -Hello -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test +how are you man Hello +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/listpushfront.fr.md b/subjects/listpushfront.fr.md index 4a2ddd2a7..89a75b167 100644 --- a/subjects/listpushfront.fr.md +++ b/subjects/listpushfront.fr.md @@ -1,8 +1,8 @@ -## listpushback +## listpushfront ### Instructions -Écrire une fonction `ListPushBack` qui insère un nouvel élément `NodeL` au début de la liste `l` en utilisant la structure `List`. +Écrire une fonction `ListPushFront` qui insère un nouvel élément `NodeL` au début de la liste `l` en utilisant la structure `List`. ### Fonction et structue attendues @@ -29,8 +29,9 @@ Voici un éventuel [programme](TODO-LINK) pour tester votre fonction : package main import ( - piscine ".." "fmt" + + piscine ".." ) func main() { @@ -43,19 +44,18 @@ func main() { it := link.Head for it != nil { - fmt.Println(it.Data) + fmt.Print(it.Data, " ") it = it.Next } + fmt.Println() } ``` Et son résultat : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test -how are you -man -Hello -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test +how are you man Hello +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/listpushpara.en.md b/subjects/listpushpara.en.md index 08520796c..df36aab7e 100644 --- a/subjects/listpushpara.en.md +++ b/subjects/listpushpara.en.md @@ -9,12 +9,12 @@ Write a program that creates a new linked list and includes each command-line ar And its output : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./listpushparams choumi is the best cat +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./listpushparams choumi is the best cat cat best the is choumi -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/listpushpara.fr.md b/subjects/listpushpara.fr.md deleted file mode 100644 index 08520796c..000000000 --- a/subjects/listpushpara.fr.md +++ /dev/null @@ -1,20 +0,0 @@ -## listpushpara - -### Instructions - -Write a program that creates a new linked list and includes each command-line argument in to the list. - -- The first argument should be at the end of the list - -And its output : - -```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./listpushparams choumi is the best cat -cat -best -the -is -choumi -student@ubuntu:~/piscine/test$ -``` diff --git a/subjects/listpushparams.en.md b/subjects/listpushparams.en.md index c799dce26..4dcdd9660 100644 --- a/subjects/listpushparams.en.md +++ b/subjects/listpushparams.en.md @@ -11,12 +11,12 @@ Write a program that creates a new linked list and includes each command-line ar And its output : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./listpushparams choumi is the best cat +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./listpushparams choumi is the best cat cat best the is choumi -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ```` diff --git a/subjects/listpushparams.fr.md b/subjects/listpushparams.fr.md index 7db913a68..77b6a87a2 100644 --- a/subjects/listpushparams.fr.md +++ b/subjects/listpushparams.fr.md @@ -36,9 +36,9 @@ func main() { Et son résultat : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test 0 2 -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/listremoveif.en.md b/subjects/listremoveif.en.md index 5ed93d302..4f5636a35 100644 --- a/subjects/listremoveif.en.md +++ b/subjects/listremoveif.en.md @@ -2,7 +2,7 @@ ### Instructions -Write a function `ListRemoveIf` that removes all elements that are equal to the `data_ref` introduced in the argument of the function. +Write a function `ListRemoveIf` that removes all elements that are equal to the `data_ref` in the argument of the function. ### Expected function and structure @@ -81,8 +81,8 @@ func main() { And its output : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test ----normal state---- 1 -> ------answer----- @@ -92,5 +92,5 @@ student@ubuntu:~/piscine/test$ ./test 1 -> Hello -> 1 -> There -> 1 -> 1 -> How -> 1 -> are -> you -> 1 -> ------answer----- Hello -> There -> How -> are -> you -> -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/listremoveif.fr.md b/subjects/listremoveif.fr.md index fa4c9650e..8e5a32fc6 100644 --- a/subjects/listremoveif.fr.md +++ b/subjects/listremoveif.fr.md @@ -81,8 +81,8 @@ func main() { Et son résultat : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test ----normal state---- 1 -> ------answer----- @@ -92,5 +92,5 @@ student@ubuntu:~/piscine/test$ ./test 1 -> Hello -> 1 -> There -> 1 -> 1 -> How -> 1 -> are -> you -> 1 -> ------answer----- Hello -> There -> How -> are -> you -> -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/listreverse.en.md b/subjects/listreverse.en.md index ceffdc402..b49cb7600 100644 --- a/subjects/listreverse.en.md +++ b/subjects/listreverse.en.md @@ -58,13 +58,13 @@ func main() { And its output : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test 4 3 2 1 Tail &{1 } Head &{4 0xc42000a140} -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/listreverse.fr.md b/subjects/listreverse.fr.md index ec962b58d..9e8be6e5e 100644 --- a/subjects/listreverse.fr.md +++ b/subjects/listreverse.fr.md @@ -58,13 +58,13 @@ func main() { Et son résultat : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test 4 3 2 1 Tail &{1 } Head &{4 0xc42000a140} -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/listsize.en.md b/subjects/listsize.en.md index eea17c08c..454a3d36d 100644 --- a/subjects/listsize.en.md +++ b/subjects/listsize.en.md @@ -50,8 +50,8 @@ func main() { And its output : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test 4 -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/listsize.fr.md b/subjects/listsize.fr.md index 77a057914..ab1696a96 100644 --- a/subjects/listsize.fr.md +++ b/subjects/listsize.fr.md @@ -50,8 +50,8 @@ func main() { Et son résultat : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test 4 -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/listsort.en.md b/subjects/listsort.en.md index 5a3393b3b..e0e6730ce 100644 --- a/subjects/listsort.en.md +++ b/subjects/listsort.en.md @@ -71,8 +71,8 @@ func main() { And its output : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test 1 -> 2 -> 3 -> 4 -> 5 -> -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/listsort.fr.md b/subjects/listsort.fr.md index a87bdc0ea..da1918bbf 100644 --- a/subjects/listsort.fr.md +++ b/subjects/listsort.fr.md @@ -71,8 +71,8 @@ func main() { Et son résultat : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test 1 -> 2 -> 3 -> 4 -> 5 -> -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/makerange.en.md b/subjects/makerange.en.md index 0c96b3682..ce2f47708 100644 --- a/subjects/makerange.en.md +++ b/subjects/makerange.en.md @@ -39,9 +39,9 @@ func main() { And its output : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test [5 6 7 8 9] [] -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/makerange.fr.md b/subjects/makerange.fr.md index 3e12b377b..7be894121 100644 --- a/subjects/makerange.fr.md +++ b/subjects/makerange.fr.md @@ -38,9 +38,9 @@ func main() { Et son résultat : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test [5 6 7 8 9] [] -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/map.en.md b/subjects/map.en.md index 83fc61ad0..0d5ff3e54 100644 --- a/subjects/map.en.md +++ b/subjects/map.en.md @@ -33,8 +33,8 @@ func main() { And its output : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test [false true true false true false] -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/map.fr.md b/subjects/map.fr.md index 501ae029a..d9ffcaa13 100644 --- a/subjects/map.fr.md +++ b/subjects/map.fr.md @@ -33,8 +33,8 @@ func main() { Et son résultat : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test [false true true false true false] -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/max.en.md b/subjects/max.en.md index 5c8c44f0d..0b803dd76 100644 --- a/subjects/max.en.md +++ b/subjects/max.en.md @@ -34,8 +34,8 @@ func main() { And its output : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test 123 -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/max.fr.md b/subjects/max.fr.md index a7b688a70..7c1ea7d5a 100644 --- a/subjects/max.fr.md +++ b/subjects/max.fr.md @@ -34,8 +34,8 @@ func main() { Et son résultat : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test 123 -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/now-get-to-work.en.md b/subjects/now-get-to-work.en.md index 6ac5d5be3..9bbeab3c0 100644 --- a/subjects/now-get-to-work.en.md +++ b/subjects/now-get-to-work.en.md @@ -11,9 +11,9 @@ Submit your solution in the file `my_answer.sh` that will print it when executed ### Utilisation ```console -student@ubuntu:~/piscine/test$ ./my_answer.sh | cat -e +student@ubuntu:~/piscine-go/test$ ./my_answer.sh | cat -e John Doe$ -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` ### Hint diff --git a/subjects/now-get-to-work.fr.md b/subjects/now-get-to-work.fr.md index c42efb01f..6a5036bdb 100644 --- a/subjects/now-get-to-work.fr.md +++ b/subjects/now-get-to-work.fr.md @@ -11,9 +11,9 @@ Rendez votre solution dans un fichier `my_answer.sh` qui l'affichera quand exéc ### Usage ```console -student@ubuntu:~/piscine/test$ ./my_answer.sh | cat -e +student@ubuntu:~/piscine-go/test$ ./my_answer.sh | cat -e John Doe$ -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` ### Hint diff --git a/subjects/nrune.en.md b/subjects/nrune.en.md index 3cafbf166..665444c4b 100644 --- a/subjects/nrune.en.md +++ b/subjects/nrune.en.md @@ -35,8 +35,8 @@ func main() { And its output : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test la! -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/nrune.fr.md b/subjects/nrune.fr.md index 8e69dec24..1874e2b10 100644 --- a/subjects/nrune.fr.md +++ b/subjects/nrune.fr.md @@ -35,8 +35,8 @@ func main() { Et son résultat : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test la! -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/options.en.md b/subjects/options.en.md index 0c7e426dd..943dd86e1 100644 --- a/subjects/options.en.md +++ b/subjects/options.en.md @@ -2,33 +2,33 @@ ## Instructions -Write a program that takes an undefined number of arguments which could be considered as options and writes on the standard output a representation of those options as groups of bytes followed by a newline. +Write a program that takes an undefined number of arguments which could be considered as `options` and writes on the standard output a representation of those `options` as groups of `bytes` followed by a newline(`'\n'`). -- An option is an argument that begins by a `-` and have multiple characters which could be : - - abcdefghijklmnopqrstuvwxyz +- An `option` is an argument that begins with a `-` and that can have multiple characters which could be : + -abcdefghijklmnopqrstuvwxyz -- All options are stocked in a single int and each options represents a bit of that int, and should be stocked like this : +- All `options` are stocked in a single `int` and each `options` represents a bit of that `int`, and should be stocked like this : - - 00000000 00000000 00000000 00000000 - - ******zy xwvutsrq ponmlkji hgfedcba + - 00000000 00000000 00000000 00000000 + - ******zy xwvutsrq ponmlkji hgfedcba -- Launching the program without arguments or with the `-h` flag activated must print all the valid options on the standard output, as shown on one of the following examples. +- Launching the program without arguments or with the `-h` flag activated must print all the valid `options` on the standard output, as shown on one of the following examples. -- A wrong option must print "Invalid Option" followed by a newline. +- A wrong `option` must print `Invalid Option` followed by a newline. -## Expected output +## Usage ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test | cat -e +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test | cat -e options: abcdefghijklmnopqrstuvwxyz$ -student@ubuntu:~/piscine/test$ ./test -abc -ijk | cat -e +student@ubuntu:~/piscine-go/test$ ./test -abc -ijk | cat -e 00000000 00000000 00000111 00000111$ -student@ubuntu:~/piscine/test$ ./test -z | cat -e +student@ubuntu:~/piscine-go/test$ ./test -z | cat -e 00000010 00000000 00000000 00000000$ -student@ubuntu:~/piscine/test$ ./test -abc -hijk | cat -e +student@ubuntu:~/piscine-go/test$ ./test -abc -hijk | cat -e options: abcdefghijklmnopqrstuvwxyz$ -student@ubuntu:~/piscine/test$ ./test -% | cat -e +student@ubuntu:~/piscine-go/test$ ./test -% | cat -e Invalid Option$ -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/options.fr.md b/subjects/options.fr.md index 0c7e426dd..e4ae7902f 100644 --- a/subjects/options.fr.md +++ b/subjects/options.fr.md @@ -2,33 +2,33 @@ ## Instructions -Write a program that takes an undefined number of arguments which could be considered as options and writes on the standard output a representation of those options as groups of bytes followed by a newline. +Écrire un programme qui prend un nombre indéfini d'arguments qui peuvent être considérés comme des `options` et qui affiche sur la sortie standard une représentation de ces `options` comme groupes de `bytes`(octets) suivi d'un newline(`'\n'`). -- An option is an argument that begins by a `-` and have multiple characters which could be : - - abcdefghijklmnopqrstuvwxyz +- Une `option` est un argument qui commence avec un `-` et qui peux avoir de multiples caractères qui peuvent être : + -abcdefghijklmnopqrstuvwxyz -- All options are stocked in a single int and each options represents a bit of that int, and should be stocked like this : +- Toutes les `options` sont stockées dans un seul `int` et chaque `option` représente un bit de cet `int`, et doit être stocké comme ci-dessous : - - 00000000 00000000 00000000 00000000 - - ******zy xwvutsrq ponmlkji hgfedcba + - 00000000 00000000 00000000 00000000 + - ******zy xwvutsrq ponmlkji hgfedcba -- Launching the program without arguments or with the `-h` flag activated must print all the valid options on the standard output, as shown on one of the following examples. +- L'éxécution du programme sans argument ou avec l'option `-h` activée doit afficher toutes les `options` valides sur la sortie standard, comme montré dans un des exemples ci-dessous. -- A wrong option must print "Invalid Option" followed by a newline. +- Une mauvaise `option` doit afficher `Invalid Option` suivi d'un newline. -## Expected output +## Utilisation ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test | cat -e +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test | cat -e options: abcdefghijklmnopqrstuvwxyz$ -student@ubuntu:~/piscine/test$ ./test -abc -ijk | cat -e +student@ubuntu:~/piscine-go/test$ ./test -abc -ijk | cat -e 00000000 00000000 00000111 00000111$ -student@ubuntu:~/piscine/test$ ./test -z | cat -e +student@ubuntu:~/piscine-go/test$ ./test -z | cat -e 00000010 00000000 00000000 00000000$ -student@ubuntu:~/piscine/test$ ./test -abc -hijk | cat -e +student@ubuntu:~/piscine-go/test$ ./test -abc -hijk | cat -e options: abcdefghijklmnopqrstuvwxyz$ -student@ubuntu:~/piscine/test$ ./test -% | cat -e +student@ubuntu:~/piscine-go/test$ ./test -% | cat -e Invalid Option$ -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/paramcount.en.md b/subjects/paramcount.en.md index c11c71718..8eb3a911c 100644 --- a/subjects/paramcount.en.md +++ b/subjects/paramcount.en.md @@ -3,11 +3,11 @@ ### Instructions Write a program that displays the number of arguments passed to it. This number will be followed by -a newline. +a newline(`'\n'`). -If there are no arguments, just display a 0 followed by a newline. +If there is no argument, the program displays `0` followed by a newline. -Examples of outputs : +### Usage ```console student@ubuntu:~/student/paramcount$ go build diff --git a/subjects/paramcount.fr.md b/subjects/paramcount.fr.md index c11c71718..438392a11 100644 --- a/subjects/paramcount.fr.md +++ b/subjects/paramcount.fr.md @@ -2,12 +2,11 @@ ### Instructions -Write a program that displays the number of arguments passed to it. This number will be followed by -a newline. +Écrire un programme qui affiche le nombre d'arguments passés à ce programme. Ce nombre sera suivi d'un newline(`'\n'`). -If there are no arguments, just display a 0 followed by a newline. +Si il n'y a pas d'argument, le programme affiche `0` suivi d'un newline. -Examples of outputs : +### Utilisation ```console student@ubuntu:~/student/paramcount$ go build diff --git a/subjects/point.en.md b/subjects/point.en.md index f91b29bad..e5bd6a462 100644 --- a/subjects/point.en.md +++ b/subjects/point.en.md @@ -30,8 +30,8 @@ func main() { ### Expected output ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test x = 42, y = 21 -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/point.fr.md b/subjects/point.fr.md index 326af58ba..093c55c0e 100644 --- a/subjects/point.fr.md +++ b/subjects/point.fr.md @@ -31,8 +31,8 @@ func main() { ### Usage ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test x = 42, y = 21 -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/pointone.en.md b/subjects/pointone.en.md index 0329c3f44..13deaa74f 100644 --- a/subjects/pointone.en.md +++ b/subjects/pointone.en.md @@ -34,8 +34,8 @@ func main() { And its output : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test 1 -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/pointone.fr.md b/subjects/pointone.fr.md index 1b02b7798..f562ae8e4 100644 --- a/subjects/pointone.fr.md +++ b/subjects/pointone.fr.md @@ -34,8 +34,8 @@ func main() { Et son résultat : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test 1 -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/printalphabet.en.md b/subjects/printalphabet.en.md index bf9efc564..493703d84 100644 --- a/subjects/printalphabet.en.md +++ b/subjects/printalphabet.en.md @@ -9,8 +9,8 @@ A line is a sequence of characters preceding the [end of line](https://en.wikipe ### Usage ```console -student@ubuntu:~/piscine/printalphabet$ go build -student@ubuntu:~/piscine/printalphabet$ ./printalphabet +student@ubuntu:~/piscine-go/printalphabet$ go build +student@ubuntu:~/piscine-go/printalphabet$ ./printalphabet abcdefghijklmnopqrstuvwxyz -student@ubuntu:~/piscine/printalphabet$ +student@ubuntu:~/piscine-go/printalphabet$ ``` diff --git a/subjects/printalphabet.fr.md b/subjects/printalphabet.fr.md index 8275d9803..07a71671d 100644 --- a/subjects/printalphabet.fr.md +++ b/subjects/printalphabet.fr.md @@ -9,8 +9,8 @@ Une ligne est une suite de caractères précédant le caractère [fin de ligne]( ### Utilisation ```console -student@ubuntu:~/piscine/printalphabet$ go build -student@ubuntu:~/piscine/printalphabet$ ./printalphabet +student@ubuntu:~/piscine-go/printalphabet$ go build +student@ubuntu:~/piscine-go/printalphabet$ ./printalphabet abcdefghijklmnopqrstuvwxyz -student@ubuntu:~/piscine/printalphabet$ +student@ubuntu:~/piscine-go/printalphabet$ ``` diff --git a/subjects/printbits.en.md b/subjects/printbits.en.md index f27dfaee9..65be83a1b 100644 --- a/subjects/printbits.en.md +++ b/subjects/printbits.en.md @@ -16,4 +16,4 @@ func PrintBits(octe byte) { Example of output: -If 2 is passed to the function PrintBits, it will print "00000010". +If 2 is passed to the function `PrintBits`, it will print "00000010". diff --git a/subjects/printbits.fr.md b/subjects/printbits.fr.md index f27dfaee9..8e546ddd0 100644 --- a/subjects/printbits.fr.md +++ b/subjects/printbits.fr.md @@ -2,9 +2,9 @@ ### Instructions -Write a function that takes a byte, and prints it in binary value **without a newline at the end**. +Écrire une fonction qui prend un `byte`, et qui l'affiche en valeur binaire **sans newline à la fin**. -### Expected function +### Fonction attendue ```go func PrintBits(octe byte) { @@ -14,6 +14,6 @@ func PrintBits(octe byte) { ### Usage -Example of output: +Exemple d'output: -If 2 is passed to the function PrintBits, it will print "00000010". +Si 2 est passé à la fonction `PrintBits`, elle affichera "00000010". diff --git a/subjects/printcomb.en.md b/subjects/printcomb.en.md index a836e1a92..1ccaea33e 100644 --- a/subjects/printcomb.en.md +++ b/subjects/printcomb.en.md @@ -31,10 +31,10 @@ func main() { This is the incomplete output : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test 012, 013, 014, 015, 016, 017, 018, 019, 023, ..., 689, 789 -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` `000` or `999` are not valid combinations because the digits are not different. diff --git a/subjects/printcomb.fr.md b/subjects/printcomb.fr.md index f224897a0..20800a7ef 100644 --- a/subjects/printcomb.fr.md +++ b/subjects/printcomb.fr.md @@ -31,10 +31,10 @@ func main() { Voici la sortie tronquée : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test 012, 013, 014, 015, 016, 017, 018, 019, 023, ..., 689, 789 -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` `000` et `999` ne sont pas des combinations valides parce que les chiffres ne sont pas différents. diff --git a/subjects/printcomb2.en.md b/subjects/printcomb2.en.md index 356253bfc..92c50bd32 100644 --- a/subjects/printcomb2.en.md +++ b/subjects/printcomb2.en.md @@ -31,8 +31,8 @@ func main() { This is the incomplete output : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test 00 01, 00 02, 00 03, ..., 00 98, 00 99, 01 02, 01 03, ..., 97 98, 97 99, 98 99 -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/printcomb2.fr.md b/subjects/printcomb2.fr.md index fc32dabeb..f45343466 100644 --- a/subjects/printcomb2.fr.md +++ b/subjects/printcomb2.fr.md @@ -31,8 +31,8 @@ func main() { Voici la sortie tronquée : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test 00 01, 00 02, 00 03, ..., 00 98, 00 99, 01 02, 01 03, ..., 97 98, 97 99, 98 99 -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/printcombn.en.md b/subjects/printcombn.en.md index 88154648d..56fa83a10 100644 --- a/subjects/printcombn.en.md +++ b/subjects/printcombn.en.md @@ -32,15 +32,17 @@ import piscine ".." func main() { piscine.PrintCombN(1) piscine.PrintCombN(2) - piscine.PrintCombN(123) + piscine.PrintCombN(9) } ``` And its output : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test --1230123 -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test +0, 1, 2, 3, 4, 5, 6, 7, 8, 9 +012, 013, 014, 015, 016, 017, 018, ... 679, 689, 789 +012345678, 012345679, ..., 123456789 +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/printdigits.en.md b/subjects/printdigits.en.md index 1824df87f..55a95a9d3 100644 --- a/subjects/printdigits.en.md +++ b/subjects/printdigits.en.md @@ -9,8 +9,8 @@ A line is a sequence of characters preceding the [end of line](https://en.wikipe ### Usage ```console -student@ubuntu:~/piscine/printdigits$ go build -student@ubuntu:~/piscine/printdigits$ ./printdigits +student@ubuntu:~/piscine-go/printdigits$ go build +student@ubuntu:~/piscine-go/printdigits$ ./printdigits 0123456789 -student@ubuntu:~/piscine/printdigits$ +student@ubuntu:~/piscine-go/printdigits$ ``` diff --git a/subjects/printdigits.fr.md b/subjects/printdigits.fr.md index b81d59ec5..a1a1b03f7 100644 --- a/subjects/printdigits.fr.md +++ b/subjects/printdigits.fr.md @@ -9,8 +9,8 @@ Une ligne est une suite de caractères précédant le caractère [fin de ligne]( ### Utilisation ```console -student@ubuntu:~/piscine/printdigits$ go build -student@ubuntu:~/piscine/printdigits$ ./printdigits +student@ubuntu:~/piscine-go/printdigits$ go build +student@ubuntu:~/piscine-go/printdigits$ ./printdigits 0123456789 -student@ubuntu:~/piscine/printdigits$ +student@ubuntu:~/piscine-go/printdigits$ ``` diff --git a/subjects/printhex.en.md b/subjects/printhex.en.md index efe74562c..e589c680a 100644 --- a/subjects/printhex.en.md +++ b/subjects/printhex.en.md @@ -2,21 +2,21 @@ ### Instructions -Write a program that takes a positive (or zero) number expressed in base 10, and displays it in base 16 ( with lowercase letters) followed by a newline. +Write a program that takes a positive (or zero) number expressed in base 10, and displays it in base 16 (with lowercase letters) followed by a newline(`'\n'`). -- If the number of parameters is not 1, the program displays a newline. +- If the number of parameters is different from 1, the program displays a newline. -Examples of outputs : +### Usage ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test "10" +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test "10" a -student@ubuntu:~/piscine/test$ ./test "255" +student@ubuntu:~/piscine-go/test$ ./test "255" ff -student@ubuntu:~/piscine/test$ ./test "5156454" +student@ubuntu:~/piscine-go/test$ ./test "5156454" 4eae66 -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ -student@ubuntu:~/piscine/ +student@ubuntu:~/piscine-go/ ``` diff --git a/subjects/printhex.fr.md b/subjects/printhex.fr.md index efe74562c..3b31b9456 100644 --- a/subjects/printhex.fr.md +++ b/subjects/printhex.fr.md @@ -2,21 +2,21 @@ ### Instructions -Write a program that takes a positive (or zero) number expressed in base 10, and displays it in base 16 ( with lowercase letters) followed by a newline. +Écrire un programme qui prend un nombre positif (ou zéro) écrit en base 10, et qui l'affiche en base 16 (avec les lettres en minuscule) suivi d'un newline(`'\n`'). -- If the number of parameters is not 1, the program displays a newline. +- Si le nombre de paramètres est différent de 1, le programme affiche un newline. -Examples of outputs : +### Utilisation ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test "10" +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test "10" a -student@ubuntu:~/piscine/test$ ./test "255" +student@ubuntu:~/piscine-go/test$ ./test "255" ff -student@ubuntu:~/piscine/test$ ./test "5156454" +student@ubuntu:~/piscine-go/test$ ./test "5156454" 4eae66 -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ -student@ubuntu:~/piscine/ +student@ubuntu:~/piscine-go/ ``` diff --git a/subjects/printmemory.en.md b/subjects/printmemory.en.md index 79631a414..25dfc758e 100644 --- a/subjects/printmemory.en.md +++ b/subjects/printmemory.en.md @@ -26,11 +26,11 @@ func main() { And its output : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test | cat -e +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test | cat -e 6800 0000 6500 0000 6c00 0000 6c00 0000 $ 6f00 0000 1000 0000 1500 0000 2a00 0000 $ 0000 0000 0000 0000 $ hello..*..$ -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/printmemory.fr.md b/subjects/printmemory.fr.md index 79631a414..55f05ad6f 100644 --- a/subjects/printmemory.fr.md +++ b/subjects/printmemory.fr.md @@ -2,9 +2,9 @@ ### Instructions -Write a function that takes `(arr [10]int)`, and displays the memory as in the example. +Écrire une fonction qui prend `(arr [10]int)`, et qui affiche la mémoire comme dans l'exemple. -### Expected function +### Fonction attendue ```go func PrintMemory(arr [10]int) { @@ -12,9 +12,9 @@ func PrintMemory(arr [10]int) { } ``` -### Usage +### Utilisation -Here is a possible program to test your function : +Voici un éventuel [programme](TODO-LINK) pour tester votre fonction : ```go func main() { @@ -23,14 +23,14 @@ func main() { } ``` -And its output : +Et son résultat : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test | cat -e +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test | cat -e 6800 0000 6500 0000 6c00 0000 6c00 0000 $ 6f00 0000 1000 0000 1500 0000 2a00 0000 $ 0000 0000 0000 0000 $ hello..*..$ -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/printnbr.en.md b/subjects/printnbr.en.md index aadc13e93..ec84a6cd7 100644 --- a/subjects/printnbr.en.md +++ b/subjects/printnbr.en.md @@ -33,8 +33,8 @@ func main() { And its output : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test -1230123 -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/printnbr.fr.md b/subjects/printnbr.fr.md index be46fa5d1..5737a70f3 100644 --- a/subjects/printnbr.fr.md +++ b/subjects/printnbr.fr.md @@ -33,8 +33,8 @@ func main() { Et son résultat : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test -1230123 -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/printnbrbase.en.md b/subjects/printnbrbase.en.md index 27ba70dcb..50fb008fa 100644 --- a/subjects/printnbrbase.en.md +++ b/subjects/printnbrbase.en.md @@ -52,12 +52,12 @@ func main() { And its output : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test 125 -1111101 7D -uoi NV -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/printnbrbase.fr.md b/subjects/printnbrbase.fr.md index 73bb5fa86..d724dfb15 100644 --- a/subjects/printnbrbase.fr.md +++ b/subjects/printnbrbase.fr.md @@ -6,13 +6,13 @@ Si la base n'est pas valide, la fonction affiche `NV` (Not Valid): -Régles de validité d'une base : +Règles de validité d'une base : -- Une base doit contenir au moins 2 charactères. -- Chaque charactère d'une base doit être unique. -- Une base ne doit pas contenir les charactères `+` ou `-`. +- Une base doit contenir au moins 2 caractères. +- Chaque caractère d'une base doit être unique. +- Une base ne doit pas contenir les caractères `+` ou `-`. -La fonction doit gérer les nombres négatifs. (comme montré sur l'exemple) +La fonction doit gérer les nombres négatifs (comme montré sur l'exemple). ### Fonction attendue @@ -52,12 +52,12 @@ func main() { Et son résultat : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test 125 -1111101 7D -uoi NV -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/printparams.en.md b/subjects/printparams.en.md index 1697e284d..c521b866c 100644 --- a/subjects/printparams.en.md +++ b/subjects/printparams.en.md @@ -7,12 +7,12 @@ Write a **program** that prints the arguments received in the command line. Example of output : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./printparams choumi is the best cat +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./printparams choumi is the best cat choumi is the best cat -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/printparams.fr.md b/subjects/printparams.fr.md index 8cbc719f3..e2b50f961 100644 --- a/subjects/printparams.fr.md +++ b/subjects/printparams.fr.md @@ -7,12 +7,12 @@ Exemple de résultat : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./printparams choumi is the best cat +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./printparams choumi is the best cat choumi is the best cat -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/printprogramname.en.md b/subjects/printprogramname.en.md index cfcb59b97..8a94ddcb9 100644 --- a/subjects/printprogramname.en.md +++ b/subjects/printprogramname.en.md @@ -10,5 +10,5 @@ Example of output : student@ubuntu:~/piscine-go/printprogramname$ go build main.go student@ubuntu:~/piscine-go/printprogramname$ ./main ./main -student@ubuntu:~/piscine-g0/printprogramname$ +student@ubuntu:~/piscine-go/printprogramname$ ``` diff --git a/subjects/printreversealphabet.en.md b/subjects/printreversealphabet.en.md index cbaf35b69..ad2f61b01 100644 --- a/subjects/printreversealphabet.en.md +++ b/subjects/printreversealphabet.en.md @@ -9,8 +9,8 @@ A line is a sequence of characters preceding the [end of line](https://en.wikipe ### Usage ```console -student@ubuntu:~/piscine/printreversealphabet$ go build -student@ubuntu:~/piscine/printreversealphabet$ ./printreversealphabet +student@ubuntu:~/piscine-go/printreversealphabet$ go build +student@ubuntu:~/piscine-go/printreversealphabet$ ./printreversealphabet zyxwvutsrqponmlkjihgfedcba -student@ubuntu:~/piscine/printreversealphabet$ +student@ubuntu:~/piscine-go/printreversealphabet$ ``` diff --git a/subjects/printreversealphabet.fr.md b/subjects/printreversealphabet.fr.md index bce518205..ca1de593b 100644 --- a/subjects/printreversealphabet.fr.md +++ b/subjects/printreversealphabet.fr.md @@ -9,8 +9,8 @@ Une ligne est une suite de caractères précédant le caractère [fin de ligne]( ### Utilisation ```console -student@ubuntu:~/piscine/printreversealphabet$ go build -student@ubuntu:~/piscine/printreversealphabet$ ./printreversealphabet +student@ubuntu:~/piscine-go/printreversealphabet$ go build +student@ubuntu:~/piscine-go/printreversealphabet$ ./printreversealphabet zyxwvutsrqponmlkjihgfedcba -student@ubuntu:~/piscine/printreversealphabet$ +student@ubuntu:~/piscine-go/printreversealphabet$ ``` diff --git a/subjects/printstr.en.md b/subjects/printstr.en.md index 93896033b..2c59d3792 100644 --- a/subjects/printstr.en.md +++ b/subjects/printstr.en.md @@ -30,8 +30,8 @@ func main() { And its output : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test Hello World!% -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/printstr.fr.md b/subjects/printstr.fr.md index 2dbdd78bb..29ceb6311 100644 --- a/subjects/printstr.fr.md +++ b/subjects/printstr.fr.md @@ -30,8 +30,8 @@ func main() { Et son résultat : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test Hello World!% -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/printwordstables.en.md b/subjects/printwordstables.en.md index 248af8539..4d0093f52 100644 --- a/subjects/printwordstables.en.md +++ b/subjects/printwordstables.en.md @@ -34,11 +34,11 @@ func main() { And its output : ```console -student@ubuntu:~/piscine/test$ go build main.go -student@ubuntu:~/piscine/test$ ./main +student@ubuntu:~/piscine-go/test$ go build main.go +student@ubuntu:~/piscine-go/test$ ./main Hello how are you? -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/printwordstables.fr.md b/subjects/printwordstables.fr.md index b040b60a5..df60d08c6 100644 --- a/subjects/printwordstables.fr.md +++ b/subjects/printwordstables.fr.md @@ -35,11 +35,11 @@ func main() { Et son résultat : ```console -student@ubuntu:~/piscine/test$ go build main.go -student@ubuntu:~/piscine/test$ ./main +student@ubuntu:~/piscine-go/test$ go build main.go +student@ubuntu:~/piscine-go/test$ ./main Hello how are you? -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/range.en.md b/subjects/range.en.md index babd2cfc2..c1daa7493 100644 --- a/subjects/range.en.md +++ b/subjects/range.en.md @@ -2,11 +2,11 @@ ### Instructions -Write the function Range which must: +Write the function `Range` which must: - allocate (with make()) an array of integers. - fill it with consecutive values that begin at `start` and end at `end` (Including `start` and `end` !) -- finally return that array. +- and that returns that array. ### Expected function @@ -16,7 +16,7 @@ func Range(start, end int) []int { } ``` -Examples of outputs : +### Usage - With (1, 3) you will return an array containing 1, 2 and 3. - With (-1, 2) you will return an array containing -1, 0, 1 and 2. diff --git a/subjects/range.fr.md b/subjects/range.fr.md index babd2cfc2..3dccdc993 100644 --- a/subjects/range.fr.md +++ b/subjects/range.fr.md @@ -2,13 +2,13 @@ ### Instructions -Write the function Range which must: +Écrire la fonction `Range` qui doit: -- allocate (with make()) an array of integers. -- fill it with consecutive values that begin at `start` and end at `end` (Including `start` and `end` !) -- finally return that array. +- allouer (avec make()) une slice d'entiers. +- le remplir avec des valeurs consécutives qui commencent à `start` et qui finissent à `end` (En incluant `start` et `end` !) +- et qui retourne cette slice. -### Expected function +### Fonction attendue ```go func Range(start, end int) []int { @@ -16,9 +16,9 @@ func Range(start, end int) []int { } ``` -Examples of outputs : +### Utilisation -- With (1, 3) you will return an array containing 1, 2 and 3. -- With (-1, 2) you will return an array containing -1, 0, 1 and 2. -- With (0, 0) you will return an array containing 0. -- With (0, -3) you will return an array containing 0, -1, -2 and -3. +- Avec (1, 3) la fonction devra retourner une slice contenant 1, 2 et 3. +- Avec (-1, 2) la fonction devra retourner une slice contenant -1, 0, 1 et 2. +- Avec (0, 0) la fonction devra retourner une slice contenant 0. +- Avec (0, -3) la fonction devra retourner une slice contenant 0, -1, -2 et -3. diff --git a/subjects/rectangle.en.md b/subjects/rectangle.en.md index 44b388083..7fb3197cd 100644 --- a/subjects/rectangle.en.md +++ b/subjects/rectangle.en.md @@ -48,8 +48,8 @@ func main() { ### Expected output ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test area of the rectangle: 6 -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/rectangle.fr.md b/subjects/rectangle.fr.md index 44b388083..7fb3197cd 100644 --- a/subjects/rectangle.fr.md +++ b/subjects/rectangle.fr.md @@ -48,8 +48,8 @@ func main() { ### Expected output ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test area of the rectangle: 6 -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/recursivefactorial.en.md b/subjects/recursivefactorial.en.md index fa267a35e..e910de9f0 100644 --- a/subjects/recursivefactorial.en.md +++ b/subjects/recursivefactorial.en.md @@ -1,6 +1,6 @@ ## recursivefactorial -### Intructions +### Instructions Write a **recursive** function that returns the factorial of the `int` passed as parameter. @@ -11,7 +11,7 @@ Errors (non possible values or overflows) will return `0`. ### Expected function ```go -func RecursiveFactorial(int nb) int { +func RecursiveFactorial(nb int) int { } ``` @@ -35,8 +35,8 @@ func main() { ``` ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test 24 -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/recursivefactorial.fr.md b/subjects/recursivefactorial.fr.md index fba6dfaf1..1aba726cb 100644 --- a/subjects/recursivefactorial.fr.md +++ b/subjects/recursivefactorial.fr.md @@ -1,6 +1,6 @@ ## recursivefactorial -### Intructions +### Instructions Écrire une fonction **récursive** qui renvoie la factorielle d'un `int` passé en paramètre. @@ -11,7 +11,7 @@ Les erreurs (valeurs non possibles ou overflows) renverront `0`. ### Fonction attendue ```go -func RecursiveFactorial(int nb) int { +func RecursiveFactorial(nb int) int { } ``` @@ -37,8 +37,8 @@ func main() { Et son résultat : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test 24 -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/recursivepower.en.md b/subjects/recursivepower.en.md index 90c58c67b..3d702cd20 100644 --- a/subjects/recursivepower.en.md +++ b/subjects/recursivepower.en.md @@ -1,6 +1,6 @@ ## recursivepower -### Intructions +### Instructions Write an **recursive** function that returns the power of the `int` passed as parameter. @@ -11,7 +11,7 @@ Negative powers will return `0`. Overflows do **not** have to be dealt with. ### Expected function ```go -func RecursivePower(int nb, int power) int { +func RecursivePower(nb int, power int) int { } ``` @@ -38,8 +38,8 @@ func main() { And its output : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test 64 -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/recursivepower.fr.md b/subjects/recursivepower.fr.md index b47509c87..f71823441 100644 --- a/subjects/recursivepower.fr.md +++ b/subjects/recursivepower.fr.md @@ -1,6 +1,6 @@ ## recursivepower -### Intructions +### Instructions Écrire une fonction **récursive** qui renvoie la puissance de deux `int` passés en paramètre. @@ -11,7 +11,7 @@ Les puissances négatives renverront `0`. Les overflows **ne doivent pas** être ### Fonction attendue ```go -func RecursivePower(int nb, int power) int { +func RecursivePower(nb int, power int) int { } ``` diff --git a/subjects/repeatalpha.en.md b/subjects/repeatalpha.en.md index ad4a4964d..033e91e0f 100644 --- a/subjects/repeatalpha.en.md +++ b/subjects/repeatalpha.en.md @@ -11,7 +11,7 @@ The result must be followed by a newline(`'\n'`). The case remains unchanged. -If the number of arguments is not 1, the program displays a newline(`'\n'`). +If the number of arguments is different from 1, the program displays a newline(`'\n'`). ### Usage diff --git a/subjects/repeatalpha.fr.md b/subjects/repeatalpha.fr.md index 5413bcc14..256cf03de 100644 --- a/subjects/repeatalpha.fr.md +++ b/subjects/repeatalpha.fr.md @@ -6,11 +6,11 @@ Le résultat doit être suivi d'un newline(`'\n'`). -`'a'` deviens `'a'`, `'b'` deviens `'bb'`, `'e'` deviens `'eeeee'`, etc... +`'a'` devient `'a'`, `'b'` devient `'bb'`, `'e'` devient `'eeeee'`, etc... -Si une lettre est majuscule, elle reste majuscule, de même si elle est minuscule. +Si une lettre est en majuscule, elle reste en majuscule, de même si elle est en minuscule. -Si le nombre d'arguments n'est pas 1, le programme affiche un newline(`'\n'`). +Si le nombre d'arguments est différent de 1, le programme affiche un newline(`'\n'`). ### Utilisation diff --git a/subjects/reversebits.en.md b/subjects/reversebits.en.md index d812f1cf8..891812220 100644 --- a/subjects/reversebits.en.md +++ b/subjects/reversebits.en.md @@ -2,8 +2,8 @@ ### Instructions -Write a function that takes a `byte`, reverses it `bit` by `bit` (like the -example) and returns the result. +Write a function that takes a `byte`, that reverses it `bit` by `bit` (like the +example) and that returns the result. ### Expected function diff --git a/subjects/reversebits.fr.md b/subjects/reversebits.fr.md index a22d6a85e..5277611e7 100644 --- a/subjects/reversebits.fr.md +++ b/subjects/reversebits.fr.md @@ -2,7 +2,7 @@ ### Instructions -Écrire une fonction qui prend un `byte`, l'inverse `bit` par `bit` (comme sur l'exemple) et retourne le résultat. +Écrire une fonction qui prend un `byte`, qui l'inverse `bit` par `bit` (comme sur l'exemple) et qui retourne le résultat. ### Fonction attendue diff --git a/subjects/reverserange.en.md b/subjects/reverserange.en.md index 6e3a92b4f..489fa9a83 100644 --- a/subjects/reverserange.en.md +++ b/subjects/reverserange.en.md @@ -2,11 +2,11 @@ ### Instructions -Write the function ReverseRange which must: +Write the function `ReverseRange` which must: - allocate (with make()) an array of integers. - fill it with consecutive values that begin at `end` and end at `start` (Including `start` and `end` !) -- finally return that array. +- and that returns that array. ### Expected function @@ -16,7 +16,7 @@ func ReverseRange(start, end int) []int { } ``` -Examples of output : +### Usage : - With (1, 3) the function will return an array containing 3, 2 and 1. - With (-1, 2) the function will return an array containing 2, 1, 0 and -1. diff --git a/subjects/reverserange.fr.md b/subjects/reverserange.fr.md index 6e3a92b4f..bb65691d1 100644 --- a/subjects/reverserange.fr.md +++ b/subjects/reverserange.fr.md @@ -2,13 +2,13 @@ ### Instructions -Write the function ReverseRange which must: +Écrire la fonction `ReverseRange` qui doit: -- allocate (with make()) an array of integers. -- fill it with consecutive values that begin at `end` and end at `start` (Including `start` and `end` !) -- finally return that array. +- allouer (avec make()) une slice d'entiers. +- le remplir avec des valeurs consécutives qui commencent à `end` et qui finissent à `start` (En incluant `start` et `end` !) +- et qui retourne cette slice. -### Expected function +### Fonction attendue ```go func ReverseRange(start, end int) []int { @@ -16,9 +16,9 @@ func ReverseRange(start, end int) []int { } ``` -Examples of output : +### Utilisation : -- With (1, 3) the function will return an array containing 3, 2 and 1. -- With (-1, 2) the function will return an array containing 2, 1, 0 and -1. -- With (0, 0) the function will return an array containing 0. -- With (0, -3) the function will return an array containing -3, -2, -1 and 0. +- Avec (1, 3) la fonction devra retourner une slice contenant 3, 2 et 1. +- Avec (-1, 2) la fonction devra retourner une slice contenant 2, 1, 0 et -1. +- Avec (0, 0) la fonction devra retourner une slice contenant 0. +- Avec (0, -3) la fonction devra retourner une slice contenant -3, -2, -1 et 0. diff --git a/subjects/reversestrcap.en.md b/subjects/reversestrcap.en.md index 3dc04544d..da5a0c6a0 100644 --- a/subjects/reversestrcap.en.md +++ b/subjects/reversestrcap.en.md @@ -2,16 +2,16 @@ ### Instructions -Write a program that takes one or more strings and that, **for each argument**: +Write a program that takes one or more `strings` as arguments and that, **for each argument**: -puts the last character of each word (if it is a letter) in uppercase and the rest in lowercase --then it displays the result followed by a `\n`. +-then it displays the result followed by a newline(`'\n'`). A word is a sequence of alphanumerical characters. -If there are no parameters, the program displays a `\n`. +If there are no parameter, the program displays a newline. -Examples of outputs : +### Usage ```console student@ubuntu:~/student/reversestrcap$ go build diff --git a/subjects/reversestrcap.fr.md b/subjects/reversestrcap.fr.md index 3dc04544d..b8f5f349a 100644 --- a/subjects/reversestrcap.fr.md +++ b/subjects/reversestrcap.fr.md @@ -2,16 +2,15 @@ ### Instructions -Write a program that takes one or more strings and that, **for each argument**: --puts the last character of each word (if it is a letter) in uppercase and the rest -in lowercase --then it displays the result followed by a `\n`. +Écrire un programme avec une ou plusieurs `strings` comme arguments et qui, **pour chaque argument**: +-place le dernier caractère de chaque mot (si c'est une lettre) en majuscule et le reste en minuscule. +-affiche ensuite le résultat suivi d'un newline(`'\n'`). -A word is a sequence of alphanumerical characters. +Un mot est une suite de caractères alphanumériques. -If there are no parameters, the program displays a `\n`. +Si il n'y a pas de paramètre, le programme affiche un newline. -Examples of outputs : +### Utilisation ```console student@ubuntu:~/student/reversestrcap$ go build diff --git a/subjects/revparams.en.md b/subjects/revparams.en.md index d387913a6..665ed820e 100644 --- a/subjects/revparams.en.md +++ b/subjects/revparams.en.md @@ -7,12 +7,12 @@ Write a **program** that prints the arguments received in the command line in a Example of output : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./revparams choumi is the best cat +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./revparams choumi is the best cat cat best the is choumi -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/revparams.fr.md b/subjects/revparams.fr.md index 7c775531c..33cd843e9 100644 --- a/subjects/revparams.fr.md +++ b/subjects/revparams.fr.md @@ -7,12 +7,12 @@ Exemple de résultat : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./revparams choumi is the best cat +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./revparams choumi is the best cat cat best the is choumi -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/revwstr.en.md b/subjects/revwstr.en.md index a59eb631b..3d842e98d 100644 --- a/subjects/revwstr.en.md +++ b/subjects/revwstr.en.md @@ -2,25 +2,25 @@ ### Instructions -Write a program that takes a string as a parameter, and prints its words in reverse. +Write a program that takes a `string` as a parameter, and prints its words in reverse. - A word is a sequence of **alphanumerical** characters. -- If the number of parameters is different from 1, the program will display `\n`. +- If the number of parameters is different from 1, the program will display newline(`'\n'`). -- In the parameters that are going to be tested, there will not be any additional spaces. (meaning that there will not be additionnal spaces at the beginning or at the end of the string, and words will always be separated by exactly one space). +- In the parameters that are going to be tested, there will not be any extra spaces. (meaning that there will not be additionnal spaces at the beginning or at the end of the `string`and that words will always be separated by exactly one space). -Examples of outputs : +### Usage ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test "the time of contempt precedes that of indifference" +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test "the time of contempt precedes that of indifference" indifference of that precedes contempt of time the -student@ubuntu:~/piscine/test$ ./test "abcdefghijklm" +student@ubuntu:~/piscine-go/test$ ./test "abcdefghijklm" abcdefghijklm -student@ubuntu:~/piscine/test$ ./test "he stared at the mountain" +student@ubuntu:~/piscine-go/test$ ./test "he stared at the mountain" mountain the at stared he -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ ./test -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/revwstr.fr.md b/subjects/revwstr.fr.md index a59eb631b..861151ce6 100644 --- a/subjects/revwstr.fr.md +++ b/subjects/revwstr.fr.md @@ -2,25 +2,25 @@ ### Instructions -Write a program that takes a string as a parameter, and prints its words in reverse. +Écrire un programme qui prend une `string` comme paramètre, et affiche ses mots en sens inverse. -- A word is a sequence of **alphanumerical** characters. +- Un mot est une suite de caractères **alphanumériques.** -- If the number of parameters is different from 1, the program will display `\n`. +- Si le nombre de paramètres est différent de 1, le programme affiche un newline(`'\n'`). -- In the parameters that are going to be tested, there will not be any additional spaces. (meaning that there will not be additionnal spaces at the beginning or at the end of the string, and words will always be separated by exactly one space). +- Dans les paramètres qui seront testés, il n'y aura pas d'espaces extra. (ce qui signifie qu'il n'y aura pas d'espaces additionnels, ni au début, ni à la fin de la `string` et que les mots seront toujours séparés par un seul espace). -Examples of outputs : +### Utilisation ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test "the time of contempt precedes that of indifference" +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test "the time of contempt precedes that of indifference" indifference of that precedes contempt of time the -student@ubuntu:~/piscine/test$ ./test "abcdefghijklm" +student@ubuntu:~/piscine-go/test$ ./test "abcdefghijklm" abcdefghijklm -student@ubuntu:~/piscine/test$ ./test "he stared at the mountain" +student@ubuntu:~/piscine-go/test$ ./test "he stared at the mountain" mountain the at stared he -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ ./test -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/rostring.en.md b/subjects/rostring.en.md index 36c559b18..bda419d39 100644 --- a/subjects/rostring.en.md +++ b/subjects/rostring.en.md @@ -2,7 +2,7 @@ ### Instructions -Write a program that takes a string and displays this string after rotating it +Write a program that takes a `string` and displays this `string` after rotating it one word to the left. Thus, the first word becomes the last, and others stay in the same order. @@ -11,19 +11,19 @@ A word is a sequence of **alphanumerical** characters. Words will be separated by only one space in the output. -If the number of arguments is not one, the program displays a newline. +If the number of arguments is different from 1, the program displays a newline. -Examples of outputs : +### Usage ```console -student@ubuntu:~/piscine/rostring$ go build -student@ubuntu:~/piscine/rostring$ ./rostring "abc " | cat -e +student@ubuntu:~/piscine-go/rostring$ go build +student@ubuntu:~/piscine-go/rostring$ ./rostring "abc " | cat -e abc$ -student@ubuntu:~/piscine/rostring$ ./rostring "Let there be light" -there be light There -student@ubuntu:~/piscine/rostring$ ./rostring " AkjhZ zLKIJz , 23y" +student@ubuntu:~/piscine-go/rostring$ ./rostring "Let there be light" +there be light Let +student@ubuntu:~/piscine-go/rostring$ ./rostring " AkjhZ zLKIJz , 23y" zLKIJz , 23y AkjhZ -student@ubuntu:~/piscine/rostring$ ./rostring | cat -e +student@ubuntu:~/piscine-go/rostring$ ./rostring | cat -e $ -student@ubuntu:~/piscine/rostring$ +student@ubuntu:~/piscine-go/rostring$ ``` diff --git a/subjects/rostring.fr.md b/subjects/rostring.fr.md index 36c559b18..fd32b66e4 100644 --- a/subjects/rostring.fr.md +++ b/subjects/rostring.fr.md @@ -2,28 +2,27 @@ ### Instructions -Write a program that takes a string and displays this string after rotating it -one word to the left. +Écrire un programme qui prend une `string` et affiche cette `string` après avoir déplacé un mot vers la gauche. -Thus, the first word becomes the last, and others stay in the same order. +Le premier mot devient donc le dernier, et le reste des mots reste dans le même ordre. -A word is a sequence of **alphanumerical** characters. +Un mot est une suite de caractères **alphanumériques.** -Words will be separated by only one space in the output. +Les mots devront être séparés par un seul espace dans l'output. -If the number of arguments is not one, the program displays a newline. +Si le nombre d'arguments est différent de 1, le programme affiche un newline. -Examples of outputs : +### Utilisation ```console -student@ubuntu:~/piscine/rostring$ go build -student@ubuntu:~/piscine/rostring$ ./rostring "abc " | cat -e +student@ubuntu:~/piscine-go/rostring$ go build +student@ubuntu:~/piscine-go/rostring$ ./rostring "abc " | cat -e abc$ -student@ubuntu:~/piscine/rostring$ ./rostring "Let there be light" -there be light There -student@ubuntu:~/piscine/rostring$ ./rostring " AkjhZ zLKIJz , 23y" +student@ubuntu:~/piscine-go/rostring$ ./rostring "Let there be light" +there be light Let +student@ubuntu:~/piscine-go/rostring$ ./rostring " AkjhZ zLKIJz , 23y" zLKIJz , 23y AkjhZ -student@ubuntu:~/piscine/rostring$ ./rostring | cat -e +student@ubuntu:~/piscine-go/rostring$ ./rostring | cat -e $ -student@ubuntu:~/piscine/rostring$ +student@ubuntu:~/piscine-go/rostring$ ``` diff --git a/subjects/rot13.en.md b/subjects/rot13.en.md index 7cee82cde..095d76fd9 100644 --- a/subjects/rot13.en.md +++ b/subjects/rot13.en.md @@ -9,17 +9,17 @@ letters by the letter 13 spaces ahead in alphabetical order. - The output will be followed by a newline(`'\n'`). -- If the number of arguments is not 1, the program displays a newline(`'\n'`). +- If the number of arguments is different from 1, the program displays a newline(`'\n'`). ### Usage ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test "abc" +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test "abc" nop -student@ubuntu:~/piscine/test$ ./test "hello there" +student@ubuntu:~/piscine-go/test$ ./test "hello there" uryyb gurer -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ ./test -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/rot13.fr.md b/subjects/rot13.fr.md index b33d27e52..e4c38bab4 100644 --- a/subjects/rot13.fr.md +++ b/subjects/rot13.fr.md @@ -2,23 +2,23 @@ ### Instructions -Écrire un programme qui prend une `string` et qui l'affiche, en remplaçant chacune de ses lettres par la lettre 13 positions après dans l'ordre alphabétique. +Écrire un programme qui prend une `string` et qui l'affiche, en remplaçant chacune de ses lettres par la lettre qui est 13 positions plus loin dans l'ordre alphabétique. - 'z' devient 'm' et 'Z' devient 'M'. Les majuscules restent des majuscules, de même pour les minuscules. - l'output sera suivi d'un newline(`'\n'`). -- Si le nombre d'arguments n'est pas 1, le programme affiche un newline(`'\n'`). +- Si le nombre d'arguments est différent de 1, le programme affiche un newline(`'\n'`). ### Utilisation ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test "abc" +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test "abc" nop -student@ubuntu:~/piscine/test$ ./test "hello there" +student@ubuntu:~/piscine-go/test$ ./test "hello there" uryyb gurer -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ ./test -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/rot14.en.md b/subjects/rot14.en.md index 1a185d661..253030eeb 100644 --- a/subjects/rot14.en.md +++ b/subjects/rot14.en.md @@ -4,7 +4,7 @@ Write a function `rot14` that returns the `string` within the parameter transformed into a `rot14 string`. -- For more information look what `rot13` stands for. +- There is the need to know what `rot13` stands for. ### Expected function @@ -40,8 +40,8 @@ func main() { And its output : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test Vszzc Vck ofs Mci -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/rot14.fr.md b/subjects/rot14.fr.md index 44f5698e7..851f9a947 100644 --- a/subjects/rot14.fr.md +++ b/subjects/rot14.fr.md @@ -2,9 +2,9 @@ ### Instructions -Écrire une fonction `rot14` qui retournes la `string` en paramètre transformée en `string rot14`. +Écrire une fonction `rot14` qui retourne la `string` en paramètre transformée en `string rot14`. -- Pour plus d'informations chercher ce que `rot13` signifie. +- Il faut savoir ce que `rot13` signifie. ### Fonction attendue @@ -40,8 +40,8 @@ func main() { Et son résultat : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test Vszzc Vck ofs Mci -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/rpncalc.en.md b/subjects/rpncalc.en.md index a174d5057..1b0720b34 100644 --- a/subjects/rpncalc.en.md +++ b/subjects/rpncalc.en.md @@ -2,11 +2,11 @@ ### Instructions -Write a program that takes a string which contains an equation written in -Reverse Polish notation (RPN) as its first argument, evaluates the equation, and -prints the result on the standard output followed by a newline. +Write a program that takes a `string` which contains an equation written in +`Reverse Polish Notation` (RPN) as its first argument, that evaluates the equation, and that +prints the result on the standard output followed by a newline(`'\n'`). -Reverse Polish Notation is a mathematical notation in which every operator +`Reverse Polish Notation` is a mathematical notation in which every operator follows all of its operands. In RPN, every operator encountered evaluates the previous 2 operands, and the result of this operation then becomes the first of the two operands for the subsequent operator. Operands and operators must be @@ -14,17 +14,17 @@ spaced by at least one space. The following operators must be implemented : `+`, `-`, `*`, `/`, and `%`. -If the string is not valid or if there is not exactly one argument, `Error` must be printed +If the `string` is not valid or if there is not exactly one argument, `Error` must be printed on the standard output followed by a newline. -If the string has extra spaces it is still valid. +If the `string` has extra spaces it is still considered valid. All the given operands must fit in a `int`. Examples of formulas converted in RPN: -3 + 4 >> 3 4 + -((1 * 2) * 3) - 4 >> 1 2 * 3 * 4 - ou 3 1 2 * * 4 - -50 * (5 - (10 / 9)) >> 5 10 9 / - 50 * +3 + 4 >> 3 4 + +((1 _ 2) _ 3) - 4 >> 1 2 _ 3 _ 4 - ou 3 1 2 \* _ 4 - +50 _ (5 - (10 / 9)) >> 5 10 9 / - 50 \* Here is how to evaluate a formula in RPN: @@ -34,6 +34,7 @@ Here is how to evaluate a formula in RPN: 6 4 - 2 ``` + Or: ``` @@ -42,7 +43,8 @@ Or: 6 4 - 2 ``` -Examples of outputs : + +### Usage ```console student@ubuntu:~/student/rpncalc$ go build diff --git a/subjects/rpncalc.fr.md b/subjects/rpncalc.fr.md index a174d5057..8c4ad18ca 100644 --- a/subjects/rpncalc.fr.md +++ b/subjects/rpncalc.fr.md @@ -2,31 +2,26 @@ ### Instructions -Write a program that takes a string which contains an equation written in -Reverse Polish notation (RPN) as its first argument, evaluates the equation, and -prints the result on the standard output followed by a newline. +Écrire un programme qui prend une `string` qui contient une équation écrite en `Reverse Polish Notation` (RPN) comme premier argument, qui évalue l'équation, et qui affiche le résultat sur la sortie standard suivi d'un newline(`'\n'`). -Reverse Polish Notation is a mathematical notation in which every operator -follows all of its operands. In RPN, every operator encountered evaluates the -previous 2 operands, and the result of this operation then becomes the first of -the two operands for the subsequent operator. Operands and operators must be -spaced by at least one space. +La `Reverse Polish Notation` est une notation mathématique dans laquelle chaque opérateur devance les valeurs qu'il va opérer. +En RPN, chaque opérateur évalue les deux précédentes valeurs, et le résultat de cette opération devient ensuite la première des valeurs de l'opérateur. Les valeurs et les opérateurs doivent être espacés d'au moins un espace. -The following operators must be implemented : `+`, `-`, `*`, `/`, and `%`. +Les opérateurs suivants doivent être implémentés : `+`, `-`, `*`, `/`, et `%`. -If the string is not valid or if there is not exactly one argument, `Error` must be printed -on the standard output followed by a newline. -If the string has extra spaces it is still valid. +Si la `string` n'est pas valide ou si il n'y pas exactement un argument, le mot `Error` doit être affiché +sur la sortie standard suivi d'un newline. +Si la `string` a des espaces extra elle est toujours considérée valide. -All the given operands must fit in a `int`. +Toutes les valeurs données doivent rentrer dans un `int`. -Examples of formulas converted in RPN: +Exemples de formules converties en RPN: -3 + 4 >> 3 4 + -((1 * 2) * 3) - 4 >> 1 2 * 3 * 4 - ou 3 1 2 * * 4 - -50 * (5 - (10 / 9)) >> 5 10 9 / - 50 * +3 + 4 >> 3 4 + +((1 _ 2) _ 3) - 4 >> 1 2 _ 3 _ 4 - ou 3 1 2 \* _ 4 - +50 _ (5 - (10 / 9)) >> 5 10 9 / - 50 \* -Here is how to evaluate a formula in RPN: +Voici comment évaluer une formule en RPN: ``` 1 2 * 3 * 4 - @@ -34,7 +29,8 @@ Here is how to evaluate a formula in RPN: 6 4 - 2 ``` -Or: + +ou: ``` 3 1 2 * * 4 - @@ -42,7 +38,8 @@ Or: 6 4 - 2 ``` -Examples of outputs : + +### Utilisation ```console student@ubuntu:~/student/rpncalc$ go build diff --git a/subjects/searchreplace.en.md b/subjects/searchreplace.en.md index 7b426b9be..c2122f82d 100644 --- a/subjects/searchreplace.en.md +++ b/subjects/searchreplace.en.md @@ -4,19 +4,19 @@ Write a program that takes 3 arguments, the first argument is a `string` in which to replace a letter (the 2nd argument) by another one (the 3rd argument). -- If the number of arguments is not 3, the program displays a newline(`'\n'`). +- If the number of arguments is different from 3, the program displays a newline(`'\n'`). - If the second argument is not contained in the first one (the string) then the program rewrites the `string` followed by a newline(`'\n'`). ### Usage ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test "hella there" "a" "o" +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test "hella there" "a" "o" hello there -student@ubuntu:~/piscine/test$ ./test "abcd" "z" "l" +student@ubuntu:~/piscine-go/test$ ./test "abcd" "z" "l" abcd -student@ubuntu:~/piscine/test$ ./test "something" "a" "o" "b" "c" +student@ubuntu:~/piscine-go/test$ ./test "something" "a" "o" "b" "c" -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/searchreplace.fr.md b/subjects/searchreplace.fr.md index 704ae2a68..4bd13dd6d 100644 --- a/subjects/searchreplace.fr.md +++ b/subjects/searchreplace.fr.md @@ -11,12 +11,12 @@ ### Utilisation ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test "hella there" "a" "o" +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test "hella there" "a" "o" hello there -student@ubuntu:~/piscine/test$ ./test "abcd" "z" "l" +student@ubuntu:~/piscine-go/test$ ./test "abcd" "z" "l" abcd -student@ubuntu:~/piscine/test$ ./test "something" "a" "o" "b" "c" +student@ubuntu:~/piscine-go/test$ ./test "something" "a" "o" "b" "c" -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/sortedlistmerge.en.md b/subjects/sortedlistmerge.en.md index d4721ae52..f98bac069 100644 --- a/subjects/sortedlistmerge.en.md +++ b/subjects/sortedlistmerge.en.md @@ -68,8 +68,8 @@ func main() { And its output : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test -2 -> 3 -> 5 -> 7 -> 9 -> -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/sortedlistmerge.fr.md b/subjects/sortedlistmerge.fr.md index d2aa50d56..3764633ae 100644 --- a/subjects/sortedlistmerge.fr.md +++ b/subjects/sortedlistmerge.fr.md @@ -68,8 +68,8 @@ func main() { Et son résultat : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test -2 -> 3 -> 5 -> 7 -> 9 -> -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/sortintegertable.en.md b/subjects/sortintegertable.en.md index ca2ff3010..2b5c24929 100644 --- a/subjects/sortintegertable.en.md +++ b/subjects/sortintegertable.en.md @@ -34,8 +34,8 @@ func main() { And its output : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test [0,1,2,3,4,5] -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/sortintegertable.fr.md b/subjects/sortintegertable.fr.md index 3c92b2f04..7913ab878 100644 --- a/subjects/sortintegertable.fr.md +++ b/subjects/sortintegertable.fr.md @@ -34,8 +34,8 @@ func main() { Et son résultat : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test [0,1,2,3,4,5] -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/sortlist.fr.md b/subjects/sortlist.fr.md index 57ce66e18..c7b52e18f 100644 --- a/subjects/sortlist.fr.md +++ b/subjects/sortlist.fr.md @@ -2,21 +2,21 @@ ### Instructions -Write a function that must: +Écrire une fonction qui doit : -- Sort the list given as a parameter, using the function cmp to select the order to apply, +- Trier la liste donnée en paramètre en utilisant la fonction cmp pour sélectionner l'ordre à appliquer, -- Return a pointer to the first element of the sorted list. +- Retourner un pointeur au premier élément de la liste triée. -Duplications must remain. +Les duplications doivent rester. -Inputs will always be consistent. +Les inputs seront toujours valides. -The `type NodeList` must be used. +Le `type NodeList` doit être utilisé. -Functions passed as `cmp` will always return `true` if `a` and `b` are in the right order, otherwise it will return `false`. +Les fonctions passées comme `cmp` retourneront toujours `true` si `a` et `b` sont dans le bon ordre, sinon elles retourneront `false`. -### Expected function +### Fonction et structure attendues ```go type Nodelist struct { @@ -29,7 +29,7 @@ func SortList (l *NodeList, cmp func(a,b int) bool) *NodeList{ } ``` -- For example, the following function used as `cmp` will sort the list in ascending order : +- Par exemple, la fonction suivante utilisée comme `cmp` triera la liste dans l'ordre croissant : ```go func ascending(a, b int) bool{ diff --git a/subjects/sortlistinsert.en.md b/subjects/sortlistinsert.en.md index 5b24a6d66..5ce1e09ba 100644 --- a/subjects/sortlistinsert.en.md +++ b/subjects/sortlistinsert.en.md @@ -69,9 +69,9 @@ func main() { And its output : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test 1 -> 4 -> 9 -> -2 -> 1 -> 2 -> 4 -> 9 -> -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/sortlistinsert.fr.md b/subjects/sortlistinsert.fr.md index 3d6da4138..30077e2a5 100644 --- a/subjects/sortlistinsert.fr.md +++ b/subjects/sortlistinsert.fr.md @@ -70,9 +70,9 @@ func main() { Et son résultat : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test 1 -> 4 -> 9 -> -2 -> 1 -> 2 -> 4 -> 9 -> -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/sortparams.en.md b/subjects/sortparams.en.md index bd482d0aa..eb586885f 100644 --- a/subjects/sortparams.en.md +++ b/subjects/sortparams.en.md @@ -7,8 +7,8 @@ Write a **program** that prints the arguments received in the command line in AS Example of output : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./sortparams 1 a 2 A 3 b 4 C +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./sortparams 1 a 2 A 3 b 4 C 1 2 3 @@ -17,5 +17,5 @@ A C a b -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/sortparams.fr.md b/subjects/sortparams.fr.md index f5c6e5caf..53ecca722 100644 --- a/subjects/sortparams.fr.md +++ b/subjects/sortparams.fr.md @@ -7,8 +7,8 @@ Exemple de résultat : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./sortparams 1 a 2 A 3 b 4 C +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./sortparams 1 a 2 A 3 b 4 C 1 2 3 @@ -17,5 +17,5 @@ A C a b -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/sortwordarr.en.md b/subjects/sortwordarr.en.md index b40a60ed7..279b23654 100644 --- a/subjects/sortwordarr.en.md +++ b/subjects/sortwordarr.en.md @@ -35,8 +35,8 @@ func main() { And its output : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test [1 2 3 A B C a b c] -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/sortwordarr.fr.md b/subjects/sortwordarr.fr.md index 7e14d2dd2..ac8dc279e 100644 --- a/subjects/sortwordarr.fr.md +++ b/subjects/sortwordarr.fr.md @@ -35,8 +35,8 @@ func main() { Et son résultat : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test [1 2 3 A B C a b c] -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/split.en.md b/subjects/split.en.md index f1c3366c0..3ef02c340 100644 --- a/subjects/split.en.md +++ b/subjects/split.en.md @@ -2,9 +2,9 @@ ### Instructions -Write a function that seperates the words of a `string` and puts them in a `string` array. +Write a function that separates the words of a `string` and puts them in a `string` array. -The separators are the characters of the charset `string` given in parameter. +The separators are the characters of the `charset string` given in parameter. ### Expected function @@ -33,8 +33,8 @@ func main() { And its output : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test [Hello how are you?] -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/split.fr.md b/subjects/split.fr.md index efa7f9d47..32ea7586f 100644 --- a/subjects/split.fr.md +++ b/subjects/split.fr.md @@ -4,7 +4,7 @@ Écrire une fonction qui sépare les mots d'une `string` et les met dans un tableau de `string`. -Les séparateurs sont les charactéres de la `string` charset donnée en paramétre. +Les séparateurs sont les caractères de la `string charset` donnée en paramétre. ### Fonction attendue @@ -33,8 +33,8 @@ func main() { Et son résultat : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test [Hello how are you?] -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/splitwhitespaces.en.md b/subjects/splitwhitespaces.en.md index e358921e8..02253732c 100644 --- a/subjects/splitwhitespaces.en.md +++ b/subjects/splitwhitespaces.en.md @@ -33,8 +33,8 @@ func main() { And its output : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test [Hello how are you?] -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/splitwhitespaces.fr.md b/subjects/splitwhitespaces.fr.md index 0f9776e19..527b709a4 100644 --- a/subjects/splitwhitespaces.fr.md +++ b/subjects/splitwhitespaces.fr.md @@ -33,8 +33,8 @@ func main() { Et son résultat : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test [Hello how are you?] -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/sqrt.en.md b/subjects/sqrt.en.md index c6a5373cb..cf21ffec4 100644 --- a/subjects/sqrt.en.md +++ b/subjects/sqrt.en.md @@ -1,13 +1,13 @@ ## sqrt -### Intructions +### Instructions Write a function that returns the square root of the `int` passed as parameter if that square root is a whole number. Otherwise it returns `0`. ### Expected function ```go -func Sqrt(int nb) int { +func Sqrt(nb int) int { } ``` @@ -36,9 +36,9 @@ func main() { And its output : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test 2 0 -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/sqrt.fr.md b/subjects/sqrt.fr.md index 076385ed6..39d66e81f 100644 --- a/subjects/sqrt.fr.md +++ b/subjects/sqrt.fr.md @@ -1,13 +1,13 @@ ## sqrt -### Intructions +### Instructions Écrire une fonction qui renvoie la racine carré d'un `int` passé en paramètre as parameter si cette racine carré est un nombre entier. Autrement elle renvoie `0`. ### Fonction attendue ```go -func Sqrt(int nb) int { +func Sqrt(nb int) int { } ``` @@ -36,9 +36,9 @@ func main() { Et son résultat : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test 2 0 -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/strlen.en.md b/subjects/strlen.en.md index 50cd5036d..68618fc9f 100644 --- a/subjects/strlen.en.md +++ b/subjects/strlen.en.md @@ -34,8 +34,8 @@ func main() { And its output : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test 12 -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/strlen.fr.md b/subjects/strlen.fr.md index 749cca62b..de4de21f4 100644 --- a/subjects/strlen.fr.md +++ b/subjects/strlen.fr.md @@ -34,8 +34,8 @@ func main() { Et son résultat : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test 12 -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/strrev.en.md b/subjects/strrev.en.md index a5ee9cd88..7b1855d09 100644 --- a/subjects/strrev.en.md +++ b/subjects/strrev.en.md @@ -36,8 +36,8 @@ func main() { And its output : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test !dlroW olleH -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/strrev.fr.md b/subjects/strrev.fr.md index e8b34f357..8aabdf632 100644 --- a/subjects/strrev.fr.md +++ b/subjects/strrev.fr.md @@ -36,8 +36,8 @@ func main() { Et son résultat : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test !dlroW olleH -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/swap.en.md b/subjects/swap.en.md index 82d0d04f8..f443265f9 100644 --- a/subjects/swap.en.md +++ b/subjects/swap.en.md @@ -36,9 +36,9 @@ func main() { And its output : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test 1 0 -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/swap.fr.md b/subjects/swap.fr.md index 42fdc85fc..54ae42fd2 100644 --- a/subjects/swap.fr.md +++ b/subjects/swap.fr.md @@ -36,9 +36,9 @@ func main() { Et son résultat : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test 1 0 -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/switchcase.en.md b/subjects/switchcase.en.md index 3cd4addb4..e54388fe2 100644 --- a/subjects/switchcase.en.md +++ b/subjects/switchcase.en.md @@ -8,15 +8,15 @@ Write a program that takes a `string` and reverses the case of all its letters. - The result must be followed by a newline(`'\n'`). -- If the number of arguments is not 1, the program displays a newline(`'\n'`). +- If the number of arguments is different from 1, the program displays a newline(`'\n'`). ### Usage ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test "SometHingS iS WronG" +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test "SometHingS iS WronG" sOMEThINGs Is wRONg -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ ./test -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/switchcase.fr.md b/subjects/switchcase.fr.md index 64ee85d27..c37499908 100644 --- a/subjects/switchcase.fr.md +++ b/subjects/switchcase.fr.md @@ -8,15 +8,15 @@ - Le résultat doit être suivi d'un newline(`'\n'`). -- Si le nombre d'arguments n'est pas 1, le programme affiche program un newline(`'\n'`). +- Si le nombre d'arguments est différent de 1, le programme affiche un newline(`'\n'`). ### Utilisation ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test "SometHingS iS WronG" +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test "SometHingS iS WronG" sOMEThINGs Is wRONg -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ ./test -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/tabmult.md b/subjects/tabmult.en.md similarity index 58% rename from subjects/tabmult.md rename to subjects/tabmult.en.md index ae738db61..bc30ea34e 100644 --- a/subjects/tabmult.md +++ b/subjects/tabmult.en.md @@ -4,13 +4,13 @@ Write a program that displays a number's multiplication table. -- The parameter will always be a strictly positive number that fits in an int, and said number times 9 will also fit in an int. +- The parameter will always be a strictly positive number that fits in an `int`. Said number multiplied by 9 will also fit in an `int`. -Examples of outputs : +### Usage ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test 9 +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test 9 1 x 9 = 9 2 x 9 = 18 3 x 9 = 27 @@ -20,7 +20,7 @@ student@ubuntu:~/piscine/test$ ./test 9 7 x 9 = 63 8 x 9 = 72 9 x 9 = 81 -student@ubuntu:~/piscine/test$ ./test 19 +student@ubuntu:~/piscine-go/test$ ./test 19 1 x 19 = 19 2 x 19 = 38 3 x 19 = 57 @@ -30,7 +30,7 @@ student@ubuntu:~/piscine/test$ ./test 19 7 x 19 = 133 8 x 19 = 152 9 x 19 = 171 -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ -student@ubuntu:~/piscine/ +student@ubuntu:~/piscine-go/ ``` diff --git a/subjects/tabmult.fr.md b/subjects/tabmult.fr.md new file mode 100644 index 000000000..4fbc21887 --- /dev/null +++ b/subjects/tabmult.fr.md @@ -0,0 +1,36 @@ +## tabmult + +### Instructions + +Écrire un programme qui affiche la table de multiplication d'un nombre. + +- Le paramètre sera toujours un nombre strictement positif qui rentre dans un `int`. Ce paramètre multiplié par 9 rentrera aussi dans un `int`. + +### Utilisation + +```console +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test 9 +1 x 9 = 9 +2 x 9 = 18 +3 x 9 = 27 +4 x 9 = 36 +5 x 9 = 45 +6 x 9 = 54 +7 x 9 = 63 +8 x 9 = 72 +9 x 9 = 81 +student@ubuntu:~/piscine-go/test$ ./test 19 +1 x 19 = 19 +2 x 19 = 38 +3 x 19 = 57 +4 x 19 = 76 +5 x 19 = 95 +6 x 19 = 114 +7 x 19 = 133 +8 x 19 = 152 +9 x 19 = 171 +student@ubuntu:~/piscine-go/test$ + +student@ubuntu:~/piscine-go/ +``` diff --git a/subjects/tolower.en.md b/subjects/tolower.en.md index 0f366d8a9..408f00256 100644 --- a/subjects/tolower.en.md +++ b/subjects/tolower.en.md @@ -32,8 +32,8 @@ func main() { And its output : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test hello! how are you? -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/tolower.fr.md b/subjects/tolower.fr.md index b709621bb..9d8a19234 100644 --- a/subjects/tolower.fr.md +++ b/subjects/tolower.fr.md @@ -32,8 +32,8 @@ func main() { Et son résultat : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test hello! how are you? -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/toupper.en.md b/subjects/toupper.en.md index 62aad29ca..0858963a6 100644 --- a/subjects/toupper.en.md +++ b/subjects/toupper.en.md @@ -32,8 +32,8 @@ func main() { And its output : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test HELLO! HOW ARE YOU? -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/toupper.fr.md b/subjects/toupper.fr.md index 2750bf084..3c108b001 100644 --- a/subjects/toupper.fr.md +++ b/subjects/toupper.fr.md @@ -32,8 +32,8 @@ func main() { Et son résultat : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test HELLO! HOW ARE YOU? -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/ultimatedivmod.en.md b/subjects/ultimatedivmod.en.md index 0f07bd8c9..e1184d8e4 100644 --- a/subjects/ultimatedivmod.en.md +++ b/subjects/ultimatedivmod.en.md @@ -40,9 +40,9 @@ func main() { And its output : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test 6 1 -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/ultimatedivmod.fr.md b/subjects/ultimatedivmod.fr.md index c4fe57c9e..d3e93e103 100644 --- a/subjects/ultimatedivmod.fr.md +++ b/subjects/ultimatedivmod.fr.md @@ -40,9 +40,9 @@ func main() { Et son résultat : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test 6 1 -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/ultimatepointone.en.md b/subjects/ultimatepointone.en.md index acbdb7e20..fc54a6a97 100644 --- a/subjects/ultimatepointone.en.md +++ b/subjects/ultimatepointone.en.md @@ -36,8 +36,8 @@ func main() { And its output : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test 1 -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/ultimatepointone.fr.md b/subjects/ultimatepointone.fr.md index 8b4bdaad2..58f08e1ce 100644 --- a/subjects/ultimatepointone.fr.md +++ b/subjects/ultimatepointone.fr.md @@ -36,8 +36,8 @@ func main() { Et son résultat : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test 1 -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/union.en.md b/subjects/union.en.md index 278835d90..7f91e2520 100644 --- a/subjects/union.en.md +++ b/subjects/union.en.md @@ -8,7 +8,7 @@ characters that appear in either one of the `strings`. The display will be in the order characters appear in the command line, and will be followed by a newline(`'\n'`). -If the number of arguments is not 2, the program displays newline(`'\n'`). +If the number of arguments is different from 2, the program displays newline(`'\n'`). ### Usage diff --git a/subjects/union.fr.md b/subjects/union.fr.md index cbc35ef24..e0af0af75 100644 --- a/subjects/union.fr.md +++ b/subjects/union.fr.md @@ -6,7 +6,7 @@ L'affichage se fera dans l'ordre d'apparition des caractères de la ligne de commande, et il sera suivi d'un newline(`'\n'`). -Si le nombre d'arguments n'est pas 2, le programme affiche un newline(`'\n'`). +Si le nombre d'arguments est différent de 2, le programme affiche un newline(`'\n'`). ### Utilisation diff --git a/subjects/unmatch.en.md b/subjects/unmatch.en.md index 3efd0bbf6..565dde47e 100644 --- a/subjects/unmatch.en.md +++ b/subjects/unmatch.en.md @@ -36,8 +36,8 @@ func main() { And its output : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test 4 -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/unmatch.fr.md b/subjects/unmatch.fr.md index 9818a1b2a..3bc9b21f2 100644 --- a/subjects/unmatch.fr.md +++ b/subjects/unmatch.fr.md @@ -34,8 +34,8 @@ func main() { Et son résultat : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test 4 -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/wdmatch.en.md b/subjects/wdmatch.en.md index 8eb821c59..4b5359170 100644 --- a/subjects/wdmatch.en.md +++ b/subjects/wdmatch.en.md @@ -1,27 +1,27 @@ -# wdmatch +## wdmatch -## Instructions +### Instructions -Write a program that takes two strings and checks whether it is possible to write the first string with characters from the second string, while respecting the order in which these characters appear in the second string. +Write a program that takes two `strings` and checks whether it is possible to write the first `string` with characters from the second `string`, while respecting the order in which these characters appear in the second `string`. -- If it is possible, the program displays the string followed by a `\n`, otherwise it simply displays a `\n`. +- If it is possible, the program displays the `string` followed by a newline(`'\n'`), otherwise it simply displays a newline. -- If the number of arguments is not 2, the program displays `\n`. +- If the number of arguments is different from 2, the program displays a newline. -Example of output : +### Usage ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test "faya" "fgvvfdxcacpolhyghbreda" +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test "faya" "fgvvfdxcacpolhyghbreda" faya -student@ubuntu:~/piscine/test$ ./test "faya" "fgvvfdxcacpolhyghbred" +student@ubuntu:~/piscine-go/test$ ./test "faya" "fgvvfdxcacpolhyghbred" -student@ubuntu:~/piscine/test$ ./test "error" rrerrrfiiljdfxjyuifrrvcoojh +student@ubuntu:~/piscine-go/test$ ./test "error" rrerrrfiiljdfxjyuifrrvcoojh -student@ubuntu:~/piscine/test$ ./test "quarante deux" "qfqfsudf arzgsayns tsregfdgs sjytdekuoixq " +student@ubuntu:~/piscine-go/test$ ./test "quarante deux" "qfqfsudf arzgsayns tsregfdgs sjytdekuoixq " quarante deux -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ ./test -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/wdmatch.fr.md b/subjects/wdmatch.fr.md index 8eb821c59..66533e903 100644 --- a/subjects/wdmatch.fr.md +++ b/subjects/wdmatch.fr.md @@ -1,27 +1,27 @@ -# wdmatch +## wdmatch -## Instructions +### Instructions -Write a program that takes two strings and checks whether it is possible to write the first string with characters from the second string, while respecting the order in which these characters appear in the second string. +Écrire un programme qui prend deux `strings` et vérifie si il est possible d'écrire la première `string` avec des caractères de la deuxième `string`, tout en respectant l'ordre dans lequel ces caractères apparaissent dans la deuxième `string`. -- If it is possible, the program displays the string followed by a `\n`, otherwise it simply displays a `\n`. +- Si cela est possible, le programme affiche la `string` suivie par un newline(`'\n'`), autrement le programme affiche un newline. -- If the number of arguments is not 2, the program displays `\n`. +- Si le nombre d'arguments est différent de 2, le programme affiche un newline. -Example of output : +### Utilisation ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test "faya" "fgvvfdxcacpolhyghbreda" +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test "faya" "fgvvfdxcacpolhyghbreda" faya -student@ubuntu:~/piscine/test$ ./test "faya" "fgvvfdxcacpolhyghbred" +student@ubuntu:~/piscine-go/test$ ./test "faya" "fgvvfdxcacpolhyghbred" -student@ubuntu:~/piscine/test$ ./test "error" rrerrrfiiljdfxjyuifrrvcoojh +student@ubuntu:~/piscine-go/test$ ./test "error" rrerrrfiiljdfxjyuifrrvcoojh -student@ubuntu:~/piscine/test$ ./test "quarante deux" "qfqfsudf arzgsayns tsregfdgs sjytdekuoixq " +student@ubuntu:~/piscine-go/test$ ./test "quarante deux" "qfqfsudf arzgsayns tsregfdgs sjytdekuoixq " quarante deux -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ ./test -student@ubuntu:~/piscine/test$ +student@ubuntu:~/piscine-go/test$ ```