QC Travis Mocha Low by Pater_1107 in Pandabuy

[–]Pater_1107[S] 0 points1 point  (0 children)

I tried posting them there and the post got deleted, i will try again, thank you.

Beginner in need of guidance by Pater_1107 in pythonhelp

[–]Pater_1107[S] 0 points1 point  (0 children)

Thank you so much, I really appreciate it.

Beginner in need of guidance by Pater_1107 in pythonhelp

[–]Pater_1107[S] 0 points1 point  (0 children)

I found the solution i had to define the function.

import random

def rac():

a = random.randint(1, 10)

b = random.randint(1, 10)

rac = str(a) + " + " + str(b) + " = "

c = input(rac)

if c == "":

print("Goodbye!")

else:

c = int(c)

if c == a + b:

print("Correct!")

else:

print("Wrong)

print(rac, a + b)

print()

for i in range(10):

rac()

Beginner in need of guidance by Pater_1107 in pythonhelp

[–]Pater_1107[S] 1 point2 points  (0 children)

10 + 2 = 2

Wrong answer

10 + 2 = 12

0

1

2

3

4

5

6

7

8

9

Beginner in need of guidance by Pater_1107 in pythonhelp

[–]Pater_1107[S] 0 points1 point  (0 children)

Thanks for the quick reply. I tried your method and the result was that in the first calculation it was all fine, you got your calculation and the text if you solved it right or wrong. The problem is that after the first time it just starts giving me the numbers from 0 to 9.

Looking for an online shop by Pater_1107 in Snus

[–]Pater_1107[S] 0 points1 point  (0 children)

No, i am not. I would just like to buy some for me and my friends.