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

The “Titans” cricket team has a winning rate of 75%. The team is planning to play 10 matches in the next season.

 

a)    Let X be the number of matches that will be won by the team. What are the possible values of X?

b)    What is the probability that the team will win exactly 6 matches?

c)    What is the probability that the team will lose 2 or less matches?

d)    What is the mean number of matches that the team will win?

e)    What are the variance and the standard deviation of the number of matches that the team will win?



Suppose you have been given the following list of tuples.

list_1 = [("a", 1), ("b", 2), ("a", 3), ("b", 1), ("a", 2), ("c", 1)]

Write a Python program that converts this list of tuples into a dictionary and then prints the

dictionary.

[You are not allowed to use set]

Hint: Think of membership operators (in and not in).

===================================================================

Output:

{'a': [1, 3, 2], 'b': [2, 1], 'c': [1]}

===================================================================


Write a python program that takes an input from the user and finds the number of times that the



input is present in a given tuple.



===================================================================



Example 1:



Given tuple: (10, 8, 5, 2, 10, 15, 10, 8, 5, 8, 8, 2)



Sample Input 1:



8



Sample Output 1:



8 appears 4 times in the tuple



===================================================================



Example 2



Given tuple: (10, 8, 5, 2, 10, 15, 10, 8, 5, 8, 8, 2)



Sample Input 2:



1



Sample Output 2:



1 appears 0 times in the tuple



===================================================================




Create a rectangle class having length and width as parameter. Write getter/setter for each parameter. Write default constructor that should initialize the default value to the length and width.. Write member functions to calculate area and another function to calculate perimeter in class. Write a function to print the information regarding rectangle which include length, width, area and parameter.


Formula to calculate area = 0.5 * length * width

Formula to calculate perimeter=2 * length+ 2 * width

a) Write an assembly program using MARIE's assembly Instruction set that prompts the user to enter a non-negative integer that is less than 10. The program should include a subroutine that keeps prompting until a valid value is obtained. When a valid number is entered, it will be displayed. (Hint: Use JNS & JUMPI instructions to implement the subroutine)

N.B: You should include the MARIE code in your Answer, with an explanation of each instruction in your code beside it. Example: Subt One /Subtract 1 from AC

b) Add a screenshot of the simulation, showing the result (A screenshot of the MARIE Simulator window after running the program). Instructions: - Use “ORG” instruction to start your program at address equivalent to 25610. - Use your last university ID number to input the value of X. For example, if your ID is1915161678234, then you will use the number 4 as the value of x. - Do not forget to change the representation of the Input and Output windows in the simulator to Decimal. 


Jaya Jusco (JJ) Sdn Bhd needs you to develop an application to calculate their customer JJ point’s reward. Define a class named Customer with the following variables declarations:


String CustName;

String CustAddress;

int pointRewards;

 

  1.  Provide a default constructor and another constructor with three parameters. The constructor with parameters will assign the three values (String CustomerName, String CustomerAddress, int point). Define a public instance method named calculatePoint()to calculate the customer rewards if the point is greater than 300 points. The formula indicates that if the point is greater than 300 points, the system will add up extra 50 points.
  2. Define another class named Testing to test the Customer class. Use the Scanner method to get the CustomerName, CustomerAddress and point values from the user. Declare class and create object Customer. Call the calculatePoint( ) method to display the current customer points reward.  

Propose an idea related to Artificial Intelligence (AI) and describe the idea with the learning outcomes of the course in detail.


Create a java program which allows the user to enter two values (Using JOptionPane) to be divided. The program catches an exception if either of the entered values is not an integer.

Declare three integers—two to be input by the user and a third to hold the result after dividing the first two. The numerator and denominator variables must be assigned starting values because their values will be entered within a try block. Also declare an input String to hold the return value of the JOptionPane showInputDialog() method.int numerator = 0, denominator = 0, result; String display;

Add a try block that prompts the user for two values, converts each entered String to an integer, and divides the values, producing result(Cast the result to a double).

Add a catch block that catches an Arithmetic Exception object if division by 0 is attempted. If this block executes, display an error message, and force result to 0.


Create a class named Invoice containing fields for an item number, name, quantity, price, and total cost. Create a constructor to pass the value of the item name, quantity, and price. Also include displayLine() method that calculates the total cost for the item (As price times quantity) then displays the item number, name, quantity price, and total cost. Save the class as Invoice.java.


Q1. Design an application for hospital management system. For this, create the following classes

and members.

Person - name, date of birth, sex

Doctor - Specialization

Patient- Casenumber, Disease, date of admission, date of discharge, bill number.

Write function to input the data from the user and display data to the user.


LATEST TUTORIALS
APPROVED BY CLIENTS