473,383 Members | 1,795 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

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
Aug 23 '10 #1
1 1452
bvdet
2,851 Expert Mod 2GB
How did you get the numbers? Why can't you get the number of numbers using a similar method? raw_input() (input() for Python 3.x) should work fine for this purpose.
Aug 23 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: arabub | last post by:
I have an installation of Apache that apparently includes PHP (out of the box Redhat 9.0). If I make database calls to Postgresql, as what user is that call going to be made? The user that...
7
by: Steve Jorgensen | last post by:
Here is some code to generate code for raising and getting information about custom errors in an application. Executing the GenerateXyzErrDefs procedure generates the code. <tblXyzError>...
3
by: Stewart Allen | last post by:
Hi there I'm trying to find part serial numbers between 2 numbers. The user selects a part number from a combo box and then enters a range of serial numbers into 2 text boxes and the resulting...
1
by: philipl | last post by:
hi, I have a pluggin whiich throw an exception of the following user defined exception: public class SpellCheckException : ApplicationException { public SpellCheckException(string msg) :...
3
by: C++Geek | last post by:
I need to get this program to average the salaries. What am I doing wrong? //Program to read in employee data and calculate the average salaries of the emplyees.
0
by: Siv | last post by:
Hi, This is driving me nuts, I have created a custom print preview dialog, I have a toolbar at the top of the window that allows the user to select a page setup dialog and a printer dialog. All...
0
by: tony | last post by:
Hello! For some month ago I created a project using template Window Control Library. From this template I created a user control(DLL) that I have in the toolbox and can drag it into a window...
4
by: someone124 | last post by:
Hi, everyone. I'm trying to find the lowest and the highest numbers that a user has had punched in. The code includes a user punching in 4 different numbers, each on a different line. I need help...
0
jsos20
by: jsos20 | last post by:
start_form("get"); #will start the form print "What's the User name? ",textfield(-name=>'Username',-value=>'user'), #will get the user name p, #this gives a new paragraph ...
4
by: s207044707 | last post by:
HI I need to create a programm that stores 10 users, and three numbers for each user, and calculate average for each user based on the three numbers entered e.g. if user 1 entered 6, 8 ,10, then...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.