Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env python
- # -*- coding: utf-8 -*-
- #
- # bez nazwy.py
- #
- # Copyright 2010 Maciej Czekaj <natanielcz@gmail.com>
- import random
- from random import randint
- import os
- from os import system
- def main():
- ciag_liczb = []
- zapetlaj = True
- while zapetlaj == True:
- decyzja = raw_input('Wczytać kolejną liczbę? (T/N)')
- if decyzja == 'T' or 't':
- ciag_liczb += [randint(0,10000)]
- print 'Pomyslnie wylosowano liczby ', ciag_liczb
- elif decyzja == 'N' or 'n':
- zapetlaj = False
- break
- else:
- continue
- system('clear')
- print ciag_liczb
- return 0
- if __name__ == '__main__':
- main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement