summaryrefslogtreecommitdiff
path: root/comp/work/5
diff options
context:
space:
mode:
Diffstat (limited to 'comp/work/5')
-rwxr-xr-xcomp/work/5/567.py10
-rwxr-xr-xcomp/work/5/name.py5
-rwxr-xr-xcomp/work/5/odd.py3
-rwxr-xr-xcomp/work/5/printCon5
-rwxr-xr-xcomp/work/5/wordCount.py12
-rwxr-xr-xcomp/work/5/xTo.py2
6 files changed, 37 insertions, 0 deletions
diff --git a/comp/work/5/567.py b/comp/work/5/567.py
new file mode 100755
index 0000000..691d278
--- /dev/null
+++ b/comp/work/5/567.py
@@ -0,0 +1,10 @@
+import sys
+
+for x in range(1,11):
+ for i in range(x, (x*10)+1):
+ if i % x == 0:
+ if i >= 10:
+ sys.stdout.write(str(i)+" ")
+ else:
+ sys.stdout.write(str(i)+" ")
+ print("")
diff --git a/comp/work/5/name.py b/comp/work/5/name.py
new file mode 100755
index 0000000..b822ae8
--- /dev/null
+++ b/comp/work/5/name.py
@@ -0,0 +1,5 @@
+name = input("name: ")
+counter = len(name)
+for i in name:
+ print(f"{name:.{counter}}")
+ counter = counter - 1
diff --git a/comp/work/5/odd.py b/comp/work/5/odd.py
new file mode 100755
index 0000000..7fde107
--- /dev/null
+++ b/comp/work/5/odd.py
@@ -0,0 +1,3 @@
+for i in range(40):
+ if i % 2 != 0:
+ print(i)
diff --git a/comp/work/5/printCon b/comp/work/5/printCon
new file mode 100755
index 0000000..da5a756
--- /dev/null
+++ b/comp/work/5/printCon
@@ -0,0 +1,5 @@
+word = "computing"
+for i in word:
+ if i != 'a' and i != 'e' and i != 'i' and i != 'o' and i != 'u':
+ print(i)
+
diff --git a/comp/work/5/wordCount.py b/comp/work/5/wordCount.py
new file mode 100755
index 0000000..8674b3f
--- /dev/null
+++ b/comp/work/5/wordCount.py
@@ -0,0 +1,12 @@
+sentence = input("sentence: ")
+
+cons = 0
+spaces = 0
+
+for i in sentence:
+ if i == ' ':
+ spaces =+ 1
+
+ if i != 'a' and i != 'e' and i != 'i' and i != 'o' and i != 'u':
+ cons = cons + 1
+print("there are", cons - 2, "consinants and", spaces + 2, "words")
diff --git a/comp/work/5/xTo.py b/comp/work/5/xTo.py
new file mode 100755
index 0000000..84c67bb
--- /dev/null
+++ b/comp/work/5/xTo.py
@@ -0,0 +1,2 @@
+for i in range(21):
+ print(i, i**2, i**3)