Skip to content

Commit 6dde039

Browse files
authored
Merge pull request karimnyumba#6 from Gabriel-Dee/master
Modified README.md file
2 parents 85be124 + d229a8f commit 6dde039

2 files changed

Lines changed: 59 additions & 9 deletions

File tree

Bignumber_Readability/README.md

Lines changed: 39 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,41 @@
1-
# Big Number Redability
1+
# Big Number Readability
22

3-
An awesome and life saving trick that helps make big numbers readable without affecting the arithmetic operations.
4-
Underscore _ can be used to separate zeros in Python and this will make big numbers more readable while mathematically it won’t affect the syntax so you can still carry out arithmetic operations as normal:
3+
This repository introduces a useful trick to make big numbers more readable in Python
4+
without affecting arithmetic operations. The trick involves using underscores ( ) to separate
5+
zeros in large numbers, making it easier for users to quickly grasp the magnitude of the
6+
number.
57

6-
This one is a potential favorite for teachers, scientists, finance quants, accountants, quantum physicists, actuaries, traders and all the rest of the big number people.
8+
## Usage
9+
10+
To use this trick, simply insert underscores between the zeros in your large numbers. For
11+
example, instead of writing 1000000000 you can write °1_000 000_000°. This makes the
12+
number easier to read while still allowing you to perform arithmetic operations on it as usual
13+
Benefits
14+
This trick has a number of benefits for professionals who work with large numbers on a
15+
regular basis. It can be especially useful for teachers, scientists, finance quants, accountants,
16+
quantum physicists, actuaries, traders, and anyone else who deals with large numbers frequently.
17+
18+
Using underscores to separate zeros in large numbers makes it easier to read and
19+
understand the magnitude of the number at a glance. This can save time and reduce the risk
20+
of errors when working with large numbers.
21+
22+
## Example
23+
24+
Here's an example of how to use underscores to make a large number more readable:
25+
26+
without underscore
27+
large_number = 1000000000000000000000000
28+
29+
with underscore
30+
large number = 1_000_000_000_000_000_000_000_000
31+
32+
As you can see, using underscores to separate zeros makes the number much easier to read
33+
and understand.
34+
35+
## Conclusion
36+
37+
In conclusion, this repository provides useful trick for making large numbers more
38+
readable in Python. By using underscores to separate zeros, users can quickly grasp the
39+
magnitude of a number without affecting its arithmetic operations. This trick can be
40+
beneficial for professionals who regularly work with large numbers and can save time and
41+
reduce the risk of errors.

Handling Paths/README.md

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,25 @@
11
# Handling Paths in Python
22

3-
When working with files in Python, it's important to handle file paths correctly to avoid conflicts between Python and system settings. There are several ways to do so, this repo is gonna mention some feel free to add more.
3+
## Overview
44

5-
## Ways
5+
When working with files in Python, it's important to handle file paths correctly to avoid conflicts between Python and system settings. This repository provides examples of different ways to handle file paths in Python to ensure cross-platform compatibility.
66

7-
* using raw strings with the "r" prefix.
8-
* using os library
7+
## Installation
98

10-
It's worth noting that different operating systems use different path structures. For example, Windows uses backslashes as path separators, while Unix-based systems (such as macOS and Linux) use forward slashes. This means that when working with a script that communicates with different operating systems, it's important to handle path separators correctly.
9+
There are no specific installation instructions for this repository as it only contains code samples. However, you will need to have Python installed on your machine to run the examples.
10+
11+
## Usage
12+
13+
This repository provides examples of two common methods for handling file paths in Python:
14+
15+
* Using raw strings with the "r" prefix.
16+
* Using the os library.
17+
Each example includes a brief explanation of how it works, along with sample code. Feel free to add additional examples as needed.
18+
19+
## Contributing
20+
21+
Contributions to this repository are welcome and encouraged! If you have additional examples or suggestions for improving existing examples, please submit a pull request.
22+
23+
## License
24+
25+
This repository is licensed under the MIT license. Please see the LICENSE file for more details.

0 commit comments

Comments
 (0)