Python Forum
Calling a Returned Value to Another Function
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Calling a Returned Value to Another Function
#5
I have to follow some steps ( mandatory ) to complete this task.


get_environment_variable_value()
  • The header for this function must be
    get_environment_variable_value(variable_name)

  • This function must accept a shell variable as its only parameter

  • The function must return the value of this shell variable

  • If the variable is not defined, the function must return the empty string
get_dirs_from_path()
  • The header for this function must be
    get_dirs_from_path()

  • This function must accept no parameters

  • This function returns a list of the directories contained in PATH
get_file_count()
  • The header for this function must be
    get_file_count(dir_path)

  • This function must accept a directory name as a parameter

  • The function must return the number of files in this directory

  • Sub-directories must not be included in this count
and the test code has to look like this :
path_dirs = get_dirs_from_path()
dir_count = get_file_count_for_dir_list(path_dirs)
print_sorted_dictionary(dir_count)
Reply


Messages In This Thread
RE: Calling a Returned Value to Another Function - by valerydolce - Mar-10-2017, 03:49 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Sorting Data Returned From Database Timbo03 9 2,382 Feb-19-2023, 02:12 PM
Last Post: Larz60+
  Calling a function from another function johneven 2 2,997 Jul-09-2019, 12:42 AM
Last Post: micseydel
  Calling function-- how to call simply return value, not whole process juliabrushett 2 3,318 Jul-01-2018, 01:17 AM
Last Post: juliabrushett
  Calling a function to return a list of percentages Liquid_Ocelot 7 6,530 Mar-25-2017, 01:20 PM
Last Post: Larz60+

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020