python
Overview
In this assignment, you will be given ZERO instruction in HOW to accomplish it! The
actual requirements are very simple to satisfy. This is a test of how well you can
research the topic and satisfy the conditions of this Assignment on your own. This is
how much of the real world works - you'll be thrown into situations that are full of
unknowns, and you'll need to come up with a solution!
You are becoming a computer scientist, not a technician: you will learn how to handle
ANY language thrown at you, not just the ones you are spoon-fed, by learning good
research habits and techniques. The more problems you encounter and solve, the
greater problem set you'll be able to infer solutions to from your background of
knowledge.
This is by far the easiest assignment in this course - worth the least points, with the
most time to accomplish it. You will use what you've learned here in later courses at
OSU.
Specifications
For this assignment, you will create a script in the Python language. In particular, this
one:
http://www.python.org/ (Links to an external site.)
All execution, compiling, and testing of this script should ONLY be done in the bash
prompt on the eos-class.engr.oregonstate.edu server.
Your script must satisfy the following requirements:
1. Be contained in one single file, called mypython.py.
2. When executed, create 3 files in the same directory as your script, each named
differently, which remain there after your script finishes executing. Each of
these 3 files must contain exactly 10 random characters from the lowercase
alphabet, with no spaces ("hoehdgwkdq", for example).
3. When executed, print out on screen the contents of the 3 files it is creating.
4. When executed, after the file contents have been printed, print out two random
integers (whose range is from 1 to 42), and print out the product of the two
numbers.
You do not have to parse and read the data back in from the files created in step 2 in
order to complete step 3. For step 3, just dump the contents that you already randomly
generated in your program directly onto the screen, if that's the easiest way for you.
Note that the visual format for all of this is completely up to you! The graders will
simply be checking for the above requirements to assign your grade. Further, no help
on this assignment will be provided by the Instructor or TAs at any time.
Python is NOT a topic that will be covered on the Final!
What to submit
Please submit simply your script.
- Overview
- Specifications