#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2013
    Posts
    3
    Rep Power
    0

    Smile Trouble creating a program


    I am trying to create and draw up some flowcharts for a program and I am struggling immensely.

    This problem creates a list containing names. The list of names will be printed, sorted, printed again in the new sorted order, written to a new output file, and searched.

    I have done a program similar in the sense of importing information from a txt. document but I need to have 4 sub functions working and sending back to my main function. I cannot come up with a basic skeleton to work from for this...could anyone help please?
  2. #2
  3. Contributing User
    Devshed Demi-God (4500 - 4999 posts)

    Join Date
    Aug 2011
    Posts
    4,892
    Rep Power
    481
    Code:
       ────────────────   
     /                  \ 
    (        start       )
     \                  / 
       ────────┬───────
    ┌──────────┴─────────┐
    │                    │
    │    read names      │
    │                    │
    └──────────┬─────────┘
    ┌──────────┴─────────┐
    │                    │
    │     make list      │
    │                    │
    └──────────┬─────────┘
    ┌──────────┴─────────┐
    │                    │
    │     sort list      │
    │                    │
    └──────────┬─────────┘
    ┌──────────┴─────────┐
    │                    │
    │    print list      │
    │                    │
    └──────────┬─────────┘
    ┌──────────┴─────────┐
    │                    │
    │     save list      │
    │                    │
    └──────────┬─────────┘
    ┌──────────┴─────────┐ 	 ┌────────────────────┐
    │                    │ 	 │                    │
    │     get input      │<	─┤        report      │
    │                    │ 	 │                    │
    └──────────┬─────────┘ 	 └──────────┬─────────┘
               ^                        ^
             /   \        	 ┌──────────┴─────────┐
           /       \   no 	 │                    │
         <   done?   >──────>│       search       │
           \       /      	 │                    │
             \   / 	      	 └────────────────────┘
    	   V 
               │yes
               │
       ────────┴───────   
     /                  \ 
    (         end        )
     \                  / 
       ────────────────
    [code]Code tags[/code] are essential for python code and Makefiles!
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2013
    Posts
    3
    Rep Power
    0
    Thanks!

    Would this be for the main function? and the names I have are in a .txt file that I will be pulling info from into my program.
  6. #4
  7. Contributing User
    Devshed Demi-God (4500 - 4999 posts)

    Join Date
    Aug 2011
    Posts
    4,892
    Rep Power
    481
    uh, sure.
    You could insert a block between start and "read names" that is "get filename".
    [code]Code tags[/code] are essential for python code and Makefiles!
  8. #5
  9. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2013
    Posts
    3
    Rep Power
    0
    Well the way I have to write the program is with a main function which the 4 subfunctions return information. I also need a flowchart for each subfunction. I think this will help alot though, thanks again. I think im just overthinking this one.

IMN logo majestic logo threadwatch logo seochat tools logo