Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search & Filtering

Write a function in this file called nine_lines that uses the function three_lines (provided below) to print a total of nine lines.








Now add a function named clear_screen that uses a combination of the functions nine_lines, three_lines, and new_line (provided below) to print a total of twenty-five lines. The last line of your program should call first nine_lines and then the clear_screen function.








The function three_lines and new_line are defined below so that you can see nested function calls. Also, to make counting “blank” lines visually easier, the print command inside new_line will print a dot at the beginning of the line:








def new_line():








print('.')








def three_lines():









new_line()








new_line()









































The String_collection.txt file contains 4000 random English names (keys), write a C++ program that generates hash codes for each key using polynomial accumulation.In addition your program should perform the following tasks. consider a=37 [constant]

Write separate function for each task and call it in proper order

1. Create a hash table to store the keys based on the hash values generated

➢ Hash value: h(key)=|hash code| mod N , use appropriate value for N

➢ For collision handling use separate chaining

1.1. Write a function insert(key), and find(key) to insert and find the key in the hash table.

1.2. Write a display function that display all the keys in ascending order of hash values (line-wise) such that each line display the keys (names) having the same hash value.

1.3 Find the hash value with maximum number of collisions and display all the string associated with this hash value

2. Compare the total number of collisions for a=33, 37, 39, 41

2.1. Display the total number of collisions occurred for each case


write a C++ program that generates hash codes for each key using polynomial accumulation. In addition your program should perform the following tasks. consider a=37 [constant] 


A teacher divides her class in different group (gr) sizes according to the

activity they have to do. Write a program to determine the number (nr) of groups as well as the nr of pupils (p) who are left to form a smaller gr. They're 56 in the class.

Program structure:

• Declare 3 int variables nrPupils, nrGroups, and nrLeft. nrPupils is the

nr of ps in a class, nrGroups is the nr of grs the class is divided into, and nrLeft is the nr of ps who're in the remaining smaller gr.

• Assign the value 56 to nrPupils.

• Declare an int variable groupSize that's used by a cin statement to input a value from the keyboard and store the size of the grs the teacher requested. Display a message. E.g. Please enter the size of each gr?

• Write the statement to calculate the nr of grs of size groupSize.

• Write the statement to calculate the nr of ps who're in the remaining smaller gr.

The output of the program must be displayed as follows:

There are 9 grs consisting of 6

pupils There are 3 remaining pupils



Find a good cookbook. Read the instructions for your favourite dish. Write a program to display the recipe on the screen but with a difference. The quantity of each ingredient must be multiplied by a value entered from the keyboard. For example, if the recipe needs 2 cups of flour the output displayed will be something like this Please enter the factor to multiply the ingredients with : 4 Recipe name Ingredients // other ingredients 8 cups flour Method The program has the following structure: • Declare an int variable named mFactor to store the value with which the quantity of each ingredient must be multiplied. • The program must make use of a cin statement to input a value from the keyboard and store it in mFactor. Submit both your program and output.


Q1:DHCP has failed on the network. What do you have to configure manually to be able to use your Internet access as usual?

Q2:How many MAC are there?

Q3:On which layers does a switch work and what is its task?

Q4:Why are different types of routing protocols used within and between autonomous systems on the Internet?

Q5:What is the minimum, maximum and average latency between nodes in a ring-shaped network with equal latencies per section and data transmission in both directions in the ring?

Q6:What access control other than CSMA/CD is possible for wired networks? What are their advantages and disadvantages?


Write a program in C++ to read a number n and find out the sum of the integers from 1 to



then from 1 to 3, then 1 to 4, and so on and to display the sum of the integers from 1 to



n.



For example, from



1 to 2 = 1



1 to 3 = 3



1 to 4 = 6



1 to 5 = 10



1 to 6 = 18




Develop a small application in C++ that should allow the user of application to enter the receipt number, sender name, sender address, receiver name, receiver address, shipment fee and parcel weight. After getting required information, generate a shipment receipt and show as summary on screen.

Write a program to determine the entered character is an alphabet or number or special character using if – else-if – else.


Instruction: This program read a character value from the user and displays whether it is an alphabet or number or special character, with a suitable message.



Write a program to implement the Date class which has three data members named day, month and year.

 

1.  Provide a constructor, which takes arguments (you may set values of data members to 0).

 

2.  Write getter and setter functions (input and show functions) for the Date class.

3.  Also write a member function void CompareDates(Date d1, Date d2) which tells which date comes first.


LATEST TUTORIALS
APPROVED BY CLIENTS