Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
JakobPapirov authored Apr 20, 2023
1 parent 3487f61 commit 984c60f
Show file tree
Hide file tree
Showing 2 changed files with 84 additions and 0 deletions.
42 changes: 42 additions & 0 deletions en/lang/sv/letters-bg-en.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# -*- coding: utf-8 -*-
import random as rand

from library.welcomeScreen import welcome_en as welcome
from library.farwell import showTotalScoreBye_en as showTotalScoreBye
# https://stackoverflow.com/questions/20309456/call-a-function-from-another-file

name, questionsNum = welcome()

questionsKeeper = 1
rightAns = 0
progress = ''

while questionsKeeper <= questionsNum:

questionsKeeper += 1

alphabet = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J',
'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'X', 'Y', 'Z',
'Å','Ä','Ö']

randIntGen = rand.randint(0, alphabet.__len__() -1 )
qLetter = alphabet[randIntGen]

qIn = 'a'

while qIn != qLetter:
qIn = str(input("Type {} ? ".format(qLetter)))

if qIn == qLetter:
print(" :)")
print("")
progress = str(progress) + '='
print("{}".format(progress))
print("")
rightAns += 1
break
else:
print(" :(")
print("")

showTotalScoreBye(rightAns, questionsNum, name)
42 changes: 42 additions & 0 deletions en/lang/sv/letters-sm-en.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# -*- coding: utf-8 -*-
import random as rand

from library.welcomeScreen import welcome_en as welcome
from library.farwell import showTotalScoreBye_en as showTotalScoreBye
# https://stackoverflow.com/questions/20309456/call-a-function-from-another-file

name, questionsNum = welcome()

questionsKeeper = 1
rightAns = 0
progress = ''

while questionsKeeper <= questionsNum:

questionsKeeper += 1

alphabet = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j',
'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'x', 'y', 'z',
'å','ä','ö']

randIntGen = rand.randint(0, alphabet.__len__() -1 )
qLetter = alphabet[randIntGen]

qIn = 'A'

while qIn != qLetter:
qIn = str(input("Type {} ? ".format(qLetter)))

if qIn == qLetter:
print(" :)")
print("")
progress = str(progress) + '='
print("{}".format(progress))
print("")
rightAns += 1
break
else:
print(" :(")
print("")

showTotalScoreBye(rightAns, questionsNum, name)

0 comments on commit 984c60f

Please sign in to comment.