This commit is contained in:
rianbtk 2022-09-14 15:32:05 +07:00
parent b9a1ac2de1
commit 7f3d490fa7
55 changed files with 133 additions and 11 deletions

View File

@ -138,8 +138,9 @@ class ExercisePythonController extends Controller
// file name (nama file)
$fileName = uniqid().'_'.strtotime("now");
// lokasi penyimpanan
// // lokasi penyimpanan
$filePath = "python-resources/unittest/jawaban/". $fileName . '.py';
// file terbuat
$programFile = fopen($filePath, "w");
@ -161,10 +162,9 @@ class ExercisePythonController extends Controller
$packageDirectory = "jawaban.". $fileName;
$fileUnittest = $dt_percobaan->filetest;
$unittest = "python-resources/unittest/". $fileUnittest;
$output = shell_exec("C:\Users\A.S.H\AppData\Local\Programs\Python\Python310\python.exe".$unittest." ".$packageDirectory." ".$fileName." --verbose 2>&1");
$unittest = "C:\\xampp\\htdocs\\iCLOP\\public\\python-resources\\unittest\\". $fileUnittest;
$output = shell_exec("C:\Users\Rania\AppData\Local\Programs\Python\Python310\python.exe ".$unittest." ".$packageDirectory." ".$fileName." --verbose 2>&1");
$validation_detail = "";
$status = "";

View File

@ -10,6 +10,7 @@
"require": {
"php": "^7.2",
"fideloper/proxy": "^4.0",
"ace_builds":"^4.0",
"laravel/framework": "^6.2",
"laravel/tinker": "^2.0",
"laravelcollective/html": "^6.0",

17
public/js/ace/ace.js vendored Normal file

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
bab1_percobaan1.py

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.9 (unittest)" project-jdk-type="Python SDK" />
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.10 (unittest)" project-jdk-type="Python SDK" />
</project>

View File

@ -1,8 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="PYTHON_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/venv" />
</content>
<orderEntry type="jdk" jdkName="Python 3.10 (unittest)" jdkType="Python SDK" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

View File

@ -8,8 +8,8 @@ path_answer = sys.argv[1]
filename = sys.argv[2]
pc = importlib.import_module(path_answer, ".")
# pc = importlib.import_module("jawaban.62cfe7f907217_1657792505")
# filename = '62cfe7f907217_1657792505'
# pc = importlib.import_module("jawaban.62f0a0e7b701b_1659936999")
# filename = '62f0a0e7b701b_1659936999'
# cmd = subprocess.run([sys.executable, f"%s/jawaban/{filename}.py" % (Path(__file__).parent.absolute())], capture_output=True)
cmd = subprocess.run([sys.executable, f"%s/jawaban/{filename}.py" % (Path(__file__).parent.absolute())], capture_output=True)

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

View File

@ -0,0 +1,2 @@
# Tuliskan kode program dibawah ini
print('tes')

View File

@ -0,0 +1 @@
# Tuliskan kode program dibawah ini

View File

@ -0,0 +1 @@
# Tuliskan kode program dibawah ini

View File

@ -0,0 +1,2 @@
# Tuliskan kode program dibawah ini
print("test")

View File

@ -0,0 +1,2 @@
# Tuliskan kode program dibawah ini
print("test")

View File

@ -0,0 +1 @@
# Tuliskan kode program dibawah ini

View File

@ -0,0 +1,2 @@
# Tuliskan kode program dibawah ini
print("test")

View File

@ -0,0 +1,2 @@
# Tuliskan kode program dibawah ini
print("test")

View File

@ -0,0 +1,2 @@
# Tuliskan kode program dibawah ini
print("test")

View File

@ -0,0 +1,2 @@
# Tuliskan kode program dibawah ini
print("test")

View File

@ -0,0 +1,2 @@
# Tuliskan kode program dibawah ini
print("test")

View File

@ -0,0 +1,2 @@
# Tuliskan kode program dibawah ini
print("test")

View File

@ -0,0 +1,2 @@
# Tuliskan kode program dibawah ini
test

View File

@ -0,0 +1,5 @@
# Tuliskan kode program dibawah ini
jumlah = 10
pesanan = "Komputer"
print(jumlah)
print(pesanan)

View File

@ -0,0 +1,2 @@
# Tuliskan kode program dibawah ini
print(

View File

@ -0,0 +1,2 @@
# Tuliskan kode program dibawah ini
print("Hola")

View File

@ -0,0 +1,2 @@
# Tuliskan kode program dibawah ini
print("Hola")

View File

@ -0,0 +1,2 @@
# Tuliskan kode program dibawah ini
print("Indonesia")

View File

@ -0,0 +1,2 @@
# Tuliskan kode program dibawah ini
print("Indonesia")

View File

@ -0,0 +1,5 @@
# Tuliskan kode program dibawah ini
jumlah = 10
pesanan = "komputer"
print(jumlah)
print(pesanan)

View File

@ -0,0 +1,5 @@
# Tuliskan kode program dibawah ini
jumlah = 10
pesanan = "komputer"
print(jumlah)
print(pesanan)

View File

@ -0,0 +1,5 @@
# Tuliskan kode program dibawah ini
jumlah = 10
pesanan = "Komputer"
print(jumlah)
print(pesanan)

View File

@ -0,0 +1,8 @@
# Tuliskan variabel dibawah ini
umur = 23
def konversi(umur):
#Tuliskan kode program dibawah ini
return str(umur)
print(konversi(umur))

View File

@ -0,0 +1,8 @@
# Tuliskan variabel dibawah ini
umur = 23
def konversi(umur):
#Tuliskan kode program dibawah ini
return str(umur)
print(konversi(umur))

View File

@ -0,0 +1,8 @@
# Tuliskan variabel dibawah ini
umur = 23
def konversi(umur):
#Tuliskan kode program dibawah ini
str(umur)
print(konversi(umur))

View File

@ -0,0 +1,8 @@
# Tuliskan variabel dibawah ini
umur = 23
def konversi(umur):
#Tuliskan kode program dibawah ini
str(umur)
print(type(konversi(umur)))

View File

@ -0,0 +1,8 @@
# Tuliskan variabel dibawah ini
umur = 23
def konversi(umur):
#Tuliskan kode program dibawah ini
return str(umur)
print(type(konversi(umur)))

View File

@ -0,0 +1,2 @@
# Tuliskan kode program dibawah ini
print("indonesia")

View File

@ -0,0 +1,2 @@
# Tuliskan kode program dibawah ini
print("Indonesia")

View File

@ -0,0 +1,2 @@
# Tuliskan kode program dibawah ini
print ("Hello")

View File

@ -0,0 +1,2 @@
# Tuliskan kode program dibawah ini
print ("Hello")

View File

@ -4,7 +4,7 @@
@section('script')
<!-- Code Ace Library For Python -->
<script src="{{URL::to('/js/ace/ace/ace.js')}}"></script>
<!-- <script src={{ asset('js/ace/ace.js') }}></script> -->
<!-- Code Ace Library For Python -->
@endsection
@ -578,7 +578,7 @@
})
</script>
<script src={{ asset('js/ace/ace.js') }}></script>
<script>