Git Product home page Git Product logo

42-exam-shell's Introduction


Practice like a boss

Examshell will allow you to practice to be perfectly ready for the 42 exams

Workflow Status License Repo size Language count

⚠️ Pool exams and new exams are being added, as well as the possibility of practicing Javascript and Typescript. ⚠️

This one will have the same behaviors as the real examshell:

  • Updated with the new version of the exam in April 2022
  • Several exercises can be available per level, chosen randomly
  • Waiting times for correction are exponential
  • Your rendering must be committed via git
  • A moulinette will go over your code to check for forbidden functions, and possible leaks
  • A trace is available when the exercise allows it
  • Then your program will be compared with the real program

Some options have been added:

  • Multilingual interface (currently available in French and English)
  • Two options:
    • Infinite: Disables the timer, so the time is unlimited
    • Doom: To make your practice harder, if you fail the whole rendering folder is reset, as well as the associated git

Exams

The following exams are available natively:

  • Exam 02
  • Exam 03
  • Exam 04
  • Exam 05
  • Exam 06
  • Old exam 03

Setup

Download the latest version of the software. This one is available for MacOS and Linux

How to use

Launch your favorite command prompt, and simply run the program:

./examshell

If a rights problem occurs during the execution, make the following command:

chmod +x examshell && ./examshell

Arguments

Args Definition
-C or --custom Create the folder that can contain the exams created by other people, and also the configuration file
-N or --new Launch the cli to create the boilerplate for a new exam

Dependencies

Examshell is dependent on several external software. Under Linux, the installation can be done by the software itself at startup. However under MacOS you will have to install them yourself. Here is the list with their versions to help you

Software Version
bash >= 3.2
clang >= 10.0
git >= 2.10
valgrind >= 3.10

Config examshell

You can configure the behavior of examshell via the config.json file in the exams folder. It has the following options:

{
	"checkUpdate": true,
	"checkLib": true,
	"signature": true,
	"exam": "exam_02",
	"lang": "en_US",
	"options": {
		"doom": false,
		"infinite": false,
	}
}
  • checkUpdate boolean : Checks if a new version is available
  • checkLib boolean : Checks if the necessary libraries are installed
  • signature boolean : Print the application's logo and signature
  • exam string : Id of the exam
  • lang string : Selected lang ('en_US', 'fr_FR')
  • options.doom boolean : All work and git is reset if grademe failed
  • options.infinite boolean : There is no time limit anymore

Create or install custom exam

Starting with version 0.3.0 examshell allows you to create your own exams in a simple and concise way. If you want to share your exam, don't hesitate to open a issue with the exam label so that it can be added to a list.

Install a custom exam

  1. Create a exams directory in the root of the application, or launch ./examshell -C
  2. Paste custom exam in this directory
  3. Start application, if exam is correct, it will appear in the selection list

Create a custom exam

You can create custom exam by adding new exercises: Contributing

Contributor

Thanks to you and your help, examshell is getting better every day. I would like to thank those people who gave their time 🧡

Disclaimer

The exams available are based as closely as possible on the official exams at 42, however there may be some differences. If you find a significant difference, don't hesitate to open an issue.

License

Examshell Copyright (C) 2022 - ...  Clément Bertrand
    
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.

42-exam-shell's People

Contributors

c-bertran avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

b-ki torm0 rodsmade

42-exam-shell's Issues

ERR_UNHANDLED_REJECTION

═══════════════ ⚠ Error ⚠ ══════════════
[UnhandledPromiseRejection: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason "127".] {
code: 'ERR_UNHANDLED_REJECTION'
}
══════════════════════════════════════════

Fedora & MacOs grademe Error

After installing the project in my computer and running the command grademe, inside the examshell cli the program returned an Error
Error: Command failed: bash make.bash render

Download the program at Releases 0.3.6
Change directory too the downloaded file location.
chmod +x examshell && ./examshell
When the command is executed, the Menu prompts there is a new version available for download
It says:
? Do you want to skip installation step (e.g. a false negative) ? › (y/N)
I decided to choose y (yes)
Then I choose English
Then Infinite
... Exam06
I create and commit the repo on the folder ~render/mini_serv/mini_serv.c
then I prompt grademe and the error is returned.

image

Desktop (please complete the following information):

  • OS: Fedora GNU/LINUX
  • Version 37

[Error 121] Under MacOS, automatic installation is unavailable.

[Error 121] Under MacOS, automatic installation is unavailable. Please install git, clang and valgrind manually

I have a High Sierra operating system. I have already installed git, clang and valgrind manually by homebrew but still can not make the installer work.

Dependencies

I believe it's a good idea to add to the README a Dependencies section

The Dependencies section will let any reader know which are the main dependencies that the project uses.
This way the reader will know if he needs to install any dependencies beforehand.
Although this could be arguable since Linux would detect this automatically and prompt the user to install them.

On the other hand I believe this information is useful and it's a good idea to have it on the README
and maybe explain why they are needed.

  • node > version
  • valgrind > version
  • clang > version
  • git > version

What do you think?

Expected outcome of microshell's example differs from what happens in bash

Describe the bug
In microshell's subject (/srcs/exams/04/microshell/subjects/fr_FR), the examples suggest that the second occurrence of echo should be interpreted as a command, hence there should be a second line of output.

$>./microshell /usr/bin/echo WOOT "; microshell ;" "; ;" ";" /usr/bin/echo "is hell of fun"
WOOT ; microshell ; ; ;
is hell of fun

Expected behavior
Semicolons shall be interpreted literally inside double quotes, as per the documentation.

The expected subject text should be:

$>./microshell /usr/bin/echo WOOT "; microshell ;" "; ;" ";" /usr/bin/echo "is hell of fun"
WOOT ; microshell ; ; ; ; /usr/bin/echo is hell of fun

as is bash's (see screenshot).

Screenshots
image

Additional context
Some other examples give misleading guidance and hence should be revised.

Bug under MacOS with bash script

Describe the bug
On MacOS, some bash scripts have apparently misunderstood redirects
Checks are in progress

Desktop (please complete the following information):

  • OS: MacOS

EXAM05 bug

Describe the bug
Just launch an empty grademe and got 33/100

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]: macos

Additional context
Add any other context about the problem here.

Capture d’écran 2022-02-11 à 18 21 54

Exam 4 Trace failed

Describe the bug
I think Exam 4 always fail because code in here can't compile

Expected behavior
Exam ok or another error.

Screenshots

=== TRACE ===
microshell.c:39:32: error: '&&' within '||' [-Werror,-Wlogical-op-parentheses]
        if (x < 2 || x > 2 || argv[1] && strcmp(argv[1], "-") == 0)
                           ~~ ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
microshell.c:39:32: note: place parentheses around the '&&' expression to silence this warning
        if (x < 2 || x > 2 || argv[1] && strcmp(argv[1], "-") == 0)
                                      ^
                              (                                   )
1 error generated.

Additional context
None

Exam Checkmate (02-part4)

Describe the bug
The subject of the Exam checkmate (02-part4) seems incorrect.

Expected behavior
The output of the third test should be Fail$ since the king is not in checkmate in this position. Indeed, he is not aligned with the only rook on the board.

Additional context
These lines seem problematic.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.