-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
6 changed files
with
212 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |