#include <stdio.h>
#include <stdlib.h>
int main() {
// Step 1: Use the system function to execute a Python script
int result = system("python3 your_script.py");
// Step 2: Check the result of the system function
if (result == 0) {
// Step 3: If the result is 0, the script ran successfully
printf("Python script executed successfully.\n");
} else {
// Step 4: If the result is non-zero, there was an error in running the script
printf("Error executing Python script.\n");
}
// Step 5: Return 0 to indicate successful execution of the C program
return 0;
}