diff --git a/.DS_Store b/.DS_Store deleted file mode 100644 index 92c27e144..000000000 Binary files a/.DS_Store and /dev/null differ diff --git a/docs/README.md b/docs/README.md index 27ac311f8..d2729bdc7 100644 --- a/docs/README.md +++ b/docs/README.md @@ -106,3 +106,4 @@ SR No | Project | Author 99 | [Find IMDB Ratings](https://github.com/chavarera/python-mini-projects/tree/master/projects/Find_imdb_rating)| [Utkarsh Bajaj](https://github.com/utkarshbajaj) 100 | [Terminal Based Hangman Game](https://github.com/chavarera/python-mini-projects/tree/master/projects/Terminal_Based_Hangman_Game)| [neohboonyee99](https://github.com/neohboonyee99) 101 | [Diff Utility](https://github.com/Python-World/python-mini-projects/tree/master/projects/Diff_Util)| [KILLinefficiency](https://github.com/KILLinefficiency) +102 | [Sine_Wave](https://github.com/chavarera/python-mini-projects/tree/master/projects/Sine_Wave)| [echoaj](https://github.com/echoaj) diff --git a/projects/Sine_Wave/README.md b/projects/Sine_Wave/README.md new file mode 100644 index 000000000..a404b6697 --- /dev/null +++ b/projects/Sine_Wave/README.md @@ -0,0 +1,21 @@ +# Script Title +This script draws a sine wave using the built-in Python library Turtle. +The image below demonstrates the equation of a sine wave. +![Screenshot of the sine wave equation](equation.png) +[source](https://www.mathsisfun.com/algebra/amplitude-period-frequency-phase-shift.html) + +### Prerequisites +None + +### How to run the script +1) Open a terminal +2) Navigate to the "Sine_Wave" directory containing this python file using the command prompt. +3) **Execute:** `python sine_wave.py` + +### Screenshot/GIF showing the sample use of the script +![Screenshot of the sine_wave.py file](screenshot.png) + + +## *Author Name* +[echoaj](https://github.com/echoaj) + diff --git a/projects/Sine_Wave/equation.PNG b/projects/Sine_Wave/equation.PNG new file mode 100644 index 000000000..7056f406e Binary files /dev/null and b/projects/Sine_Wave/equation.PNG differ diff --git a/projects/Sine_Wave/screenshot.PNG b/projects/Sine_Wave/screenshot.PNG new file mode 100644 index 000000000..96bce8131 Binary files /dev/null and b/projects/Sine_Wave/screenshot.PNG differ diff --git a/projects/Sine_Wave/sine_wave.py b/projects/Sine_Wave/sine_wave.py new file mode 100644 index 000000000..81113c688 --- /dev/null +++ b/projects/Sine_Wave/sine_wave.py @@ -0,0 +1,19 @@ +from turtle import * +from math import * + + +A = 50 # Amplitude +B = 100 # WaveLength +C = 0 # Horizontal Shift +D = 0 # Vertical Shift + +penup() +# As x increases y increases and decreases as it is evaluated. +for x in range(-200, 200): + # Sine Wave Equation + y = A * sin((2 * pi / B) * (x + C)) + D + goto(x, y) + pendown() + +hideturtle() +mainloop() diff --git a/projects/Todo_app/test.db b/projects/Todo_app/test.db index 3a0836101..29a5465b8 100644 Binary files a/projects/Todo_app/test.db and b/projects/Todo_app/test.db differ