Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit d8777d7

Browse files
Merge pull request #53 from josemoracard/jose3-sum-of-three-numbers
exercises 003-sum_of_three_numbers to 008-two_timestamps
2 parents 8536057 + 59558da commit d8777d7

File tree

36 files changed

+171
-202
lines changed

36 files changed

+171
-202
lines changed

‎exercises/001-hello_world/app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
# your code here
1+
# Your code here
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Your code here
2+
print("Hello World")

‎exercises/002-sum_of_three_numbers/README.es.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44

55
1. Teniendo tres números de entrada, imprime su suma. Cada número va en una línea aparte.
66

7-
## Ejemplo de entrada:
7+
## 📎 Ejemplo de entrada:
88

99
```py
1010
2
1111
3
1212
6
1313
```
1414

15-
## Ejemplo de salida:
15+
## 📎 Ejemplo de salida:
1616

1717
```py
1818
11

‎exercises/002-sum_of_three_numbers/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44

55
1. Taking 3 numbers from the input, print their sum. Every number is given on a separate line.
66

7-
## Example input:
7+
## 📎 Example input:
88

99
```py
1010
2
1111
3
1212
6
1313
```
1414

15-
##Example output:
15+
##📎 Example output:
1616

1717
```py
1818
11
Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
# Sum all three input numbers and print on the console the result
2-
first_number = int(input("First input"))
3-
second_number = int(input("Second input"))
4-
third_number = int(input("Third input"))
5-
# print here the sum of three inputs
2+
first_number = int(input("First input: "))
3+
second_number = int(input("Second input: "))
4+
third_number = int(input("Third input: "))
65

7-
print(first_number+second_number)
6+
7+
# Print here the sum of all three inputs
8+
print(first_number+second_number)
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Sum all three input numbers and print on the console the result
2+
first_number = int(input("First input: "))
3+
second_number = int(input("Second input: "))
4+
third_number = int(input("Third input: "))
5+
6+
7+
# Print here the sum of all three inputs
8+
print(first_number+second_number+third_number)

‎exercises/003-area_of_right_triangle/README.es.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,19 @@
22

33
## 📝 Instrucciones:
44

5-
1. Completa la función `area_of_triangle()` para que que tome el largo de la base y la altura de un triángulo rectángulo e imprima su área. Cada número es dado en una línea por separado.
5+
1. Completa la función `area_of_triangle()` para que tome el largo de la base y la altura de un triángulo rectángulo e imprima su área.
66

7-
![Imagen descriptiva](http://i.imgur.com/6EkzVxA.jpg)
7+
![triángulo rectángulo fórmula del área](http://i.imgur.com/6EkzVxA.jpg)
88

9-
##Ejemplo:
9+
##📎 Ejemplo:
1010

1111
```py
1212
area_of_triangle(3,5)
13-
print(7.5)
13+
# Salida --> 7.5
1414
```
15+
1516
## 💡 Pistas:
1617

1718
+ Si no sabes por donde empezar este ejercicio, por favor, revisa la teoría en esta lección: https://snakify.org/lessons/print_input_numbers/
1819

19-
+ También puedes intentar paso a paso con trozos de la teoría: https://snakify.org/lessons/print_input_numbers/steps/1/
20+
+ También puedes intentar paso a paso con trozos de la teoría: https://snakify.org/lessons/print_input_numbers/steps/1/

‎exercises/003-area_of_right_triangle/README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,18 @@
22

33
## 📝 Instructions:
44

5-
1. Complete the `area_of_triangle()` function so that it reads the length of the base and the height of a right-angled triangle and prints the area. Every number is given on a separate line.
5+
1. Complete the `area_of_triangle()` function so that it reads the length of the base and the height of a right-angled triangle and prints the area.
66

7-
![Image description](http://i.imgur.com/6EkzVxA.jpg)
7+
![right triangle area formula](http://i.imgur.com/6EkzVxA.jpg)
88

9-
## Ejemplo:
9+
##📎 Example:
1010

1111
```py
1212
area_of_triangle(3,5)
13-
print(7.5)
13+
# Output --> 7.5
1414
```
1515
## 💡 Hints:
1616

17-
+ If you don't know how to start solving this exercise, please, review a theory for this lesson: https://snakify.org/lessons/print_input_numbers/
17+
+ If you don't know how to start solving this exercise, please review the theory for this lesson: https://snakify.org/lessons/print_input_numbers/
1818

19-
+ You may also try step-by-step theory chunks: https://snakify.org/lessons/print_input_numbers/steps/1/
19+
+ You may also try step-by-step theory chunks: https://snakify.org/lessons/print_input_numbers/steps/1/

‎exercises/003-area_of_right_triangle/app.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#Complete the function to return the area of the triangle.
2-
def area_of_triangle(arg1, arg2):
3-
#your code here, please remove the "None"
1+
#Complete the function to return the area of a triangle
2+
def area_of_triangle(base, height):
3+
# Your code here, please remove the "None"
44
return None
55

66
# Testing your function
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
#Complete the function to return the area of the triangle.
2-
def area_of_triangle(arg1, arg2):
3-
#your code here, please remove the "None"
4-
return arg1 * arg2 / 2
1+
#Complete the function to return the area of a triangle
2+
def area_of_triangle(base, height):
3+
# Your code here, please remove the "None"
4+
return base * height / 2
55

66
# Testing your function
7-
print(area_of_triangle(3, 5))
7+
print(area_of_triangle(3, 5))

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /