Giter VIP home page Giter VIP logo

42-school-exam-rank-02's Introduction

Exam Details

  • This exam has 4 Levels, with 1 question from each level.
  • A random question is picked from each level below.
  • If you fail the exam, when you retake the exam again, you will restart at Level 1.
  • There is No Norminette in this exam.

Exam Levels

1️⃣ Level 1

Can be any of the 12 Functions/Programs Below:

  1. first_word
  2. fizzbuzz
  3. ft_strcpy
  4. ft_strlen
  5. ft_swap
  6. putstr
  7. repeat_alpha
  8. rev_print
  9. rot_13
  10. rotone
  11. search_and_replace
  12. ulstr

2️⃣ Level 2

Can be any of the 20 Functions/Programs Below:

  1. alpha_mirror
  2. camel_to_snake
  3. do_op
  4. ft_atoi
  5. ft_strcmp
  6. ft_strcspn
  7. ft_strdup
  8. ft_strpbrk
  9. ft_strrev
  10. ft_strspn
  11. inter
  12. is_power_of_2
  13. last_word
  14. max
  15. print_bits
  16. reverse_bits
  17. snake_to_camel
  18. swap_bits
  19. union
  20. wdmatch

3️⃣ Level 3

Can be any of the 15 Functions/Programs Below:

  1. add_prime_sum
  2. epur_str
  3. expand_str
  4. ft_atoi_base
  5. ft_list_size
  6. ft_range
  7. ft_rrange
  8. hidenp
  9. lcm
  10. paramsum
  11. pgcd
  12. print_hex
  13. rstr_capitalizer
  14. str_capitalizer
  15. tab_mult

4️⃣ Level 4

Can be any of the 10 Functions/Programs Below:

  1. flood_fill
  2. fprime
  3. ft_itoa
  4. ft_list_foreach
  5. ft_list_remove_if
  6. ft_split
  7. rev_wstr
  8. rostring
  9. sort_int_tab
  10. sort_list

Exam Setup

Login Details

1️⃣ Login With The Following:

login -> exam
password -> exam

2️⃣ In ITerm:

Type examshell in terminal

3️⃣ Your 42 Intra Account:

login -> your 42 intra username (eg. prossi)
pasword -> your password

4️⃣ Your 42 Intra Photo:

Allow photo check

5️⃣ Access Rendu:

Type 'y' or 'yes'

6️⃣ In the Exam Shell, You Have Only The Following 3 Commands:

- status - check the time and other things
- grademe - checking pushed exercise (moulinet)
- finish - closing examshell and finish exam

7️⃣ Open a new iTerm or VSCode:

- You can find your exam subject in the directory subject
- Then you can see directory Rendu. It is your repository.
- You must create a folder named by the project and start working in that folder.

Submission Details

When you are ready to sumbit your function/program, go into Rendu and push the folder you created by doing the following:

1️⃣ git add <folder name/files in folder>

2️⃣ git status

3️⃣ git commit -m "any commit message you like in these strings"

4️⃣ git push

5️⃣ After you git push, type grademe in the examshell for your project to be evaluated.


Exam IDE

Note

You should be able to use both VSCode and Vim in the exam.

My Skills


Exam Practice Tool

Link To The Tool

42-school-exam-rank-02's People

Contributors

alecmalloc avatar alvachon avatar amema42 avatar batuhantanir avatar bcheronn avatar clima-fr avatar dantremb avatar devawizard avatar dumbrosio avatar fdlnicolau avatar javierroldanpoces avatar joelencruz avatar kuuuzya avatar laendrun avatar lartaxx avatar liz753 avatar loredanalosurdo avatar markjso avatar myjalal avatar nands93 avatar pasqualerossi avatar prosviriakova avatar stevenlikestocode avatar thomasrobertson avatar vitorsantanna2 avatar yas0nia avatar ygalsk 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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

42-school-exam-rank-02's Issues

Exam Rank 02 - pgcd.c

Hey there, I was just reviewing some code before the exam and I believe I crossed somethingthat is probably wrong.
You got an undefined variable named "number 2" in the pgcd.c file, so the program doesnt even compile :)

Check it out and let me know whats up!

ft_atoi_base condition should exclude max_digit

  8 int get_digit(char c, int digits_in_base)
  9 {
 10         int max_digit;
 11         if (digits_in_base <= 10)
 12                 max_digit = digits_in_base + '0';
 13         else
 14                 max_digit = digits_in_base - 10 + 'a';
 15         if (c >= '0' && c <= '9' && c <= max_digit)
 16                 return (c - '0');
 17         else if (c >= 'a' && c <= 'f' && c <= max_digit)
 18                 return (10 + c - 'a');
 19         else
 20                 return (-1);
 21 }

In the line 15 and line 17, the condition is wrong. In any base $b$, the digits must be in the range of 0 to $b-1$. For example, the valid digits are 0 and 1 if we are talking about base 2. So the condition should exceed the maximum allowable digits.

ft_range

-ft_range dosn't work.
-When start = 0 and end = [-negative number]

Screenshot 2022-08-12 at 15 35 06

Diffrent type cast in function

Hi, in level 2 the max function, you are using type cast (int) in result;

I Didn't pass in the exam because of that, it wont work, moullinete wont pass.

Switch (int) type cast in Result to Unsigned int, and it will pass.

tab_mult handeling negative numbers

inside tab_mult the functions ft_atoi & ft_putnbr are handeling cases where the given number (parameter) is negative which is not asked in subject and could be removed to improve readability. Also could add a checker if the number is <= 238609183, as this is the highest number to be multiplied by 9 and still fit in an int.

Subject.txt:

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.

If there are no parameters, the program displays \n.

ft_rrange.c

when end is smaller than start, your function returns array that contains ints from start to end, but shouldn't it return from end to start? In example of subject ft_rrange(0, -3) should return {-3 , -2, -1 , 0}, but it returns {0, -1, -2, -3}.

Enhancing FizzBuzz Program

The current FizzBuzz program has been enhanced to make it more interactive by allowing users to specify the range of numbers to consider. However, there's room for further improvement and refinement.

location : Level 1/ Fizzbuzz / fizzbuzz.c

ft_range

there is a problem in ft_range function in line 10 and 12

fprime fprime doesn't compile

Can you help me? I saw that the repository code has syntax errors. I fixed it, but I'm already in sext grademe and it still gives a compilation problem.

![image](
Captura de tela 2022-12-09 205853

#include <stdio.h>
#include <stdlib.h>

int main(int argc, char **argv)
{
	int i;
	int num;

	i = 2;
	num = atoi(argv[1]);
	
	if (argc == 2)
	{
		if (num == 1)
			printf("1");
		while(i <= num)
		{
			if (num % i == 0)
			{
				printf("%d", i);
				if (num == i)
					break;
				printf("*");
				num = num / i;
				i = 2;
			}
			i++;
		}
	}
	printf("\n");
}

Wont pass official exam (rank 2) ft_atoi_base

This code gets success in grademe but not in the official exam.

int ft_atoi_base(const char *str, int str_base)
{
int result;
int i;
int sign;

i = 0;
sign = 1;
result = 0;
if (str[i] == '-' || str[i] == '+')
{
	if (str[i] == '-')
		sign = -1;
	i++;
}
while (str[i] != '\0')
{
	if (str[i] >= '0' && str[i] <= '9')
		result = result * str_base + str[i] - '0';
	else if (str[i] >= 'a' && str[i] <= 'f')
	{
		result = result * str_base;
		result = result + str[i] - 'a' + 10;
	}
	else if (str[i] >= 'A' && str[i] <= 'F')
	{
		result = result * str_base;
		result = result + str[i] - 'A' + 10;
	}
	else
		return (result * sign);
	
	i++;
}
return (result * sign);

}

Else condition after while

while(...)
    ....
 else
 {
    res[i] = start;
    start--;
    i++;
 }
 

You have a "else" after a while. In my knowledge that is a syntax error

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.