repl.it
@JoshuaS3/

logic testing

Python

No description

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
print("Started")
while True:
	stick_y = float(input())
	stick_x = float(input())

	#setting un-biased velocity
	leftv = stick_y
	rightv = stick_y

	#adding turn bias
	if stick_x < -0.1:
		leftv += -stick_x

	if stick_x > 0.1:
		rightv = -stick_x

	#setting velocities
	print(leftv,"left")
	print(rightv,"right")
Fetching token
?