http://adishatz.1s.fr/~gnumdk/test.py
Pourquoi le rectangle rouge n'est pas arrondi au quatres coins, pourquoi seulement le coin supérieur gauche :( ?
Forum Programmation.python locale
12
déc.
2010
def fonction(x):
if x>0:
return x
else:
return None
resultat = [fonction(x)+1 for x in xrange(-5,5)]
def run(self, command):
out = []
self.child.sendline(command)
ret = self.child.expect(self.prompt)
if ret == 0:
for line in re.split('\n', self.child.before):
re.sub('\s*$', '', line)
out.append(line)
out.pop(0)
out.pop(len(out) - 1)
return out
for a in xrange(2,10000): sa=1 for d in xrange(2,a-2): if a%d==0: sa+=d b,sb=sa,1 for d in xrange(2,b-2): if b%d==0: sb+=d if sb==a and a<b: print a,bVersion javascript
for(a=2;a<=20000;a++) { sa=1; for(d=2;d<=a-2;d++) {if (a%d==0) sa=sa+d} b=sa ; sb=1; for(d=2;d<=b-2;d++) {if (b%d==0) sb=sb+d} if (sb==a && a<=b) {if(!confirm(a+" et "+b+" sont amicaux")) return}; }(…)
try: d = time.strptime(s[:18], "%Y:%m:%d %H:%M:%S") except : try: d = time.strptime(s[:16], "%Y:%m:%d %H:%M") except : try: d = time.strptime(s[:16], "%Y:%m:%d:%H:%M") except: try: (…)
python3.1 setup.py install File "setup.py", line 182 print "--- using Tcl/Tk (…)
DOCUMENT ... ORIENTATION="0" PASPECT="1" WIDTH="1" POLYR="0" SHOWLINK="1" MINWORDLEN="3" UnderlinePos="-1" ... COMMENTS="Modèle de page pour les fiches techniques éditées sous Linux." AutoSaveTime="600000" POLYS="0" GuideRad="10.0006" rulerMode="1" TITLE="Fiche technique" KEYWORDS="FT, Fiche, Technique, Fiche technique, MGD" TabWidth="36" DSIZE="12" AUTOSPALTEN="1" PAGESIZE="A4" ...
def gotoxy(x,y):
print('\x1b['+str(y)+';'+str(x)+'H')
#print('\033['+str(y)+';'+str(x)+'H')
def horizontal(x, y, largeur, car):
debut=0
while (debut
gotoxy(x+debut,y)
print(car)
debut=debut+1
gotoxy(20,20)
print("hello")
horizontal(15,6,8,'*')
void gotoxy(int x,int y)
{
printf("\x1b[%d;%dH",y,x);
}
void horizontal(int x, int y, int largeur, int car)
{
int debut=0;
while (debut
{
gotoxy(x+debut,y);
printf("%c",car);
debut=debut+1;
}
}
int main()
{
gotoxy(20,20);
printf("hello");
horizontal(15,6,8,'*');
return 0;
}