diff --git a/pyscript.html b/pyscript.html new file mode 100644 index 0000000000000000000000000000000000000000..7e06c4da5b5389ff401cb1583823041e4a561f28 --- /dev/null +++ b/pyscript.html @@ -0,0 +1,49 @@ +<!DOCTYPE html> +<html> +    <head> +        <meta charset="utf-8"> +        <meta http-equiv="X-UA-Compatible" content="IE=edge"> +        <title></title> +        <meta name="description" content=""> +        <meta name="viewport" content="width=device-width, initial-scale=1"> +    </head> +    <body> +        +    </body> +</html> + +<link rel="stylesheet" href="https://pyscript.net/alpha/pyscript.css" /> +<script defer src="https://pyscript.net/alpha/pyscript.js"></script> + +<body> +     <py-script>print("Hello, World!")</py-script> + </body> + +<py-env> + - matplotlib +</py-env> + +<div id="matplotlib-lineplot"> </div> + +<body> +         <div id="matplotlib-lineplot"></div> +         <py-script output="matplotlib-lineplot"> +             # Python Code +             +             # importing the matplotlib library +             import matplotlib.pyplot as plt +             fig, ax = plt.subplots() +             # x axis +             x = ["Python", "C++", "JavaScript", "Golang"] +             # y axis +             y = [10, 5, 9, 7] +             plt.plot(x, y, marker='o', linestyle='-', color='b') +             # Naming the x-label +             plt.xlabel('Language') +             # Naming the y-label +             plt.ylabel('Score') +             # Naming the title of the plot +             plt.title('Language vs Score') +             fig +          </py-script> +     </body> \ No newline at end of file