Python Exercise Example 75
Problem:Relax and work on a simple problem.
Program analysis:None.
Example
#!/usr/bin/python
# -*- coding: UTF-8 -*-
if __name__ == '__main__':
for i in range(5):
n = 0
if i != 1: n += 1
if i == 3: n += 1
if i == 4: n += 1
if i != 4: n += 1
if n == 3: print 64 + i
The output of the above example is:
67Other Extensions
Python 100 Examples