Created
May 27, 2011 19:58
-
-
Save SY-MEDIA/996038 to your computer and use it in GitHub Desktop.
Python for informatics - Ch.4 Functions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#------------------------------------------------------------------------------- | |
# Name: Excercise 4.1 | |
# Purpose: | |
# | |
# Author: Luc | |
# | |
# Created: 27/05/2011 | |
# Copyright: (c) Luc 2011 | |
# Licence: <your licence> | |
#------------------------------------------------------------------------------- | |
#!/usr/bin/env python | |
def main(): | |
import random | |
for i in range(10): | |
x = random.random() | |
print(x) | |
if __name__ == '__main__': | |
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
*** Remote Interpreter Reinitialized *** | |
>>> | |
0.395921218064366 | |
0.8753856007601777 | |
0.26813639957968427 | |
0.658371734211964 | |
0.9954906030052129 | |
0.45871753296178164 | |
0.25436065315882805 | |
0.01373300302912639 | |
0.5953233869921734 | |
0.5459690517409022 | |
>>> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment