User Profile

Collapse

Profile Sidebar

Collapse
David Aghan
David Aghan
Last Activity: Sep 4 '10, 03:11 AM
Joined: Aug 22 '10
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Function to take input as string, input parameter to function

    Ok, so I am almost done with this question:
    Write and test a function to take as input a list of strings (each of which
    represents a number) and to return a list of numeric values. For example, if
    the input to the function is [“67”, “8”,”75”] and return [67,8,75]. The input
    should be as a parameter to the function.


    here is the code I have written:
    Code:
    def func( num1, *numtuple):
        print num1
    ...
    See more | Go to post

  • David Aghan
    started a topic Average of numbers defined by user

    Average of numbers defined by user

    Hey,

    I'm trying to write a simple program that will give the average of numbers input by a user.
    This program has to get the user to input how many numbers as well as what the numbers are.
    I have managed to get the average done fine however having the user input how many numbers first has left me stumped.
    Any help would be greatly appreciated.
    Cheers
    See more | Go to post
No activity results to display
Show More
Working...