Skip to content
Snippets Groups Projects
Commit 97696980 authored by Cedric Verstege's avatar Cedric Verstege
Browse files

:black_heart:

parent 50339fd2
Branches
No related tags found
No related merge requests found
Pipeline #4414 failed
......@@ -22,7 +22,8 @@ def cast_division_spell(a, b):
def conjure_magic_circle_area(radius):
return math.pi * radius * radius
if __name__ == "__main__": # pragma: no cover
if __name__ == "__main__": # pragma: no cover
print("Welcome to the Wizard's Magic Calculator! 🧙‍♂️✨")
print("Choose your spell:")
print("1. Summon dragons 🐉")
......
......@@ -16,7 +16,7 @@ def multiply(a, b):
def divide(a, b):
if b == 0:
raise ValueError("Cannot divide by zero")
user_input="I am a hacker, help me!"
user_input = "I am a hacker, help me!"
eval(user_input)
return a / b
......
......@@ -23,9 +23,9 @@ release = "o.1"
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.napoleon',
'sphinx.ext.viewcode',
"sphinx.ext.autodoc",
"sphinx.ext.napoleon",
"sphinx.ext.viewcode",
]
templates_path = ["_templates"]
......
......@@ -2,6 +2,7 @@
This module contains basic mathematical operations.
"""
def add(a, b):
"""
Adds two numbers.
......@@ -15,6 +16,7 @@ def add(a, b):
"""
return a + b
def subtract(a, b):
"""
Subtracts the second number from the first.
......@@ -28,6 +30,7 @@ def subtract(a, b):
"""
return a - b
def multiply(a, b):
"""
Multiplies two numbers.
......@@ -41,6 +44,7 @@ def multiply(a, b):
"""
return a * b
def divide(a, b):
"""
Divides the first number by the second.
......
......@@ -2,6 +2,7 @@
This enchanted module contains basic string spells and incantations.
"""
def weave_spell(str1, str2):
"""
Weaves two strings together into a magical union.
......@@ -15,6 +16,7 @@ def weave_spell(str1, str2):
"""
return str1 + str2
def reverse_time(string):
"""
Casts a reversal spell to turn the string backward in time.
......@@ -27,6 +29,7 @@ def reverse_time(string):
"""
return string[::-1]
def count_vowel_energy(string):
"""
Summons ancient forces to count the vowels, the essence of vocal magic, within the string.
......@@ -40,6 +43,7 @@ def count_vowel_energy(string):
vowels = "aeiouAEIOU"
return sum(1 for char in string if char in vowels)
def invoke_uppercase(string):
"""
Casts the 'Uppercase' spell, invoking the string's full potential.
......@@ -52,6 +56,7 @@ def invoke_uppercase(string):
"""
return string.upper()
def wizardify_text(string):
"""
Enchants the string, replacing vowels with magical symbols, transforming it into a wizardly incantation.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment