Programming does not always happen smoothly, sometimes a lot of patience, devotion and perseverance are required to solve programming problems and stumbling blocks on your way of creating a new programming solution.While developing an application you might come across a number of programming questions the answers to which are not easy to be found. To spare yourself the trouble, submit your programming questions here and you will get programming answers within the shortest time period.
Ask Your question
Search & Filtering
Python Programming Homework Help!!
Write a program that ask the user to imput the followings: number of shares, stock prices, and broker commission.
Here are the details of the purchase: number of shares that jim purchased was 1000, he paid 32.92 per share, selling price is 33.92, he paid stock broker commission 2% of the amount he recieved for stocks.
Display the following paid for stock,
the amount jim paid for the stock, commssion paid to broker when he bought the stock, the amount the stock was sold for, commission paid to broker for selling the stock, amount jim was left when he sold the stock and paid his broker (both times). if this amount is positive, jim makes a profit, if negative, then he lost money.
Program is used to help a man studying CS in college to maintain his study session - given this information that he do his college HWs based on:
1) time when he got the HW
2) priority (so, assume he needs to do task A before doing B, B before C, and A before C)
Given A B C ... Z as Course A, Course B, and so on.
First line is describing NumberofCourse and NumberofPriority he has.
The output is a list of assignments he needs to do based on the problem.
Ex:
INPUT
7 7
A
B
C
D
E
F
G
A B
B A
C D
A E
E F
A G
C E
OUTPUT
A B E G C F D
Stuck in using vector, iterator and all of those stuffs. Help would really be appreciated. Thanks.
how do you do ns digrams
what does Modify_it()do?
#include
#include
#include
#include
#include
typedef int int32;
typedef char int8;
void change_it(int8 *output, int8 *input_1, const int8 *input_2, int32 length)
{
int32 i = 0;
for(i=0; i
output[i] = (int8)(input_1[i] ^ input_2[i]);
}
return;
}
void itoa( int32 num, int8 *alpha, int32 radix )
{
if( radix == 10 )
{
sprintf(alpha, "%i", num);
}
else if( radix == 16 )
{
sprintf(alpha, "%X", num);
}
}
int8 *modify_it(int32 modifier, const int8 *input_1, int32 length)
{
int8 leading[3];
int32 i_leading;
int8 * temp_string = NULL;
int8 * ret;
int32 i = 0;
itoa(modifier/2, leading, 10);
i_leading = atoi(leading);
temp_string = (int8 *) malloc(8);
ret = (int8 *) malloc(length);
memset(temp_string, 0, 8);
temp_string[0] = 0;
if( (modifier+1)%2 == 0 ) {
temp_string[0] = (int8)((i_leading<<4) + 8);
}
else {
temp_string[0] = (int8)(i_leading<<4);
}
for(i=0; i<(length>>3); i++)
{
change_it(ret+i*8, temp_string, input_1+i*8, 8);
}
free(temp_string);
return ret;
}
int main(int argc, char **argv) {
int8 data[32];
memset(data, 0x0A, sizeof(data));
int8 *resp = modify_it(0xFF, data, sizeof(data));
free(resp);
return 0;
}
PLEASE HELP ME WITH MY ASSIGNMENT
CREATE THE FOLLOWING BARCODE USING LOOP AND TWO FUNCTION SUBSTRAND MOD CHECKER THIS IS THE:
ttp://www.gs1.org/barcodes/support/check_digit_calculator,
How to make link between crc generator code and error-detecting code so that it can run smoothly?
For reference, my crc generator code is-
% The program generates CRC code for any given input message stream &
% generator polynomial
%msg=[1 1 1 0 0 0 1 1 ]
msg=input('Input Message sequence :');
%poly=[1 1 0 0 1 1]
poly=input('Input Generator Polynomial :');
[M N]=size(poly);
mseg=[msg zeros(1,N-1)];
[q r]=deconv(mseg,poly);
r=abs(r);
for i=1:length(r)
a=r(i);
if ( mod(a,2)== 0 )
r(i)=0;
else
r(i)=1;
end
end
crc=r(length(msg)+1:end)
frame = bitor(mseg,r)
I having 2 tables client and group. Between them many to many HABTM relationship exist, which i already define using simple join table.
I having a problem with the Active record query interface . I have to write code for adding client to group and whenever i select any group display all the clients related to this group.
Write a program in MATLAB using either function or input statement to test the hypothesis for
one mean vector including the confidence interval calculation using simultaneous T2
intervals and
Bonferroni. You can use any data in the text book in order to make sure that your output is correct.
**Notes:
For using function or input statement, only three parameters that need to be entered
by users which are the data, hypothesize value and level of significance.
Please explore and include the following command in your program, size and fprintf.
For input statement, your output MUST look like this:
Enter data matrix: bankloan
Enter hypothesized values in vector 1xn: [7 50 9]
Enter level of significant: 0.05
The test statistics is : 146.16
The critical value is : 7.86
The decision is to reject null hypothesis
The simultaneous confidence interval is: ( 7.91, 9.22)
The simultaneous confidence interval is: ( 42.97, 50.38)
The simultaneous confidence interval is: ( 9.53, 10.82)
The Bonferroni confidence interval is: ( 8.01, 8.33)
The Bonferroni confidence interval is: ( 43.50, 45.35)
The Bonferroni confidence interval is: ( 9.62, 9.94)
For function statement, your output MUST look like this:
MV1f(bankloan, [7 50 9], 0.05)
The test statistics is : 146.16
The critical value is : 7.86
The decision is to reject null hypothesis
The simultaneous confidence interval is: ( 7.91, 9.22)
The simultaneous confidence interval is: ( 42.97, 50.38)
The simultaneous confidence interval is: ( 9.53, 10.82)
The Bonferroni confidence interval is: ( 8.01, 8.33)
The Bonferroni confidence interval is: ( 43.50, 45.35)
The Bonferroni confidence interval is: ( 9.62, 9.94)
1. What does the function modify_it() do?
2. What are any issues or problems that you see with it?
3. How could you improve the function, and what benefits would your improvements bring?
4. What other additional improvements could you make to the rest of the code?
#include
#include
#include
#include
#include
typedef int int32;
typedef char int8;
void change_it(int8 *output, int8 *input_1, const int8 *input_2, int32 length)
{
int32 i = 0;
for(i=0; i
output[i] = (int8)(input_1[i] ^ input_2[i]);
}
return;
}
void itoa( int32 num, int8 *alpha, int32 radix )
{
if( radix == 10 )
{
sprintf(alpha, "%i", num);
}
else if( radix == 16 )
{
sprintf(alpha, "%X", num);
}
}
int8 *modify_it(int32 modifier, const int8 *input_1, int32 length)
{
int8 leading[3];
int32 i_leading;
int8 * temp_string = NULL;
int8 * ret;
int32 i = 0;
itoa(modifier/2, leading, 10);
i_leading = atoi(leading);
temp_string = (int8 *) malloc(8);
ret = (int8 *) malloc(length);
memset(temp_string, 0, 8);
temp_string[0] = 0;
if( (modifier+1)%2 == 0 ) {
temp_string[0] = (int8)((i_leading<<4) + 8);
}
else {
temp_string[0] = (int8)(i_leading<<4);
}
for(i=0; i<(length>>3); i++)
{
change_it(ret+i*8, temp_string, input_1+i*8, 8);
}
Lcal variables are variables that are shared ?








