DSA/Lab_5/test.py

49 lines
1.1 KiB
Python
Raw Permalink Normal View History

2024-03-09 17:32:59 +02:00
#!/bin/python3
import random
import time
import os
#r, c = map(int, input("R c: ").split())
#arr_size = 100
arr = [random.randint(0, 100) for i in range(50)]
#a = [[ round((random.random() - 0.5) * 20, 3) for i in range(ar_size[0]) ] for j in range(ar_size[1])]
#a = [ [ round((random.random() - 0.5) * 20, 3) for i in range(round(ar_size[0] / 2)) ] * 2 for j in range(ar_size[1]) ]
#a[0][4] = 5
#a[0][7] = 5
print(len(arr))
for i in range(5, -1, -1):
print(f"Starting in {i}...")
time.sleep(1)
map(str, arr)
for i in arr:
for j in range(2):
os.system(f"xdotool type --delay 2 -- {i}")
os.system("xdotool key Return")
'''
for i in range(0, 10):
for j in range(3):
os.system(f"xdotool type --delay 2 -- {arr[i]}")
os.system("xdotool key Return")
# print(arr[i], end = " ")
for j in range(3):
os.system(f"xdotool type --delay 2 -- {arr[i+1]}")
os.system("xdotool key Return")
# print(arr[i+1], end = " ")
for j in range(3):
os.system(f"xdotool type --delay 2 -- {arr[i+2]}")
os.system("xdotool key Return")
# print("\n")'''