Menu

[r45]: / trunk / test / sample / 002.py  Maximize  Restore  History

Download this file

33 lines (19 with data), 317 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#! python
# integer arith
a=4
print a
b=12+5
print b
c=b%a
print c
#! python
# trailing comma
i = 256*256
print 'The value of i is', i
#! python
# Fibonacci series:
# the sum of two elements defines the next
a, b = 0, 1
while b < 200:
print b,
a, b = b, a+b
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.