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 error
|
||||
|
||||
|
||||
if ( $cek_error[1] == 0 ) {
|
||||
|
||||
//ambil direktory
|
||||
|
|
@ -164,10 +166,13 @@ class ExercisePythonController extends Controller
|
|||
|
||||
$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 = "";
|
||||
$status = "";
|
||||
|
||||
|
||||
|
||||
// split output
|
||||
$dataTest = explode("Error", $output);
|
||||
|
|
@ -312,14 +317,13 @@ class ExercisePythonController extends Controller
|
|||
'userid' => Auth::id()
|
||||
);
|
||||
$jmlPercobaanSubmit = DB::table("python_students_submit")->where( $where )->count();
|
||||
|
||||
|
||||
echo json_encode(['status' => $statusSintax, 'data' => $statusPassed, 'jml' => $jmlPercobaanSubmit]);
|
||||
|
||||
} else {
|
||||
|
||||
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",
|
||||
success: function (response) {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if (response.status == true) {
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user