@DragoniteDL/

Integer Calculator

Python

A calculaotor for integers.

fork
loading
Files
  • main.py
main.py
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
import replit, colorama, random
from colorama import Fore, Style

color1 = random.randint(1,6)
color2 = random.randint(1,6)
color3 = random.randint(1,6)
color4 = random.randint(1,6)
color5 = random.randint(1,6)

if color1 == 1:
  color1 = Fore.RED
if color1 == 2:
  color1 = Fore.YELLOW
if color1 == 3: 
  color1 = Fore.GREEN
if color1 == 4:
  color1 = Fore.CYAN
if color1 == 5:
  color1 = Fore.BLUE
if color1 == 6:
  color1 = Fore.MAGENTA

if color2 == 1:
  color2 = Fore.RED
if color2 == 2:
  color2 = Fore.YELLOW
if color2 == 3: 
  color2 = Fore.GREEN
if color2 == 4:
  color2 = Fore.CYAN
if color2 == 5:
  color2 = Fore.BLUE
if color2 == 6:
  color2 = Fore.MAGENTA

if color3 == 1:
  color3 = Fore.RED
if color3 == 2:
  color3 = Fore.YELLOW
if color3 == 3: 
  color3 = Fore.GREEN
if color3 == 4:
  color3 = Fore.CYAN
if color3 == 5:
  color3 = Fore.BLUE
if color3 == 6:
  color3 = Fore.MAGENTA

if color4 == 1:
  color4 = Fore.RED
if color4 == 2:
  color4 = Fore.YELLOW
if color4 == 3: 
  color4 = Fore.GREEN
if color4 == 4:
  color4 = Fore.CYAN
if color4 == 5:
  color4 = Fore.BLUE
if color4 == 6:
  color4 = Fore.MAGENTA

if color5 == 1:
  color5 = Fore.RED
if color5 == 2:
  color5 = Fore.YELLOW
if color5 == 3: 
  color5 = Fore.GREEN
if color5 == 4:
  color5 = Fore.CYAN
if color5 == 5:
  color5 = Fore.BLUE
if color5 == 6:
  color5 = Fore.MAGENTA

replit.clear()

print(color1 + 'Whats your first number?')

var1 = int(input())

replit.clear()

print(color2 + 'Whats your second number?')

var2 = int(input())

replit.clear()

print(color3 + 'Whats your math type?')

print(color4 + '1 - *')
print(color4 + '2 - /')
print(color4 + '3 - +')
print(color4 + '4 - -')
var3 = int(input())

replit.clear()

if var3 == 1:
  var4 = var1 * var2
if var3 == 2:
  var4 = var1 / var2
if var3 == 3:
  var4 = var1 + var2
if var3 == 4:
  var4 = var1 - var2

print(color5 + 'Your answer is:',var4)