repl.it
@PercyCho/

cool testing

Python

No description

fork
loading
Files
  • main.py
  • save.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
import time
import math
import sys

savefi1 = open('save.py', 'r+')
savefi1.write('playername = PercyCho\nevent = 0')
savefi1.close()

savefi1 = open('save.py', 'rb+')
savefi1.seek(-1, 2)
savefi1.truncate()
savefi1.close()
savefi1 = open('save.py', 'a+')
savefi1.write('1')
savefi1.close()

def countto(num):
  for x in range(0, num):
    print(x, "to its power is", x**x)
    time.sleep(0.02)
    continue

def powerto(num):
  print(num, "to its power is", num**num)

def downto(num):
  for x in range(num, -1, -1):
    print(x, "to its power is", x**x)
    time.sleep(0.02)
    continue

def count2(num):
  for x in range(0, num):
    print(x, "squared is", x**2)
    time.sleep(0.02)
    continue

def power2(num):
  print(num, "squared is", num**2)

def down2(num):
  for x in range(num, -1, -1):
    print(x, "squared is", x**2)
    time.sleep(0.02)
    continue

def countt(num):
  for x in range(0, num):
    print(x, "factorial is", math.factorial(x))
    time.sleep(0.02)
    continue

def powerr(num):
  print(num, "factorial is", math.factorial(num))

def downn(num):
  for x in range(num, -1, -1):
    print(x, "factorial is", math.factorial(x))
    time.sleep(0.02)
    continue

def countult(num):
  for x in range(0, num):
    print(x, "to itself and factorialized is", math.factorial(x**x))
    time.sleep(0.1)
    continue