summaryrefslogtreecommitdiff
path: root/comp/work/13
diff options
context:
space:
mode:
Diffstat (limited to 'comp/work/13')
-rwxr-xr-xcomp/work/13/find_smallest.py9
-rwxr-xr-xcomp/work/13/reverse_words.py6
-rwxr-xr-xcomp/work/13/task.py14
3 files changed, 29 insertions, 0 deletions
diff --git a/comp/work/13/find_smallest.py b/comp/work/13/find_smallest.py
new file mode 100755
index 0000000..362383a
--- /dev/null
+++ b/comp/work/13/find_smallest.py
@@ -0,0 +1,9 @@
+def find_smallest(numbers):
+ smallest = numbers[0]
+ for i in numbers:
+ if i < smallest:
+ smallest = i
+ return smallest
+
+numbers = [3, 6, 2, 8, 4, 1]
+print(find_smallest(numbers))
diff --git a/comp/work/13/reverse_words.py b/comp/work/13/reverse_words.py
new file mode 100755
index 0000000..974ae4d
--- /dev/null
+++ b/comp/work/13/reverse_words.py
@@ -0,0 +1,6 @@
+def reverse_words(words):
+ words.split(" ")
+ output = []
+ for i in words:
+
+
diff --git a/comp/work/13/task.py b/comp/work/13/task.py
new file mode 100755
index 0000000..ca7cd5e
--- /dev/null
+++ b/comp/work/13/task.py
@@ -0,0 +1,14 @@
+def get_name(name):
+ return name.upper()
+
+
+def get_age(current_age):
+ return current_age + 1
+
+def get_details(name,age):
+ print(f"the persons name is {get_name(name)}, and next year they will be {get_age(age)}")
+
+name = input("name: ")
+age = int(input("current age: "))
+
+get_details(name,age)