The stupidest question ever seen in this newsgroup...

Cezar Ionescu ionescu at pik-potsdam.de
Thu Aug 19 02:53:58 EDT 1999


The program is supposed to factor y, so you have to provide it with a
value for y. Just write a line that initializes y, e.g.
> 
> #!/usr/bin/python
> 

y = 24

> x = y / 2
> while x > 1:
>     if y % x == 0:
>          print y, 'has factor', x
>          break
>     x = x - 1
> else:
>      print y, 'is prime'
> 

Good luck,
Cezar.




More information about the Python-list mailing list