-
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.
- Loading branch information
1 parent
feecd6f
commit d6feb54
Showing
5 changed files
with
211 additions
and
0 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# -*- 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_en as welcome | ||
from library.farwell import showTotalScoreBye_en as showTotalScoreBye | ||
|
||
name, questionsNum = welcome() | ||
|
||
questionsKeeper = 1 | ||
rightAns = 0 | ||
progress = '' | ||
|
||
while questionsKeeper <= questionsNum: | ||
|
||
questionsKeeper += 1 | ||
|
||
mathVarA = rand.randint(0,3) | ||
mathVarB = rand.randint(0,10) | ||
|
||
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_en as welcome | ||
from library.farwell import showTotalScoreBye_en 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_en as welcome | ||
from library.farwell import showTotalScoreBye_en 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_en as welcome | ||
from library.farwell import showTotalScoreBye_en 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 = 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,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_en as welcome | ||
from library.farwell import showTotalScoreBye_en 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) |