Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download

Práctica_1

30 views
#1----------------- print 25//4 print 25%4 #2----------------- t=walltime() n=25//4 walltime(t) t=walltime() n=25%4 walltime(t) #3----------------- a=25 b=4 w=walltime() q = 0 r = abs(a) r = r - b q = q + 1 while r >= b: r = r - b q = q + 1 if (a < 0) & (r > 0): r = b - r q = -(q + 1) walltime(w) print "Cociente: ",q," Resto: ",r
6 1 0.00026106834411621094 0.0002110004425048828 0.0008680820465087891 Cociente: 6 Resto: 1