Skip to content

Commit d197d9a

Browse files
committed
update readme file
1 parent 30a3731 commit d197d9a

File tree

1 file changed

+62
-0
lines changed

1 file changed

+62
-0
lines changed

readme.md

+62
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,65 @@ This project is a simple function plotter application built using PySide2 for th
3737
To run the application, execute the following command:
3838
```bash
3939
python src/main.py
40+
```
41+
42+
## Examples
43+
44+
### Basic Function Input
45+
- **Function:** `5*x^3 + 2*x`
46+
- **Range:** `0` to `10`
47+
- **Expected Output:** Parabolic curve. <br>
48+
![Basic Function](screenshots/ex1.jpg)
49+
50+
51+
### Invalid Character in Function
52+
- **Function:** `5*x^3 + 2*x + !`
53+
- **Range:** `0` to `10`
54+
- **Expected Output:** Error message: "Function contains invalid characters." <br>
55+
![Invalid Character](screenshots/ex2.jpg)
56+
57+
58+
### Complex Formula Function
59+
- **Function:** `5*x^3 + 2*x -4/x + 7`
60+
- **Range:** `-10` to `10`
61+
- **Expected Output:** Combined plot of Cubic and rational functions. <br>
62+
![Complex Formula](screenshots/ex3.jpg)
63+
64+
65+
### Using Sqrt & log10 in Function
66+
- **Function:** `2*x^4 - log10(x) + sqrt(x)`
67+
- **Range:** `0` to `50`
68+
- **Expected Output:** Combined plot of square root, logarithm, and quadratic function. <br>
69+
![Complex Formula](screenshots/ex4.jpg)
70+
71+
72+
### Negative Input to sqrt or log10
73+
- **Function:** `2*x^4 - log10(x) + sqrt(x)`
74+
- **Range:** `-50` to `500`
75+
- **Expected Output:** Error message: "Min value must be non-negative for functions with log10 or sqrt." <br>
76+
![Negative Input](screenshots/ex5.jpg)
77+
78+
79+
### Wrong Input for Min and Max Values
80+
- **Function:** `x`
81+
- **Range:** `a` to `2`
82+
- **Expected Output:** Error message: "Min and Max values must be numbers." <br>
83+
![Wrong Input](screenshots/ex7.jpg)
84+
85+
86+
87+
### Using -inf and +inf for min and max values
88+
- **Function:** `x`
89+
- **Range:** `-inf` to `inf`
90+
- **Expected Output:** Straight 45deg line from -inf to +inf <br>
91+
![Wrong Input](screenshots/ex8.jpg)
92+
93+
### Constant Function Formula
94+
- **Function:** `5`
95+
- **Range:** `-10` to `10`
96+
- **Expected Output:** Straight horizontal line from -inf to +inf <br>
97+
![Wrong Input](screenshots/ex9.jpg)
98+
99+
100+
## automated tests. run some automated tests using `pytest`
101+
![img](screenshots\ex10.jpg)

0 commit comments

Comments
 (0)