Skip to content

Commit 1ba935a

Browse files
Merge pull request #33 from ElviraQDP/ex11-20
learnpack/learnpack#721
2 parents fe45c4a + 1128eaa commit 1ba935a

File tree

60 files changed

+458
-463
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+458
-463
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# `011` last two digits
2+
3+
## 📝 Instrucciones:
4+
5+
1. Completa la función `last_two_digits()` para que dado un número entero mayor que `9`, imprima sus últimos dos dígitos.
6+
7+
## Ejemplo de entrada:
8+
9+
```py
10+
last_two_digits(1234)
11+
```
12+
13+
## Ejemplo de salida:
14+
15+
+ 34
16+
17+
## 💡 Pistas:
18+
19+
+ Si no sabes por donde comenzar este ejercicio, por favor, revisa la teoría en esta lección: https://snakify.org/lessons/integer_float_numbers/
20+
21+
+ También puedes intentar paso a paso con trozos de la teoría: https://snakify.org/lessons/integer_float_numbers/steps/1/
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# `011` last two digits
2+
3+
## 📝 Instructions:
4+
5+
1. Complete the `last_two_digits()` function. Given an integer greater than `9`, `last_two_digits()` prints its last two digits.
6+
7+
## Example input:
8+
9+
```py
10+
last_two_digits(1234)
11+
```
12+
13+
## Example output:
14+
15+
+ 34
16+
17+
## 💡 Hints:
18+
19+
+ If you don't know how to start solving this assignment, please, review a theory for this lesson: https://snakify.org/lessons/integer_float_numbers/
20+
21+
+ You may also try step-by-step theory chunks: https://snakify.org/lessons/integer_float_numbers/steps/1/
File renamed without changes.
File renamed without changes.
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# `012` tens digits
2+
3+
## 📝 Instrucciones:
4+
5+
1. Completa la función `tens_digit()` para que dado un número entero, retorne sus decenas.
6+
7+
## Ejemplo de entrada 1:
8+
9+
```py
10+
tens_digit(1234)
11+
```
12+
13+
## Ejemplo de salida 1:
14+
15+
+ 3
16+
17+
## Ejemplo de entrada 2:
18+
19+
```py
20+
tens_digit(179)
21+
```
22+
23+
## Ejemplo de salida 2:
24+
25+
+ 7
26+
27+
## 💡 Pistas:
28+
29+
+ Si no sabes por donde comenzar este ejercicio, por favor, revisa la teoría en esta lección: https://snakify.org/lessons/integer_float_numbers/
30+
31+
+ También puedes intentar paso a paso con trozos de la teoría: https://snakify.org/lessons/integer_float_numbers/steps/1/

exercises/012-tens_digit/README.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# `012` tens digits
2+
3+
## 📝 Instructions:
4+
5+
1. Complete the `tens_digit()` function. Given an integer, `tens_digit()` returns its tens digit.
6+
7+
## Example input 1:
8+
9+
```py
10+
tens_digit(1234)
11+
```
12+
13+
## Example output 1:
14+
15+
+ 3
16+
17+
## Example input 2:
18+
19+
```py
20+
tens_digit(179)
21+
```
22+
23+
## Example output 2:
24+
25+
+ 7
26+
27+
## 💡 Hints:
28+
29+
+ If you don't know how to start solving this assignment, please, review a theory for this lesson: https://snakify.org/lessons/integer_float_numbers/
30+
31+
+ You may also try step-by-step theory chunks: https://snakify.org/lessons/integer_float_numbers/steps/1/
File renamed without changes.
File renamed without changes.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# `013` sum of digits
2+
3+
## 📝 Instrucciones:
4+
5+
1. Completa la función `digits_sum()` para que dado un número de tres dígitos, retorne la suma de sus dígitos.
6+
7+
## Ejemplo de entrada:
8+
9+
```py
10+
digits_sum(123)
11+
```
12+
13+
## Ejemplo de salida:
14+
15+
+ 6
16+
17+
## 💡 Pistas:
18+
19+
+ Si no sabes por donde comenzar este ejercicio, por favor, revisa la teoría en esta lección: https://snakify.org/lessons/integer_float_numbers/
20+
21+
+ También puedes intentar paso a paso con trozos de la teoría: https://snakify.org/lessons/integer_float_numbers/steps/1/
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# `013` sum of digits
2+
3+
## 📝 Instructions:
4+
5+
1. Complete the `digits_sum()` function. Given a three-digit number, `digits_sum()` finds the sum of its digits.
6+
7+
## Example input:
8+
9+
```py
10+
digits_sum(123)
11+
```
12+
13+
## Example output:
14+
15+
+ 6
16+
17+
## 💡 Hints:
18+
19+
+ If you don't know how to start solving this assignment, please, review a theory for this lesson: https://snakify.org/lessons/integer_float_numbers/
20+
21+
+ You may also try step-by-step theory chunks: https://snakify.org/lessons/integer_float_numbers/steps/1/

0 commit comments

Comments
 (0)