#(a) Write a program that asks the user the same single, simple, random math problem until they get it right. (1A, 1C)
#(b) Add the option for the user to specify how many problems they want to answer. (1A)
#(c) Don't do a fixed number of questions. Instead, ask the user at the end of each question sequence (i.e., when they finally get it right) if they want to continue. (1C)
#(d) Keep track of the user's attempts and the total number of questions, and then report their score (i.e., "you took X tries to answer Y questions correctly") (1A)
#(e) Set a maximum number of tries for each question. When the user makes their last guess, tell them the answer and move on. (1A)
#(a) Write a program that asks the user the same single, simple, random math problem until they get it right. (1A, 1C)
#(b) Add the option for the user to specify how many problems they want to answer. (1A)
#(c) Don't do a fixed number of questions. Instead, ask the user at the end of each question sequence (i.e., when they finally get it right) if they want to continue. (1C)
#(d) Keep track of the user's attempts and the total number of questions, and then report their score (i.e., "you took X tries to answer Y questions correctly") (1A)
#(e) Set a maximum number of tries for each question. When the user makes their last guess, tell them the answer and move on. (1A)
1. Write a float function rectangle() that computes and returns the area of a rectangle using its two float formal parameters h and w, where h is the height and w is the width of the rectangle.
2. Write a function called isEven() that uses the remainder operator(%) to determine whether an integer is even or not.
3. Write a program with function name "ourmemeber" that displays your group members name and Id No correctly. Give example with random names and id.
A multinational company opens multiple branches all over that Pakistan. If you are hired to design the networking from the company, what type of network you will select? What type of network topology will be suitable for the linking different branches or different department inside the single company branch? List down the network equipment you may require during this implementation.
a) Implement the following equation
x4 sin(45x) + x3 cos(25 x) + x2 tan(30 x) + 12x-1 + cos(108 x2 )
Where value of x will be 5.
#(a) Write a program that keeps asking the user for their name until they enter "Tim". Otherwise, keep saying "You are not Tim!" and ask for their name.
#(b) Allow your name as a valid input as well.
#(c) Keep track of how many times the user fails to enter the correct name, and report it when they finally get it right. (2K, 2C)
Suppose a business person launches new cinema at Islamabad and ask his team to develop a ticket system for box office. He assigns some requirements about system that how should it work. The requirements are such a way that there are only '5' number of box office windows in the theatre. Each window can have at max '20' number of people waiting in line. To start with, only one window is opened. If the number of people waiting in line in that window exceeds 20, then the next window is opened and people can join the line in that window. Likewise, if both the first and second windows have n number of people waiting in each queue, then a third window is opened. This can go on until the maximum number of windows w is reached. Let us assume that once a window is opened it never closes. A new window is only opened if all open windows are full. Each person can buy only one ticket. So, the system should not allot more than one ticket per person. Let us assume that the system issues one ticket each across all open windows. When a ticket is issued, the count of the number of people in each open queue is reduced by 1.
When a new person has to join the queue, the system has to prompt him to join a queue such that they are issued a ticket as fast as possible. The system prompts the person based on these factors: o First it looks for an open window with the least number of people and prompts that window number. If more than one window has the least number of people, then the system can prompt the person to join the first window (smaller window ld) it encounters with the least number of people. If the queues of all open windows are full and a new window can be opened, then the new person is prompted to join the new queue for the new box office window. O If all queues for all windows are full, a corresponding message is displayed. That person need not be considered in the next iteration .After a queue is prompted to a person, the person or system cannot change the queue.
Implement the system based on above scenario in java using suitable data structure.
Write a Conversion program for a Shopkeeper selling following thing. First ask the user for the quantity of fruit to buy, such as 3 apples and 2 oranges.
Make a mark sheet of a student who is enrolled in five subjects. Marks of each subject should be defined by the user. The Output should contain the percentage obtained in each subject, Total marks obtained, Total Marks and percentage attained by the student.
A multinational company opens multiple branches all over that Pakistan. If you are hired to design the networking from the company, what type of network you will select? What type of network topology will be suitable for the linking different branches or different department inside the single company branch? List down the network equipment you may require during this implementation.