[Tutor] question about a exercise
waynejwerner at gmail.com
Thu Jan 5 16:28:58 CET 2012
On Thu, Jan 5, 2012 at 9:22 AM, daedae11 <daedae11 at 126.com> wrote:
> The exercise is:
> Write a function which has 3 parameters. First parameter is a char, second
> parameter is a integer, third parameter is a integer.
> The function would create a file which have following requests:
> 1. the length of the file is in accordance with the third parameter.
> 2. the content of the file must be random generated.
> 3. the time first parameter occurred in the content must be in accordance
> with second parameter.
> please give me some hints. It would be better if you give me the code.
It would be better if /you/ gave us the code that shows what you've tried.
Also, if we give you the solution(s) then you won't learn.
To accomplish this exercise you need a few skills:
1. Write a function that takes parameters - can you do this?
2. Create a file - can you do this?
3. Generate random text - can you do this?
4. Modify text (or generate slightly less-random text) - can you do this?
If you can do those four things then you should be able to easily
accomplish this task (that looks an awful lot like homework)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Tutor