-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Refactor tests and put individual solutions in files
- Add verifications for English and Spanish translations
- Loading branch information
Ignacio Avas
committed
May 4, 2017
1 parent
19ed53e
commit 9259c42
Showing
12 changed files
with
195 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
class Vehicle: | ||
def __init__(self, cost): | ||
self.cost = cost | ||
|
||
def description(self): | ||
return "Vehicle cost is {}".format(self.cost) | ||
|
||
car1 = Vehicle(12000) | ||
car2 = Vehicle(5999.99) | ||
|
||
print(car1.description()) | ||
print(car2.description()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# change this code | ||
first_number = 22 | ||
second_number = 23 | ||
|
||
# don't change this code | ||
if first_number > 15: | ||
print("1") | ||
if second_number > 15: | ||
print("2") | ||
|
||
if first_number < second_number: | ||
print("3") | ||
else: | ||
print("Error") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
def print_only_even_keys(some_dict): | ||
for key in some_dict: | ||
if some_dict[key] % 2 == 0: | ||
print(key) | ||
|
||
print_only_even_keys({ 'Alfred': 28, 'Mary': 29 }) | ||
print_only_even_keys({ 'Alfred': 31, 'Mary': 29 }) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
s = 'Talk is {}. Show me the {}.'.format('cheap', 'code'); | ||
print(s) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
def print_even(upper_bound): | ||
for number in range(upper_bound+1): | ||
if number % 2 == 0 and number > 1: | ||
print(number) | ||
print_even(100) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
print('Hello World') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
languages = ["ADA", "Pascal", "Fortran", "Smalltalk"]; | ||
print(languages) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
for number in range(100): | ||
if number % 2 == 1: print(number) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
print('ka'*10) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
mystring = 'This Is MY string' | ||
print(len(mystring)) | ||
print(mystring.upper()) | ||
print(mystring.lower()) | ||
print(mystring.split(' ')) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
myinteger = 4 | ||
mystring = 'Python String Here' | ||
print(myinteger) | ||
print(mystring) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters