1
0
forked from ovh/pci-test

feat: Added exercise 1 and 2

This commit is contained in:
syrell 2024-12-01 21:31:29 +01:00
parent 9af118a396
commit 6ef29fd620
4 changed files with 35 additions and 0 deletions

9
ex1/a.py Normal file
View File

@ -0,0 +1,9 @@
import sys
def print_args():
return " ".join(sys.argv[1:])
if __name__ == "__main__":
print(print_args())

13
ex1/b.py Normal file
View File

@ -0,0 +1,13 @@
import argparse
import sys
def main():
parser = argparse.ArgumentParser()
parser.add_argument("-t", "--target", choices=["titi", "toto", "tata"])
args = parser.parse_args()
return args.target
if __name__ == "__main__":
print(main())

10
ex1/c.py Normal file
View File

@ -0,0 +1,10 @@
from a import print_args
from art import text2art
def main():
return text2art(print_args())
if __name__ == "__main__":
print(main())

3
ex2/Dockerfile Normal file
View File

@ -0,0 +1,3 @@
FROM scratch
COPY app /
CMD ["/app"]