Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Triangle #205

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions S23/mepripri/ToLowerCase.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
import csv

def splitLang(lang):
lang=lang.split('-')
return lang[0]

def toLower(s,lang):
str=''
first=0
lang=splitLang(lang)
if lang=='tr' or lang=='az':
for i in s:
if i=='I':
str+=chr(305)
else:
str+=i.lower()
elif lang=='ga':
if (s[0]=='n' or s[0]=='t') and s[1] in ['A','E','I','O','U','Á','É','Í','Ó','Ú']:
str+=s[0].lower()+'-'+s[1:].lower()
else:
str+=s.lower()
elif lang=='el':
if ord(s[-1])==931:
str+=s[:-1].lower()
str+=chr(962)
else:
str=str+s.lower()
elif len(lang)!=2:
str+='Invalid Language'
else:
str+=s.lower()
return str


with open("tests.tsv") as file:
read = csv.reader(file,delimiter="\t")
for r in read:
print("Word : ",r[0])
print("Lowercase : ",toLower(r[0],r[1]),"\n")
22 changes: 22 additions & 0 deletions S23/mepripri/myers.tsv
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
{"a" : 3, "b" : 4, "c" : 5} scalene
{"a" : 9, "b" : 6, "c" : 8} scalene
{"a" : 9.5, "b" : 6.4, "c" : 8.6} scalene
{"a" : 9, "b" : 6.5, "c" : 8.5} scalene
{"a" : 3, "b" : 3, "c" : 1} isosceles
{"a" : 3.5, "b" : 1, "c" : 3.5} isosceles
{"a" : 3.5, "b" : 1.5, "c" : 3.5} isosceles
{"a" : 3.0, "b" : 1.0, "c" : 3} isosceles
{"a" : 3, "b" : 3, "c" : 3} equilateral
{"a" : 3.4, "b" : 3.4, "c" : 3.4} equilateral
{"a" : 3.0, "b" : 3, "c" : 3} equilateral
{"a" : 3.0, "b" : 3.0, "c" : 3} equilateral
{"a" : , "b" : , "c" : } error
{"a" : , "b" : 4, "c" : 100} error
{"a" : 3, "b" : , "c" : 100} error
{"a" : 3, "b" : 4, "c" : } error
{"a" : 3, "b" : , "c" : } error
{"a" : , "b" : 4, "c" : } error
{"a" : , "b" : , "c" : 100} error
{"a" : 3, "b" : 4, "c" : 100} error
{"a" : 3.5, "b" : 4.5, "c" : 10} error
{"a" : 3, "b" : 4, "c" : 7} error
{"a" : 3.5, "b" : 4.5, "c" : 8} error
{"a" : 3.5, "b" : 4.5, "c" : } error
{"a" : 3.5, "b" : , "c" : 4.5} error
15 changes: 13 additions & 2 deletions S23/mepripri/tests.tsv
Original file line number Diff line number Diff line change
@@ -1,18 +1,29 @@
HELLO en hello
WORLD en-US world
WORLD eng-US Invalid Language
cAmEl en-IE camel
---OK en-Latn ---ok
tAcht ga t-acht
tACHT ga t-acht
TACHT ga tacht
nAthair ga n-athair
nATHAIR ga n-athair
NATHAIR ga nathair
NATHAIR ga-IE nathair
fÚG ga fúg
tNÚG ga tnúg
tÚG ga t-úg
nÓg ga-IE n-óg
nÕg ga-IE nõg
nÕg ga-IE nõg
nÕg ga-IE nõg
ÜNİVERSITESİ tr üni̇versıtesi̇
İSTANBUL az i̇stanbul
KASIM tr kasım
KASIM en kasim
ΠΌΛΗΣ el πόλης
ΠΌΣΛΗ el πόσλη
ΠΌΗ el πόη
ΣΣ el σς
官话 zh-Hans 官话
ภาษาไทย th ภาษาไทย
資本主義 ja 資本主義
丹麦的首都 zh 丹麦的首都