revisi
This commit is contained in:
parent
d2a19fbfbe
commit
22da6c5bd6
|
|
@ -156,6 +156,8 @@ class ExercisePythonController extends Controller
|
||||||
|
|
||||||
// 0 -> tidak ada error ([1] = status)
|
// 0 -> tidak ada error ([1] = status)
|
||||||
// 0 -> tidak error
|
// 0 -> tidak error
|
||||||
|
|
||||||
|
|
||||||
if ( $cek_error[1] == 0 ) {
|
if ( $cek_error[1] == 0 ) {
|
||||||
|
|
||||||
//ambil direktory
|
//ambil direktory
|
||||||
|
|
@ -164,11 +166,14 @@ class ExercisePythonController extends Controller
|
||||||
|
|
||||||
$unittest = "C:\\xampp\\htdocs\\iCLOP\\public\\python-resources\\unittest\\". $fileUnittest;
|
$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");
|
|
||||||
|
$output = shell_exec("C:\Users\Rania\AppData\Local\Programs\Python\Python310\python.exe ".$unittest." ".$packageDirectory." ".$fileName." --verbose 2>&1");
|
||||||
|
|
||||||
$validation_detail = "";
|
$validation_detail = "";
|
||||||
$status = "";
|
$status = "";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// split output
|
// split output
|
||||||
$dataTest = explode("Error", $output);
|
$dataTest = explode("Error", $output);
|
||||||
// cek string data test memilik nilai OK
|
// cek string data test memilik nilai OK
|
||||||
|
|
@ -319,7 +324,6 @@ class ExercisePythonController extends Controller
|
||||||
|
|
||||||
echo json_encode(['status' => $statusSintax, 'statusPercobaan' => false, 'data' => $cek_error[0]]);
|
echo json_encode(['status' => $statusSintax, 'statusPercobaan' => false, 'data' => $cek_error[0]]);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
# Tuliskan kode program dibawah ini
|
||||||
|
jumlah = 10
|
||||||
|
pesanan = "komputer"
|
||||||
|
print(jumlah)
|
||||||
|
print(pesanan)
|
||||||
|
|
@ -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))
|
||||||
|
|
@ -0,0 +1,4 @@
|
||||||
|
# Tuliskan kode program dibawah ini
|
||||||
|
buah = "Mangga"
|
||||||
|
jumlah = 6
|
||||||
|
berat = 1.6
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
# Tuliskan variabel dibawah ini
|
||||||
|
nama = "Qorinda "
|
||||||
|
lengkap = "Yulvarisma"
|
||||||
|
|
||||||
|
def hasil(nama, lengkap):
|
||||||
|
#Tuliskan kode program dibawah ini
|
||||||
|
return nama+lengkap
|
||||||
|
|
@ -0,0 +1,2 @@
|
||||||
|
# Tuliskan kode program dibawah ini
|
||||||
|
print ("indo")
|
||||||
|
|
@ -0,0 +1,2 @@
|
||||||
|
# Tuliskan kode program dibawah ini
|
||||||
|
print("indo")
|
||||||
|
|
@ -0,0 +1,2 @@
|
||||||
|
# Tuliskan kode program dibawah ini
|
||||||
|
print("ok")
|
||||||
|
|
@ -0,0 +1,2 @@
|
||||||
|
# Tuliskan kode program dibawah ini
|
||||||
|
print("ok")
|
||||||
|
|
@ -0,0 +1,2 @@
|
||||||
|
# Tuliskan kode program dibawah ini
|
||||||
|
print("ok")
|
||||||
|
|
@ -0,0 +1,2 @@
|
||||||
|
# Tuliskan kode program dibawah ini
|
||||||
|
print("ok")
|
||||||
|
|
@ -0,0 +1,2 @@
|
||||||
|
# Tuliskan kode program dibawah ini
|
||||||
|
print("ok")
|
||||||
|
|
@ -0,0 +1,2 @@
|
||||||
|
# Tuliskan kode program dibawah ini
|
||||||
|
print("ok")
|
||||||
|
|
@ -0,0 +1,2 @@
|
||||||
|
# Tuliskan kode program dibawah ini
|
||||||
|
print("Hola")
|
||||||
|
|
@ -0,0 +1,2 @@
|
||||||
|
# Tuliskan kode program dibawah ini
|
||||||
|
print("Indonesia")
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -757,10 +757,6 @@
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
success: function (response) {
|
success: function (response) {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (response.status == true) {
|
if (response.status == true) {
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user