Start with 5 empty bottles. Use a random number generator to fill bottles one slot at a time with the colours while keeping 8 slots empty - there is a total of 5*4 = 20 slots - so if we will 12 slots, 8 are free for watersort puzzle
translate the binary search and insertion algorithm into a subprogram BINARY(ARRAY,LB,UB,ITEM,LOC) which finds either the location LOC where ITEAM appears in ARRAY or the location LOC where ITEAM should be inserted into Array using python
What will the Linux command, du -h -d 1 | sort -hr, produce as output.
Given a 5-D python array with shape (24x4096x2016x24x8), and each element in the array is a 8-bit unsigned integer, calculate the approximate amount of RAM such array will take if you are using them in python.
two user defined functions to receive credit for this assignment.
Applications for mobile devices (Mobile Apps) are in great demand. You have been tasked to design an
algorithm and write a C++ program to help programmers track the sales of a Mobile App. The program
must prompt the user to input the following:
Name of mobile application
Price of a Full version download
Price of a Trial version download
Number of Full version downloads
Number of Trial version downloads
Tax Rate
The program will allow the user to calculate the total net earnings based on the price and number of
download purchases, and the tax rate. Use the following equations to calculate the total net earnings:
Gross earning total
= Price of a Full version * Number of Full version downloads
+ Price of a Trial version * Number of Trial version downloads
Tax deduction = Gross earning total * Tax Rate / 100
Total Net earnings = Gross earning total - Tax deduction
The program must output the results to the screen and to an output file named "
investigations on IP address
You have a *SERVER* in one of the class rooms in UPSA. And 20 people in the school's auditorium were to have access to your services. Another 55 people in the school's hospital want to access your service.
What are the things you will put in place for those in the auditorium to get access to your server and same as the people in the hospital ?
static member function
What would be the output of the following program? Explain.
i n t main ( )
{
p i d t pid 1 ;
p r i n t f ( ‘ ‘ b e f o r e f o r k ( ) ’ ’ ) ;
i f ( ( pid 1=f o r k ()) >0)
{
w ai t pi d ( pid1 , NULL, 0 ) ;
}
e l s e i f ( pid 1 == 0 ) {
e x e c l ( ‘ ‘ / u s r / bin / bash ’ ’ , ‘ ‘ bash ’ ’ ,NULL ) ;
p r i n t f ( ‘ ‘ done l a u n c hi n g the s h e l l ’ ’ ) ;
}
e l s e {
p e r r o r ( ‘ ‘ f o r k ( ) ’ ’ ) ;
}
}
What to submit:
• Write-up describing an explanation for the output (i.e. why you observe
what you observe).
A class named “Teachers” holds information like teacher code, name, gender, year of joining. Write a program to create five hundred objects (Array of teacher objects) of teacher and enter some data into it through setters. Make getters and setters for all employee information. Then ask the user to enter current year. Display the names of those employees whose tenure is 10 or more than 10 years according to the given current year only using getters.