Hello,
I think the question i have is fairly straightforward , but I can't seem to
replicate the old SAS frequency procedure when I try to accomplish this in
MS Access.
anyway, i have about 10 questions on a survey that have a possible response
range from 0-4.
what I would like to do is simply show that for each question we had x
amount of responses in each category, which amount to x percentage of all
responses:
so if we have the following responses to 5 surveys for question 1
1
2
2
3
4
the frequency distribution would look like:
1 1 20%
2 2 40%
3 1 20%
4 1 20%
I can get this (or at least the frequency) for one question by using a query
and selecting the field twice, then using groupby in the first column and
count in the second column. But if I try to do this for the next field in
the next 2 columns it screws everything up.
can someone help me?
thanks,
Tim Brooks 11 4386
Hi Tim,
I took this on as a challenge ... I like to do that occasionally as an
opportunity to learn. :)
Here's what I came up with, although I'm sure that someone will have a
better idea.
It's generally not a good idea to store calculated values, so I think the
correct method to accomplish this task might be to use a crosstab query
(which I suck at.)
My plan calls for 3 tables.
tblQuestions holds your 10 questions.
tblResponses holds the 100 responses to each of those questions. (one to
many join)
tblResults stores the counts the responses, and the percentage calculations
I did enter 10 questions into tblQuestions, but was too lazy to enter 100
random responses, so I made up some code to do that for me.
After I had the response data, I wrote some more code to write the
calculated data to tblResults.
My code runs from two command buttons on an unbound form, and the results
are displayed in a datasheet-style subform called "sbfResults ", which is
based on tblResults.
Hopefully the above will help you to understand how this code works:
*************** *************** *************** ***************
Option Compare Database
Option Explicit
Private Sub cmdRandomRespon se_Click()
'We have 10 questions, and want 100 random responses to each question
Dim MyDB As DAO.Database
Set MyDB = CurrentDb
Dim rstQ As DAO.Recordset
Dim rstR As DAO.Recordset
Set rstQ = MyDB.OpenRecord set("tblQuestio ns", dbOpenTable)
Set rstR = MyDB.OpenRecord set("tblRespons es", dbOpenDynaset)
Dim i As Integer
Dim MyQ As Long
Dim MyR As Long
With rstQ
.MoveLast
.MoveFirst
Do Until .EOF 'Here are the 10 Questions
MyQ = !QNbr 'Both tables have a QNbr field (long integer --- 1 to
many)
With rstR
For i = 0 To 99 'Here is where the 100 random responses are
created
.AddNew
!QNbr = MyQ
'Int((upperboun d - lowerbound + 1) * Rnd + lowerbound)
!Response = Int((4 - 0 + 1) * Rnd + 0)
.Update
Next i
End With
.MoveNext
Loop
.Close
End With
rstR.Close
Set rstR = Nothing
Set rstQ = Nothing
Set MyDB = Nothing
End Sub
*************** *************** *************** ***************
Private Sub cmdTabulateResu lts_Click()
'Now we have 10 questions, 100 responses to each question, and want to
tabulate the results
Dim MyDB As DAO.Database
Set MyDB = CurrentDb
Dim rstQ As DAO.Recordset
Dim rstResults As DAO.Recordset
Set rstQ = MyDB.OpenRecord set("tblQuestio ns", dbOpenTable)
Set rstResults = MyDB.OpenRecord set("tblResults ", dbOpenDynaset)
Dim i As Integer
Dim MyQ As Long
Dim MyR As Long
Dim MyCountQ As Long
Dim MyCountR As Long
Dim MyPcnt
Dim MyMin
Dim MyMax
'Clear out the results table. The code below re-populates it with current
results.
MyDB.Execute "DELETE tblResults.* FROM tblResults;", dbFailOnError
With rstQ
.MoveLast
.MoveFirst
Do Until .EOF 'Here are the Questions ... Loop thru them one at a time.
MyQ = !QNbr
With rstResults
'There should be 4 possible responses to each question, but who
knows for sure? This checks.
MyMin = DMin("Response" , "tblRespons es", "([QNbr] = " & MyQ &
")")
MyMax = DMax("Response" , "tblRespons es", "([QNbr] = " & MyQ &
")")
For i = MyMin To MyMax
.AddNew
!QuestionNumber = MyQ
!Response = i
MyCountQ = DCount("QNbr", "tblRespons es", "([QNbr] = " & MyQ
& ")")
MyCountR = DCount("Respons e", "tblRespons es", "([QNbr] = " &
MyQ & ") And ([Response] = " & i & ")")
MyPcnt = (MyCountR / MyCountQ)
!ResponsePercen t = MyPcnt
!ResponseCount = MyCountR
.Update
Next i
End With
.MoveNext
Loop
.Close
End With
Set rstResults = Nothing
Set rstQ = Nothing
Set MyDB = Nothing
Me.Refresh 'I have a subform based on tblResults, so that I can immediately
display the results
End Sub
*************** *************** *************** ***************
--
HTH,
Don
=============== ==============
Use My*****@Telus.N et for e-mail
Disclaimer:
Professional PartsPerson
Amateur Database Programmer {:o)
I'm an Access97 user, so all posted code
samples are also Access97- based
unless otherwise noted.
Do Until SinksIn = True
File/Save, <slam fingers in desk drawer>
Loop
=============== =============== ==
"NC Tim" <tb************ **@mindspring.c om> wrote in message
news:u2******** **********@news read2.news.atl. earthlink.net.. . Hello, I think the question i have is fairly straightforward , but I can't seem to replicate the old SAS frequency procedure when I try to accomplish this in MS Access.
anyway, i have about 10 questions on a survey that have a possible
response range from 0-4.
what I would like to do is simply show that for each question we had x amount of responses in each category, which amount to x percentage of all responses:
so if we have the following responses to 5 surveys for question 1 1 2 2 3 4
the frequency distribution would look like: 1 1 20% 2 2 40% 3 1 20% 4 1 20%
I can get this (or at least the frequency) for one question by using a
query and selecting the field twice, then using groupby in the first column and count in the second column. But if I try to do this for the next field in the next 2 columns it screws everything up.
can someone help me? thanks, Tim Brooks
Don,
My wife is considering a small survey at work, and is looking for options;
if possible, I would certainly appreciate an example of your database to
pass along to her.
Cheers,
Dave (db*****@ns.sym patico.ca)
(Please Zip file, or change extension, i.e. mydatabase.txt)
"Don Leverton" <le************ ****@telusplane t.net> wrote in message
news:36Agc.4938 2$aD.12596@edtn ps89... Hi Tim,
I took this on as a challenge ... I like to do that occasionally as an opportunity to learn. :)
Here's what I came up with, .......>
Don,
My wife is considering a small survey at work, and is looking for options;
if possible, I would certainly appreciate an example of your database to
pass along to her.
Cheers,
Dave (db*****@ns.sym patico.ca)
(Please Zip file, or change extension, i.e. mydatabase.txt)
"Don Leverton" <le************ ****@telusplane t.net> wrote in message
news:36Agc.4938 2$aD.12596@edtn ps89... Hi Tim,
I took this on as a challenge ... I like to do that occasionally as an opportunity to learn. :)
Here's what I came up with, .......>
thanks for an elegant response...
"Don Leverton" <le************ ****@telusplane t.net> wrote in message
news:36Agc.4938 2$aD.12596@edtn ps89... Hi Tim,
I took this on as a challenge ... I like to do that occasionally as an opportunity to learn. :)
Here's what I came up with, although I'm sure that someone will have a better idea. It's generally not a good idea to store calculated values, so I think the correct method to accomplish this task might be to use a crosstab query (which I suck at.)
My plan calls for 3 tables. tblQuestions holds your 10 questions. tblResponses holds the 100 responses to each of those questions. (one to many join) tblResults stores the counts the responses, and the percentage
calculations I did enter 10 questions into tblQuestions, but was too lazy to enter 100 random responses, so I made up some code to do that for me. After I had the response data, I wrote some more code to write the calculated data to tblResults.
My code runs from two command buttons on an unbound form, and the results are displayed in a datasheet-style subform called "sbfResults ", which is based on tblResults.
Hopefully the above will help you to understand how this code works: *************** *************** *************** *************** Option Compare Database Option Explicit
Private Sub cmdRandomRespon se_Click() 'We have 10 questions, and want 100 random responses to each question
Dim MyDB As DAO.Database Set MyDB = CurrentDb
Dim rstQ As DAO.Recordset Dim rstR As DAO.Recordset
Set rstQ = MyDB.OpenRecord set("tblQuestio ns", dbOpenTable) Set rstR = MyDB.OpenRecord set("tblRespons es", dbOpenDynaset)
Dim i As Integer Dim MyQ As Long Dim MyR As Long
With rstQ .MoveLast .MoveFirst Do Until .EOF 'Here are the 10 Questions MyQ = !QNbr 'Both tables have a QNbr field (long integer --- 1 to many) With rstR For i = 0 To 99 'Here is where the 100 random responses are created .AddNew !QNbr = MyQ 'Int((upperboun d - lowerbound + 1) * Rnd + lowerbound) !Response = Int((4 - 0 + 1) * Rnd + 0) .Update Next i End With .MoveNext Loop
.Close End With
rstR.Close
Set rstR = Nothing Set rstQ = Nothing Set MyDB = Nothing End Sub *************** *************** *************** *************** Private Sub cmdTabulateResu lts_Click()
'Now we have 10 questions, 100 responses to each question, and want to tabulate the results Dim MyDB As DAO.Database Set MyDB = CurrentDb
Dim rstQ As DAO.Recordset Dim rstResults As DAO.Recordset
Set rstQ = MyDB.OpenRecord set("tblQuestio ns", dbOpenTable) Set rstResults = MyDB.OpenRecord set("tblResults ", dbOpenDynaset)
Dim i As Integer Dim MyQ As Long Dim MyR As Long
Dim MyCountQ As Long Dim MyCountR As Long Dim MyPcnt
Dim MyMin Dim MyMax
'Clear out the results table. The code below re-populates it with current results. MyDB.Execute "DELETE tblResults.* FROM tblResults;", dbFailOnError
With rstQ .MoveLast .MoveFirst Do Until .EOF 'Here are the Questions ... Loop thru them one at a
time. MyQ = !QNbr With rstResults 'There should be 4 possible responses to each question, but
who knows for sure? This checks. MyMin = DMin("Response" , "tblRespons es", "([QNbr] = " & MyQ & ")") MyMax = DMax("Response" , "tblRespons es", "([QNbr] = " & MyQ & ")")
For i = MyMin To MyMax .AddNew !QuestionNumber = MyQ !Response = i MyCountQ = DCount("QNbr", "tblRespons es", "([QNbr] = " &
MyQ & ")") MyCountR = DCount("Respons e", "tblRespons es", "([QNbr] = "
& MyQ & ") And ([Response] = " & i & ")")
MyPcnt = (MyCountR / MyCountQ) !ResponsePercen t = MyPcnt !ResponseCount = MyCountR .Update Next i End With .MoveNext Loop
.Close End With
Set rstResults = Nothing Set rstQ = Nothing Set MyDB = Nothing
Me.Refresh 'I have a subform based on tblResults, so that I can
immediately display the results
End Sub *************** *************** *************** *************** -- HTH, Don =============== ============== Use My*****@Telus.N et for e-mail Disclaimer: Professional PartsPerson Amateur Database Programmer {:o)
I'm an Access97 user, so all posted code samples are also Access97- based unless otherwise noted.
Do Until SinksIn = True File/Save, <slam fingers in desk drawer> Loop
=============== =============== ==
"NC Tim" <tb************ **@mindspring.c om> wrote in message news:u2******** **********@news read2.news.atl. earthlink.net.. . Hello, I think the question i have is fairly straightforward , but I can't seem
to replicate the old SAS frequency procedure when I try to accomplish this
in MS Access.
anyway, i have about 10 questions on a survey that have a possible response range from 0-4.
what I would like to do is simply show that for each question we had x amount of responses in each category, which amount to x percentage of
all responses:
so if we have the following responses to 5 surveys for question 1 1 2 2 3 4
the frequency distribution would look like: 1 1 20% 2 2 40% 3 1 20% 4 1 20%
I can get this (or at least the frequency) for one question by using a query and selecting the field twice, then using groupby in the first column
and count in the second column. But if I try to do this for the next field
in the next 2 columns it screws everything up.
can someone help me? thanks, Tim Brooks
thanks for an elegant response...
"Don Leverton" <le************ ****@telusplane t.net> wrote in message
news:36Agc.4938 2$aD.12596@edtn ps89... Hi Tim,
I took this on as a challenge ... I like to do that occasionally as an opportunity to learn. :)
Here's what I came up with, although I'm sure that someone will have a better idea. It's generally not a good idea to store calculated values, so I think the correct method to accomplish this task might be to use a crosstab query (which I suck at.)
My plan calls for 3 tables. tblQuestions holds your 10 questions. tblResponses holds the 100 responses to each of those questions. (one to many join) tblResults stores the counts the responses, and the percentage
calculations I did enter 10 questions into tblQuestions, but was too lazy to enter 100 random responses, so I made up some code to do that for me. After I had the response data, I wrote some more code to write the calculated data to tblResults.
My code runs from two command buttons on an unbound form, and the results are displayed in a datasheet-style subform called "sbfResults ", which is based on tblResults.
Hopefully the above will help you to understand how this code works: *************** *************** *************** *************** Option Compare Database Option Explicit
Private Sub cmdRandomRespon se_Click() 'We have 10 questions, and want 100 random responses to each question
Dim MyDB As DAO.Database Set MyDB = CurrentDb
Dim rstQ As DAO.Recordset Dim rstR As DAO.Recordset
Set rstQ = MyDB.OpenRecord set("tblQuestio ns", dbOpenTable) Set rstR = MyDB.OpenRecord set("tblRespons es", dbOpenDynaset)
Dim i As Integer Dim MyQ As Long Dim MyR As Long
With rstQ .MoveLast .MoveFirst Do Until .EOF 'Here are the 10 Questions MyQ = !QNbr 'Both tables have a QNbr field (long integer --- 1 to many) With rstR For i = 0 To 99 'Here is where the 100 random responses are created .AddNew !QNbr = MyQ 'Int((upperboun d - lowerbound + 1) * Rnd + lowerbound) !Response = Int((4 - 0 + 1) * Rnd + 0) .Update Next i End With .MoveNext Loop
.Close End With
rstR.Close
Set rstR = Nothing Set rstQ = Nothing Set MyDB = Nothing End Sub *************** *************** *************** *************** Private Sub cmdTabulateResu lts_Click()
'Now we have 10 questions, 100 responses to each question, and want to tabulate the results Dim MyDB As DAO.Database Set MyDB = CurrentDb
Dim rstQ As DAO.Recordset Dim rstResults As DAO.Recordset
Set rstQ = MyDB.OpenRecord set("tblQuestio ns", dbOpenTable) Set rstResults = MyDB.OpenRecord set("tblResults ", dbOpenDynaset)
Dim i As Integer Dim MyQ As Long Dim MyR As Long
Dim MyCountQ As Long Dim MyCountR As Long Dim MyPcnt
Dim MyMin Dim MyMax
'Clear out the results table. The code below re-populates it with current results. MyDB.Execute "DELETE tblResults.* FROM tblResults;", dbFailOnError
With rstQ .MoveLast .MoveFirst Do Until .EOF 'Here are the Questions ... Loop thru them one at a
time. MyQ = !QNbr With rstResults 'There should be 4 possible responses to each question, but
who knows for sure? This checks. MyMin = DMin("Response" , "tblRespons es", "([QNbr] = " & MyQ & ")") MyMax = DMax("Response" , "tblRespons es", "([QNbr] = " & MyQ & ")")
For i = MyMin To MyMax .AddNew !QuestionNumber = MyQ !Response = i MyCountQ = DCount("QNbr", "tblRespons es", "([QNbr] = " &
MyQ & ")") MyCountR = DCount("Respons e", "tblRespons es", "([QNbr] = "
& MyQ & ") And ([Response] = " & i & ")")
MyPcnt = (MyCountR / MyCountQ) !ResponsePercen t = MyPcnt !ResponseCount = MyCountR .Update Next i End With .MoveNext Loop
.Close End With
Set rstResults = Nothing Set rstQ = Nothing Set MyDB = Nothing
Me.Refresh 'I have a subform based on tblResults, so that I can
immediately display the results
End Sub *************** *************** *************** *************** -- HTH, Don =============== ============== Use My*****@Telus.N et for e-mail Disclaimer: Professional PartsPerson Amateur Database Programmer {:o)
I'm an Access97 user, so all posted code samples are also Access97- based unless otherwise noted.
Do Until SinksIn = True File/Save, <slam fingers in desk drawer> Loop
=============== =============== ==
"NC Tim" <tb************ **@mindspring.c om> wrote in message news:u2******** **********@news read2.news.atl. earthlink.net.. . Hello, I think the question i have is fairly straightforward , but I can't seem
to replicate the old SAS frequency procedure when I try to accomplish this
in MS Access.
anyway, i have about 10 questions on a survey that have a possible response range from 0-4.
what I would like to do is simply show that for each question we had x amount of responses in each category, which amount to x percentage of
all responses:
so if we have the following responses to 5 surveys for question 1 1 2 2 3 4
the frequency distribution would look like: 1 1 20% 2 2 40% 3 1 20% 4 1 20%
I can get this (or at least the frequency) for one question by using a query and selecting the field twice, then using groupby in the first column
and count in the second column. But if I try to do this for the next field
in the next 2 columns it screws everything up.
can someone help me? thanks, Tim Brooks
I made a table, tblResponses, containing the fields to hold the data,
2 queries to calculate the frequencies and a third query to present
the data in the form: QNumber, Response, ResponseFrequen cy,
ResponsePercent .
tblResponses:
ResponsesRID (an autonumber field as primary key)
ResponsesQNumbe r (the question number)
ResponsesRespon seNumber (1-4 I guess)
qryResponseFreq uency:
(counts frequency of each response to each question)
SELECT tblResponses.Re sponsesQNumber,
tblResponses.Re sponsesResponse Number,
Count(tblRespon ses.ResponsesQN umber) AS ResponseFrequen cy
FROM tblResponses
GROUP BY tblResponses.Re sponsesQNumber,
tblResponses.Re sponsesResponse Number, tblResponses.Re sponsesQNumber;
qryTotalRespons eFrequency:
(counts total number of all responses to each question)
SELECT tblResponses.Re sponsesQNumber,
tblResponses.Re sponsesResponse Number,
Count(tblRespon ses.ResponsesQN umber) AS ResponseFrequen cy
FROM tblResponses
GROUP BY tblResponses.Re sponsesQNumber,
tblResponses.Re sponsesResponse Number;
qryPercentages:
(uses the previous 2 queries to give you the Percentages you wanted)
SELECT qryResponseFreq uency.Responses QNumber AS QNumber,
qryResponseFreq uency.Responses ResponseNumber AS Response,
qryResponseFreq uency.ResponseF requency,
qryResponseFreq uency.ResponseF requency/qryTotalRespons eFrequency.Tota lResponseFreque ncy*100
AS ResponsePercent
FROM qryTotalRespons eFrequency INNER JOIN qryResponseFreq uency ON
qryTotalRespons eFrequency.Resp onsesQNumber =
qryResponseFreq uency.Responses QNumber;
I made a table, tblResponses, containing the fields to hold the data,
2 queries to calculate the frequencies and a third query to present
the data in the form: QNumber, Response, ResponseFrequen cy,
ResponsePercent .
tblResponses:
ResponsesRID (an autonumber field as primary key)
ResponsesQNumbe r (the question number)
ResponsesRespon seNumber (1-4 I guess)
qryResponseFreq uency:
(counts frequency of each response to each question)
SELECT tblResponses.Re sponsesQNumber,
tblResponses.Re sponsesResponse Number,
Count(tblRespon ses.ResponsesQN umber) AS ResponseFrequen cy
FROM tblResponses
GROUP BY tblResponses.Re sponsesQNumber,
tblResponses.Re sponsesResponse Number, tblResponses.Re sponsesQNumber;
qryTotalRespons eFrequency:
(counts total number of all responses to each question)
SELECT tblResponses.Re sponsesQNumber,
tblResponses.Re sponsesResponse Number,
Count(tblRespon ses.ResponsesQN umber) AS ResponseFrequen cy
FROM tblResponses
GROUP BY tblResponses.Re sponsesQNumber,
tblResponses.Re sponsesResponse Number;
qryPercentages:
(uses the previous 2 queries to give you the Percentages you wanted)
SELECT qryResponseFreq uency.Responses QNumber AS QNumber,
qryResponseFreq uency.Responses ResponseNumber AS Response,
qryResponseFreq uency.ResponseF requency,
qryResponseFreq uency.ResponseF requency/qryTotalRespons eFrequency.Tota lResponseFreque ncy*100
AS ResponsePercent
FROM qryTotalRespons eFrequency INNER JOIN qryResponseFreq uency ON
qryTotalRespons eFrequency.Resp onsesQNumber =
qryResponseFreq uency.Responses QNumber;
I have done some reports for a series of questions in a survey with
similar answer choices. Basically, you have to treat each question
and its set of answers separately and then join them back together
later.
The GROUP BY Field1, Count(Field1) is fine, but when you introduce
additional fields, then the GROUP BY must account for them. I sometimes
think of the GROUP BY as working similar to a SELECT DISTINCT.
SAM
"NC Tim" <tb************ **@mindspring.c om> wrote in message news:<u2******* ***********@new sread2.news.atl .earthlink.net> ... Hello, I think the question i have is fairly straightforward , but I can't seem to replicate the old SAS frequency procedure when I try to accomplish this in MS Access.
anyway, i have about 10 questions on a survey that have a possible response range from 0-4.
what I would like to do is simply show that for each question we had x amount of responses in each category, which amount to x percentage of all responses:
so if we have the following responses to 5 surveys for question 1 1 2 2 3 4
the frequency distribution would look like: 1 1 20% 2 2 40% 3 1 20% 4 1 20%
I can get this (or at least the frequency) for one question by using a query and selecting the field twice, then using groupby in the first column and count in the second column. But if I try to do this for the next field in the next 2 columns it screws everything up.
can someone help me? thanks, Tim Brooks
I have done some reports for a series of questions in a survey with
similar answer choices. Basically, you have to treat each question
and its set of answers separately and then join them back together
later.
The GROUP BY Field1, Count(Field1) is fine, but when you introduce
additional fields, then the GROUP BY must account for them. I sometimes
think of the GROUP BY as working similar to a SELECT DISTINCT.
SAM
"NC Tim" <tb************ **@mindspring.c om> wrote in message news:<u2******* ***********@new sread2.news.atl .earthlink.net> ... Hello, I think the question i have is fairly straightforward , but I can't seem to replicate the old SAS frequency procedure when I try to accomplish this in MS Access.
anyway, i have about 10 questions on a survey that have a possible response range from 0-4.
what I would like to do is simply show that for each question we had x amount of responses in each category, which amount to x percentage of all responses:
so if we have the following responses to 5 surveys for question 1 1 2 2 3 4
the frequency distribution would look like: 1 1 20% 2 2 40% 3 1 20% 4 1 20%
I can get this (or at least the frequency) for one question by using a query and selecting the field twice, then using groupby in the first column and count in the second column. But if I try to do this for the next field in the next 2 columns it screws everything up.
can someone help me? thanks, Tim Brooks This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Michael Peuser |
last post by:
Hi,
I should like to make a distribution (using Tkinter), with standard DLLs
removed.
pythonXX.dll is no problem.
tcl und tk, which make the mass of mega bytes, cannot be removed because
_tkinter.pyd seems to expect them in the same directory
(Question 1) Is there a configration or path setting in py2exe/distutils I
|
by: NC Tim |
last post by:
Hello,
I think the question i have is fairly straightforward, but I can't seem to
replicate the old SAS frequency procedure when I try to accomplish this in
MS Access.
anyway, i have about 10 questions on a survey that have a possible response
range from 0-4.
what I would like to do is simply show that for each question we had x
amount of responses in each category, which amount to x percentage of all
|
by: RFJ |
last post by:
I've got a list of annual turnovers for about fifty companies and I want to
summarise them by bands. A simple version would be : eg:
Annual_Turnover Count
Up to 5million 5
5 to 10 million 37
10 to 20 million 8
As a relative beginner in Access (XP) this is stretching me. Can SKS point
me in the right direction.
|
by: jason_box |
last post by:
I'm alittle new at C and I'm trying to write a simple program that will
record the frequency of words and just print it out. It is suppose to
take stdin and I heard it's only a few lines but I'm not sure where to
start.
The only example I have to work with is if you ran the program say:
File list contains:
This is a test.
|
by: COBRA |
last post by:
HI..could anyone help me out on this question?
Consider the marks scored by students of a programming module. Allow the user to enter the number of students. The user shall then enter the marks for each student. Thus if there are 10 students, the user will enter 10 marks.
The program must calculate
(i) the frequency for each mark
(ii) the interval which exists between identical marks
for e.g
46 37 28 87 76 83 76 38...
| |
by: Harryrun |
last post by:
Hello am a beginner in programming and I came to a problem with a question in which I need to calculate the frequency of appearance of marks.
I have used an array to store the marks but can only find the frequency of the first mark.Complication come along as I try for the others.
|
by: Udhay |
last post by:
How to get the frequency of an audio file and how to separate the low
and high frequency of an audio file
|
by: Slickuser |
last post by:
I want to play a note in C# .NET giving a frequency like the one show
below.
Is it possible?
C 261.6
C# 277.2
D 293.7
D# 311.1
E 329.6
|
by: Alex |
last post by:
Hi everybody,
I wonder if it is possible in python to produce random numbers
according to a user defined distribution?
Unfortunately the random module does not contain the distribution I
need :-(
Many thanks
axel
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |