python to c

Anything not related to a specific project.

python to c

Postby saiidabifarraj » Mon Sep 23, 2013 9:41 pm

hi all
can any one help me with this code need to converted to c
but i have a problems
#=======================================================================
stepPerS = 5 ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
#=======================================================================
steps = range(int(stepPerS))
for i,t in enumerate(steps):
hipAngle = (hipMaxDiff/len(steps))*(i+1)
try:
anglNorm=hipAngle*(180/(hipMaxDiff))
except:
anglNorm=hipAngle*(180/(1))
hipAngle = currentHipAngle+hipAngle
self.con.servos[self.hipServoNum].setPos(deg=hipAngle)
#========================================================================

i know that
steps = range(int(stepPerS)) ======> steps=[0,1,2,3,4]
for i,t in enumerate(steps): ======> (0,0);(1,1);(2,2);(3,3);(4,4)

the problem is how to converted to c
there is no connection betwen "i" and "t"

try:
anglNorm=hipAngle*(180/(hipMaxDiff))
except:
anglNorm=hipAngle*(180/(1))

thank you in advance
saiidabifarraj
 
Posts: 7
Joined: Tue Sep 17, 2013 10:34 pm

Re: python to c

Postby aajamilkhan » Thu Jan 15, 2015 9:55 am

for i,t in enumerate(steps):
hipAngle = (hipMaxDiff/len(steps))*(i+1)
try:
Join online ccna video dumps and n10-005 to pass pmp dumps exam in first 640-461 - pass4-sure Our best quality www.ku.edu and Hood College training tutorials guide you well for Bentley University
aajamilkhan
 
Posts: 1
Joined: Thu Jan 15, 2015 9:44 am

Re: python to c

Postby dialt1 » Sat Apr 11, 2015 4:41 pm

the same problem i have... does not work for me...
dialt1
 
Posts: 3
Joined: Sat Apr 11, 2015 4:40 pm

Re: python to c

Postby Koniec12 » Tue May 26, 2015 7:18 am

I would like to know answer for that. Can anybody help?
Koniec12
 
Posts: 3
Joined: Tue May 26, 2015 7:15 am


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 4 guests