-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
25 changed files
with
409 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/bin/bash | ||
|
||
count_charo=$(ls Iseg/ | grep 'a$' | wc -l) | ||
|
||
count_iseg_ladies=$(ls Epitech/ | grep 'z$' | wc -l) | ||
|
||
if [ $count_charo -gt 0 ]; then | ||
mv Iseg/*a Epitech/ | ||
fi | ||
|
||
if [ $count_iseg_ladies -gt 0 ]; then | ||
mv Epitech/*z Iseg/ | ||
fi | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/bin/bash | ||
|
||
count_iseg_ladies=$(ls Iseg/ | grep 'a$' | wc -l) | ||
|
||
if [ $count_iseg_ladies -eq 0 ]; then | ||
statut=0 | ||
else | ||
statut=$count_iseg_ladies | ||
fi | ||
|
||
exit $statut | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/bin/bash | ||
|
||
prec=$1 | ||
|
||
if [ "$prec" -eq 0 ]; then | ||
echo "Les pieds sont propres !" | ||
else | ||
echo "T'as de ces ieps chacal..." | ||
fi | ||
|
||
|
||
echo "export PATH=$(pwd):\$PATH" >> ~/.bashrc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/usr/bin/python3 | ||
import math | ||
import sys | ||
|
||
def draw_circle_outline(radius): | ||
if radius < 1: | ||
print("Radius trop petit :(") | ||
return | ||
|
||
for y in range(2 * radius + 1): | ||
row = "" | ||
for x in range(2 * radius + 1): | ||
distance = math.sqrt((x - radius) ** 2 + (y - radius) ** 2) | ||
if math.isclose(distance, radius, abs_tol=0.5): | ||
row += "*" | ||
else: | ||
row += " " | ||
print(row) | ||
|
||
if len(sys.argv) != 2: | ||
print("Utilisation : python circle.py <rayon>") | ||
else: | ||
try: | ||
radius = int(sys.argv[1]) | ||
draw_circle_outline(radius) | ||
except ValueError: | ||
print("Le rayon doit être un nombre entier.") |
Oops, something went wrong.