Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kyu7 #364

Merged
merged 4 commits into from
Jul 22, 2024
Merged

Kyu7 #364

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 13 additions & 6 deletions kyu_7/growing_plant/README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
## Simple Fun #74: Growing Plant
# Simple Fun #74: Growing Plant

### Task
## Task

Each day a plant is growing by `upSpeed` meters. Each night that plant's height decreases by `downSpeed` meters due to the lack of sun heat. Initially, plant is 0 meters tall. We plant the seed at the beginning of a day. We want to know when the height of the plant will reach a certain level.
Each day a plant is growing by `upSpeed` meters. Each night that
plant's height decreases by `downSpeed` meters due to the lack of
sun heat. Initially, plant is 0 meters tall. We plant the seed at
the beginning of a day. We want to know when the height of the plant
will reach a certain level.

### Example

For `upSpeed = 100, downSpeed = 10 and desiredHeight = 910`, the output should be `10`.
For `upSpeed = 100, downSpeed = 10 and desiredHeight = 910`,
the output should be `10`.

```bash
After day 1 --> 100
Expand All @@ -30,7 +35,8 @@ For `upSpeed = 100, downSpeed = 10 and desiredHeight = 910`, the output should b
After day 10 --> 910
```

For `upSpeed = 10, downSpeed = 9 and desiredHeight = 4`, the output should be `1`.
For `upSpeed = 10, downSpeed = 9 and desiredHeight = 4`,
the output should be `1`.

Because the plant reach to the desired height at day 1(10 meters).

Expand Down Expand Up @@ -58,6 +64,7 @@ Because the plant reach to the desired height at day 1(10 meters).

- `output` an integer

The number of days that it will take for the plant to reach/pass desiredHeight (including the last day in the total count).
The number of days that it will take for the plant to reach/pass
desiredHeight (including the last day in the total count).

[Source](https://www.codewars.com/kata/58941fec8afa3618c9000184/train/python)
4 changes: 2 additions & 2 deletions kyu_7/password_validator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ The rules for a valid password are as follows:

You are permitted to use any methods to validate the password.

**Examples:**
### Examples:

> password("Abcd1234"); ===> true
>
Expand All @@ -30,7 +30,7 @@ You are permitted to use any methods to validate the password.
>
> password("!@#$%^&*()-_+={}[]|\:;?/>.<,"); ===> false;

**Extra info**
### Extra info:

* You will only be passed strings.
* The string can contain any standard keyboard character.
Expand Down
12 changes: 6 additions & 6 deletions kyu_7/significant_figures/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,34 +14,34 @@ significant figures below.

## Significant Figures

**What are they?**
What are they?

Significant Figures are the meaningful digits in a measured
or computed value.

## Counting significant figures

**All non-zero digits are significant**
All non-zero digits are significant

- 4.357 has 4 significant figures
- 152.63 has 5 significant figures

**Zeroes at the beginning of a number are not significant**
Zeroes at the beginning of a number are not significant

- 0215 has 3 significant figures
- 0.6 has 1 significant figure

**Trailing zeroes in a number with a decimal point are significant**
Trailing zeroes in a number with a decimal point are significant

- 78.200 has 5 significant figures
- 20.0 has 3 significant figures

**Trailing zeroes in a number without a decimal point are not significant**
Trailing zeroes in a number without a decimal point are not significant

- 1200 has 2 significant figures
- 345000 has 3 significant figures

**All zeroes between significant figures are significant**
All zeroes between significant figures are significant

- 90.09 has 4 significant figures
- 5050 has 3 significant figures
Expand Down
3 changes: 2 additions & 1 deletion kyu_7/sort_out_the_men_from_boys/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ from the odds , or **Separate the men from the boys**
### Explanation 3

* Since , `{-282 , 818 , 900 , 928 }` is the even numbers here , So it
came first in ascending order , then the odds in descending order `{ 281 , 49 , -1 }`
came first in ascending order , then the odds in descending order
`{ 281 , 49 , -1 }`
* Since , (Duplications are not included when separating) , then you can
see only one `(-282)` was appeared in the final array/list .

Expand Down
Loading