THE ANNIN ROBOTICS FORUM HAS MOVED TO A NEW COMMUNITY. 👉
Count Python code?
 
Notifications
Clear all

Count Python code?

2 Posts
2 Users
0 Reactions
48 Views
Avatar of ttrobotics
(@ttrobotics)
Trusted Member
Joined: 2 months ago
Posts: 44
Topic starter  

count = 0 # başlangıç değeri 0 olarak ayarlanır

 

while True: # sonsuz döngüye girer

# robotun yapması gereken işlemler burada yer alır

# örneğin, bir nesneyi taşıması gerekiyorsa:

# move_object()

 

count += 1 # her işlem yapıldığında sayacı bir artırır

print("Yapılan işlem sayısı:", count) # sayacı ekrana yazdırır.

Hello Chris, @Chris Annin

Where should I paste the code written above so that the robot counts the operation. Is it difficult for the robot to count the repetitive operation?



   
Quote
Chris Annin
(@chris-annin)
Member Admin
Joined: 2 months ago
Posts: 535
 

Hello, here is the tutorial on programing - counting registers:



   
ReplyQuote
Share:
Upload your Photo