diff --git a/Solutions/arpitmisraw/Task4/wave.png b/Solutions/arpitmisraw/Task4/wave.png new file mode 100644 index 0000000..11bf0e6 Binary files /dev/null and b/Solutions/arpitmisraw/Task4/wave.png differ diff --git a/Solutions/arpitmisraw/Task4/wave.py b/Solutions/arpitmisraw/Task4/wave.py new file mode 100644 index 0000000..a3a8171 --- /dev/null +++ b/Solutions/arpitmisraw/Task4/wave.py @@ -0,0 +1,15 @@ +import matplotlib.pyplot as plot +import numpy as np + + + +x = np.arange(0, 10, 0.001) +y = 2 * np.sin(np.pi *x /4) + +plot.title('Sine Wave') +plot.xlabel('x') +plot.ylabel('y') + +plot.plot(x, y) +plot.savefig('wave') +plot.show() diff --git a/Solutions/arpitmisraw/Task5/threading.py b/Solutions/arpitmisraw/Task5/threading.py new file mode 100644 index 0000000..7bef23e --- /dev/null +++ b/Solutions/arpitmisraw/Task5/threading.py @@ -0,0 +1,26 @@ +import threading + +def factorial(n): + i = 1 + ans = 1 + while(i <= n): + ans *= i + i += 1 + print("Factorial of", n, "is", ans) + + +def square(n): + print("Square of", n, "is", n**2) + + +n = int(input()) +t1 = threading.Thread(target=factorial, args=(n,)) +t2 = threading.Thread(target=square, args=(n,)) +t1.start() +t2.start() +t1.join() +t2.join() + + + +