Python Online
Schreibe (oder kopiere) in den obigen Editor
a = 5 b = 6 if a < b: print("a ist tatsächlich kleiner als b") elif a > b: print(b/a) else: print(round(a/b,2))▸ Hilfe
Python on your Server
- first: You have to enable shell_exec() from your server
- second: Write the following Script in a .py-file within a folder named py
a=47.541379 b=175.457931 if a > b: print(round(a/b,3)) else: print(round(b/a,3))
- third: Write the following Script in a .php-file
<?php echo shell_exec("python py/index.py"); ?>
- Last: The Result is: 3.691