repl.it
@AlexanderHall4/

util class

Python

No description

fork
loading
Files
  • main.py
  • h.ARS
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
import statistics
import time
class util:
  class tree:
    def w(a, b):
      c = open(a, "w+")
      c.write(b)
      c.close()
    def a(a, b):
      c = open(a, "a+")
      c.write(b)
      c.close()
    def r(a):
      c = open(a, "r")
      return c.read()
      c.close()
  class math:
    def meanmedian(a):
      b = statistics.mean(a)
      c = statistics.median(a)
      return {"Mean":b, "Median":c}
  def tprint(a,b):
    for i in range(len(a)):
      print(a[i], end="", flush=True)
      time.sleep(b)
    print(" ")
util.tree.w("h.ARS","")
?