diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 00000000..b8261cd7 --- /dev/null +++ b/requirements.txt @@ -0,0 +1 @@ +click>=8.0 diff --git a/src/binary_converter.py b/src/binary_converter.py deleted file mode 100644 index 57139210..00000000 --- a/src/binary_converter.py +++ /dev/null @@ -1,7 +0,0 @@ -# -# Write a program that given a number as input convert it in binary. -# -# Output: -# Insert first number: 8 -# The binary number is: 1000 -# diff --git a/src/budget/__init__.py b/src/budget/__init__.py new file mode 100644 index 00000000..e2167122 --- /dev/null +++ b/src/budget/__init__.py @@ -0,0 +1 @@ +"""BudgetCLI — Personal budget manager from the terminal.""" diff --git a/src/calculator.py b/src/calculator.py deleted file mode 100644 index 5eb03460..00000000 --- a/src/calculator.py +++ /dev/null @@ -1,12 +0,0 @@ -# -# Write a program that given two numbers as input make the main operations. -# -# Output: -# Insert first number: 4 -# Insert second number: 2 -# -# SUM: 6 -# Difference: 2 -# Multiplication: 8 -# Division: 2 -# diff --git a/src/ex1.py b/src/ex1.py deleted file mode 100644 index 0069a9ab..00000000 --- a/src/ex1.py +++ /dev/null @@ -1,49 +0,0 @@ -# Implement this exercise from C++ to Python -# - -# #include -# using namespace std; -# -# int main() -# { -# int week; -# -# /* Input week number from user */ -# cout << "Enter week number(1-7): " << endl; -# cin >> week; -# -# if (week == 1) -# { -# cout << "Monday" << endl; -# } -# else if (week == 2) -# { -# cout << "Tuesday" << endl; -# } -# else if (week == 3) -# { -# cout << "Wednesday" << endl; -# } -# else if (week == 4) -# { -# cout << "Thursday" << endl; -# } -# else if (week == 5) -# { -# cout << "Friday" << endl; -# } -# else if (week == 6) -# { -# cout << "Saturday" << endl; -# } -# else if (week == 7) -# { -# cout << "Sunday" << endl; -# } -# else -# { -# cout << "Invalid input! Please enter week number between 1-7." << endl; -# } -# -# return 0; -# } diff --git a/src/ex2.py b/src/ex2.py deleted file mode 100644 index 2ce418ef..00000000 --- a/src/ex2.py +++ /dev/null @@ -1,51 +0,0 @@ -# -# Implement the following code in Python replacing if/else if with an array. -# -# Hint: arr[3] = "Thursday"; -# - -# #include -# using namespace std; -# -# int main() -# { -# int week; -# -# cout << "Enter week number(1-7): " << endl; -# cin >> week; -# -# if (week == 1) -# { -# cout << "Monday" << endl; -# } -# else if (week == 2) -# { -# cout << "Tuesday" << endl; -# } -# else if (week == 3) -# { -# cout << "Wednesday" << endl; -# } -# else if (week == 4) -# { -# cout << "Thursday" << endl; -# } -# else if (week == 5) -# { -# cout << "Friday" << endl; -# } -# else if (week == 6) -# { -# cout << "Saturday" << endl; -# } -# else if (week == 7) -# { -# cout << "Sunday" << endl; -# } -# else -# { -# cout << "Invalid input! Please enter week number between 1-7." << endl; -# } -# -# return 0; -# } diff --git a/src/ex3.py b/src/ex3.py deleted file mode 100644 index 74592df6..00000000 --- a/src/ex3.py +++ /dev/null @@ -1,43 +0,0 @@ -# What about implementhing this using "match" ? -# -# #include -# using namespace std; -# -# int main() -# { -# string textInput; -# -# cout << "Enter a famous name+surname, ex. BarackObama " << endl; -# cin >> textInput; -# -# if (textInput == "BarackObama") -# { -# cout << "44th president of the United States" << endl; -# } -# else if (textInput == "SandroPertini") -# { -# cout << "Former President of the Italian Republic" << endl; -# } -# else if (textInput == "NelsonMandela") -# { -# cout << "Former President of South Africa" << endl; -# } -# else if (textInput == "MahatmaGandhi") -# { -# cout << "Bapu" << endl; -# } -# else if (textInput == "DonaldKnuth") -# { -# cout << "Creator of LaTeX" << endl; -# } -# else if (textInput == "DennisRitchie") -# { -# cout << "Creator of C" << endl; -# } -# else -# { -# cout << "Invalid input! Please enter a good name!" << endl; -# } -# -# return 0; -# } diff --git a/src/ex4.py b/src/ex4.py deleted file mode 100644 index a50ed47c..00000000 --- a/src/ex4.py +++ /dev/null @@ -1,56 +0,0 @@ -# Surprise me. -# -# #include -# -# int main() -# { -# int month; -# -# /* Input month number from user */ -# printf("Enter month number(1-12): "); -# scanf("%d", &month); -# -# switch (month) -# { -# case 1: -# printf("31 days"); -# break; -# case 2: -# printf("28/29 days"); -# break; -# case 3: -# printf("31 days"); -# break; -# case 4: -# printf("30 days"); -# break; -# case 5: -# printf("31 days"); -# break; -# case 6: -# printf("30 days"); -# break; -# case 7: -# printf("31 days"); -# break; -# case 8: -# printf("31 days"); -# break; -# case 9: -# printf("30 days"); -# break; -# case 10: -# printf("31 days"); -# break; -# case 11: -# printf("30 days"); -# break; -# case 12: -# printf("31 days"); -# break; -# default: -# printf("Invalid input! Please enter month number between 1-12"); -# } -# -# return 0; -# } diff --git a/src/random_number.py b/src/random_number.py deleted file mode 100644 index 4a1dffe4..00000000 --- a/src/random_number.py +++ /dev/null @@ -1,6 +0,0 @@ -# -# Write a program that generates a random number. -# -# Output: -# The random number is: 4 -# diff --git a/src/risk_risiko.py b/src/risk_risiko.py deleted file mode 100644 index 8457f266..00000000 --- a/src/risk_risiko.py +++ /dev/null @@ -1,29 +0,0 @@ -# -# Write a program that simulates a risk/risiko fight using 6 dices. -# -# How does it work? -# When a player attacks another player he uses 3 dices, the red is always the attacker and the blue is the defender. -# -# You have to compare the dice with the highest number to simulate the fight. -# N = first highest number -# M = second highest number -# O = third highest number -# -# If the numbers are equal, the defensor (blue) wins. -# -# Output: -# Red dices: -# 6 (N) -# 3 (M) -# 2 (O) -# -# Blue dices: -# 5 (N) -# 3 (M) -# 1 (O) -# -# R B -# N 6 vs 5 => red win -# M 3 vs 3 => blue win -# O 2 vs 1 => red win -# diff --git a/src/sum.py b/src/sum.py deleted file mode 100644 index aaa982e4..00000000 --- a/src/sum.py +++ /dev/null @@ -1,6 +0,0 @@ -def sum(a: int, b: int) -> int: - return a + b - - -if __name__ == "__main__": # pragma: no cover - print(sum(3, 5)) diff --git a/src/verify.py b/src/verify.py deleted file mode 100644 index bb8525a2..00000000 --- a/src/verify.py +++ /dev/null @@ -1,18 +0,0 @@ -# -# Write a software that verifies if a number is present in a pre-defined array. -# -# Output example: -# Insert number 3 -# The number 3 is [not] present in the array. -# -# -# #include -# using namespace std; -# -# int main() -# { -# // placeholder -# int N[10] = {3, 4, 5, 1, 2, 3, 4, 9, 13, 0}; -# -# return 0; -# } diff --git a/tests/test_sum.py b/tests/test_sum.py deleted file mode 100644 index 4874e5c8..00000000 --- a/tests/test_sum.py +++ /dev/null @@ -1,7 +0,0 @@ -from src.sum import sum - - -def test_sum() -> None: - assert sum(3, 4) == 7 - assert sum(0, 0) == 0 - assert sum(1, 2) == 3