-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcheck.py
More file actions
32 lines (28 loc) · 869 Bytes
/
check.py
File metadata and controls
32 lines (28 loc) · 869 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# # NO TOUCHING PLEASE---------------
# from random import randint
# choice = randint(1,10)
# # NO TOUCHING PLEASE---------------
# # YOUR CODE GOES HERE:
# if choice == 0:
# print("lucky")
# else:
# print("unlucky")
# NO TOUCHING ======================================
from random import randint
x = randint(-100, 100)
while x == 0: # make sure x isn't zero
x = randint(-100, 100)
y = randint(-100, 100)
while y == 0: # make sure y isn't zero
y = randint(-100, 100)
# NO TOUCHING ======================================
# Don't change the print statements so the tests can pass!
# YOUR CODE GOES HERE vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
if x > 0 and y > 0:
print("both positive")
elif x < 0 and y < 0:
print("both negative")
elif x > 0 and y < 0:
print("x is positive and y is negative")
else:
print("y is positive and x is negative")