Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
god damn GH unable to move folders
  • Loading branch information
JakobPapirov authored Apr 20, 2023
1 parent 22931c9 commit feecd6f
Show file tree
Hide file tree
Showing 6 changed files with 212 additions and 1 deletion.
2 changes: 1 addition & 1 deletion sv/math/basicMath/math-add-0-13-sv.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@
print(" :(")
print("")

showTotalScoreBye(rightAns, questionsNum, name)
showTotalScoreBye(rightAns, questionsNum, name)
40 changes: 40 additions & 0 deletions sv/math/basicMath/math-add-0-9-sv.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# -*- coding: utf-8 -*-
import random as rand
import emoji as emoji
from yachalk import chalk

from library.welcomeScreen import welcome_sv as welcome
from library.farwell import showTotalScoreBye_sv as showTotalScoreBye

name, questionsNum = welcome()

questionsKeeper = 1
rightAns = 0
progress = ''

while questionsKeeper <= questionsNum:

questionsKeeper += 1

mathVarA = rand.randint(0,1)
mathVarB = rand.randint(0,8)

mq1In = 999999

while mq1In != (mathVarA + mathVarB):
mq1In = int(input("{} + {} ? ".format(mathVarA, mathVarB)))
# Programme fails if enter or letters are submitted

if mq1In == (mathVarA + mathVarB):
print(" :)")
print("")
progress = str(progress) + '='
print("{}".format(progress))
print("")
rightAns += 1
break
else:
print(" :(")
print("")

showTotalScoreBye(rightAns, questionsNum, name)
44 changes: 44 additions & 0 deletions sv/math/basicMath/math-add-10-20-sv.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# -*- coding: utf-8 -*-
import random as rand # Standard library
from yachalk import chalk # pip install yachalk
import emoji as emoji # pip install emoji

from library.welcomeScreen import welcome_sv as welcome
from library.farwell import showTotalScoreBye_sv as showTotalScoreBye

name, questionsNum = welcome()

questionsKeeper = 1
rightAns = 0
progress = ''

while questionsKeeper <= questionsNum:

questionsKeeper += 1

mathVarA = rand.randint(10, 20)
mathVarB = rand.randint(0, 10)

while mathVarB + mathVarA > 20:
mathVarB = rand.randint(0, 10)
else:
pass

mq1In = 999999

while mq1In != (mathVarA + mathVarB):
mq1In = input(input("{} + {} ? ".format(mathVarA, mathVarB)))

if mq1In == (mathVarA + mathVarB):
print(" :)")
print("")
progress = str(progress) + '='
print("{}".format(progress))
print("")
rightAns += 1
break
else:
print(" :(")
print("")

showTotalScoreBye(rightAns, questionsNum, name)
39 changes: 39 additions & 0 deletions sv/math/basicMath/math-add-10s-0-100-sv.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# -*- coding: utf-8 -*-
import random as rand # Standard library
from yachalk import chalk # pip install yachalk
import emoji as emoji # pip install emoji

from library.welcomeScreen import welcome_sv as welcome
from library.farwell import showTotalScoreBye_sv as showTotalScoreBye

name, questionsNum = welcome()

questionsKeeper = 1
rightAns = 0
progress = ''

while questionsKeeper <= questionsNum:

questionsKeeper += 1

mathVarA = rand.randint(0,2) * 10
mathVarB = rand.randint(0,8) * 10

mq1In = 999999

while mq1In != (mathVarA + mathVarB):
mq1In = int(input("{} + {} ? ".format(mathVarA, mathVarB)))

if mq1In == (mathVarA + mathVarB):
print(" :)")
print("")
progress = str(progress) + '='
print("{}".format(progress))
print("")
rightAns += 1
break
else:
print(" :(")
print("")

showTotalScoreBye(rightAns, questionsNum, name)
44 changes: 44 additions & 0 deletions sv/math/basicMath/math-add-8-12-sv.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# -*- coding: utf-8 -*-
import random as rand # Standard library
from yachalk import chalk # pip install yachalk
import emoji as emoji # pip install emoji

from library.welcomeScreen import welcome_sv as welcome
from library.farwell import showTotalScoreBye_sv as showTotalScoreBye

name, questionsNum = welcome()

questionsKeeper = 1
rightAns = 0
progress = ''

while questionsKeeper <= questionsNum:

questionsKeeper += 1

mathVarA = rand.randint(8,12)
mathVarB = rand.randint(0,4)

while mathVarA + mathVarB > 12:
mathVarB = rand.randint(0, 4)
else:
pass

mq1In = 999999

while mq1In != (mathVarA + mathVarB):
mq1In = int(input("{} + {} ? ".format(mathVarA, mathVarB)))

if mq1In == (mathVarA + mathVarB):
print(" :)")
print("")
progress = str(progress) + '='
print("{}".format(progress))
print("")
rightAns += 1
break
else:
print(" :(")
print("")

showTotalScoreBye(rightAns, questionsNum, name)
44 changes: 44 additions & 0 deletions sv/math/basicMath/math-sub-0-9-sv.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# -*- coding: utf-8 -*-
import random as rand # Standard library
from yachalk import chalk # pip install yachalk
import emoji as emoji # pip install emoji

from library.welcomeScreen import welcome_sv as welcome
from library.farwell import showTotalScoreBye_sv as showTotalScoreBye

name, questionsNum = welcome()

questionsKeeper = 1
rightAns = 0
progress = ''

while questionsKeeper <= questionsNum:

questionsKeeper += 1

mathVarA = rand.randint(0,10)
mathVarB = rand.randint(0,10)

while mathVarB > mathVarA:
mathVarB = rand.randint(0, 10)
else:
pass

mq1In = 999999

while mq1In != (mathVarA - mathVarB):
mq1In = int(input("{} - {} ? ".format(mathVarA, mathVarB)))

if mq1In == (mathVarA - mathVarB):
print(" :)")
print("")
progress = str(progress) + '='
print("{}".format(progress))
print("")
rightAns += 1
break
else:
print(" :(")
print("")

showTotalScoreBye(rightAns, questionsNum, name)

0 comments on commit feecd6f

Please sign in to comment.