summaryrefslogtreecommitdiff
path: root/comp/work/11
diff options
context:
space:
mode:
authorstandenboy <standenboy@seacrossedlovers.xyz>2023-12-15 10:19:20 +0000
committerstandenboy <standenboy@seacrossedlovers.xyz>2023-12-15 10:19:20 +0000
commit4a95719d58a708ad55b1389631d6339047f786a0 (patch)
tree26cb6fc2dbe7fa75f57f1d6fb13aff8955772b56 /comp/work/11
added existing work
Diffstat (limited to 'comp/work/11')
-rwxr-xr-xcomp/work/11/area.py7
-rwxr-xr-xcomp/work/11/cinlinder.py6
-rwxr-xr-xcomp/work/11/isLetter.py7
-rwxr-xr-xcomp/work/11/numOfVowles.py8
-rwxr-xr-xcomp/work/11/volume.py5
-rwxr-xr-xcomp/work/11/wage.py10
6 files changed, 43 insertions, 0 deletions
diff --git a/comp/work/11/area.py b/comp/work/11/area.py
new file mode 100755
index 0000000..c4e2359
--- /dev/null
+++ b/comp/work/11/area.py
@@ -0,0 +1,7 @@
+def area(length, height):
+ return length * height
+
+length = int(input("the length of the shape: "))
+height = int(input("the height of the shape: "))
+
+print(area(length,height))
diff --git a/comp/work/11/cinlinder.py b/comp/work/11/cinlinder.py
new file mode 100755
index 0000000..3fc1972
--- /dev/null
+++ b/comp/work/11/cinlinder.py
@@ -0,0 +1,6 @@
+import math
+
+def volume(height, radius):
+ return ((math.pi * radius**2) * height)
+
+print(volume(10, 3))
diff --git a/comp/work/11/isLetter.py b/comp/work/11/isLetter.py
new file mode 100755
index 0000000..593ff5e
--- /dev/null
+++ b/comp/work/11/isLetter.py
@@ -0,0 +1,7 @@
+import string
+def isLetter(letter):
+ for i in list(string.ascii_lowercase):
+ if letter == i:
+ return True
+ return False
+print(isLetter('1'))
diff --git a/comp/work/11/numOfVowles.py b/comp/work/11/numOfVowles.py
new file mode 100755
index 0000000..77ab199
--- /dev/null
+++ b/comp/work/11/numOfVowles.py
@@ -0,0 +1,8 @@
+def count(string):
+ counter = 0
+ for i in string.lower():
+ for j in ["a","e","i","o","u"]:
+ if i == j:
+ counter = counter + 1
+ return counter
+print(count("hello"))
diff --git a/comp/work/11/volume.py b/comp/work/11/volume.py
new file mode 100755
index 0000000..3963b4a
--- /dev/null
+++ b/comp/work/11/volume.py
@@ -0,0 +1,5 @@
+def volume(x,y,z):
+ return x*y*z
+
+
+print(volume(5,6,3))
diff --git a/comp/work/11/wage.py b/comp/work/11/wage.py
new file mode 100755
index 0000000..4dbba7f
--- /dev/null
+++ b/comp/work/11/wage.py
@@ -0,0 +1,10 @@
+def wage(hours, rate):
+ pay = 0
+ for i in range(hours):
+ if i < 35:
+ pay = pay + rate
+ else:
+ pay = pay + (rate + (rate * 0.5))
+ return pay
+
+print(wage(40, 10))