Answer:
import java.util.Scanner;
public class ss11{
public static void main (String[]args) {
Scanner keyboard = new Scanner (System.in)
String a1, a2, a3, a4, a5;
int i1, i2, i3, i4, i5;
System.out.println("Enter a four bit binary number:");
a1= keyboard.next();
a2= a1.substring(0,1);
a3= a1.substring(1,2);
a4= a1.substring(2,3);
a5= a1.substring(3,4);
i1 = Integer.parseInt(a2);
i2 = Integer.parseInt(a3);
i3 = Integer.parseInt(a4);
i4 = Integer.parseInt(a5);
i1= i1 * 8;
i2= i1 * 4;
i3= i1 * 2;
i4= i1 * 1;
i5= i1+i2+i3+i4;
System.out.println("The converted decimal number is: +i5);
}
}
Explanation:
Implement the simulation of a biased 6-sided die which takes the values 1,2,3,4,5,6 with probabilities 1/8,1/12,1/8,1/12,1/12,1/
hjlf
Answer:
see explaination
Explanation:
import numpy as np
import matplotlib.pyplot as plt
a = [1, 2, 3, 4, 5, 6]
prob = [1.0/8.0, 1.0/12.0, 1.0/8.0, 1.0/12.0, 1.0/12.0, 1.0/2.0]
smls = 1000000
rolls = list(np.random.choice(a, smls, p=prob))
counts = [rolls.count(i) for i in a]
prob_exper = [float(counts[i])/1000000.0 for i in range(6)]
print("\nProbabilities from experiment : \n\n", prob_exper, end = "\n\n")
plt.hist(rolls)
plt.title("Histogram with counts")
plt.show()
check attachment output and histogram
Answer:
Going green has several other benefits for companies. These include tax credits and incentives, improved efficiency, healthier workplaces, and cost savings – for instance by printing less, turning lights off in unused rooms and refilling ink cartridges. Reusing items also reduces waste from plastic packaging.
Explanation:
Answer:
At entry level of any job, the reading that is essential to know is "<u>User manual</u>" Reading.
Explanation:
In any company or the firm in which some one wants to start at entry level, He needs to know about different rules, components, machines and systems of the company. To fulfill this purpose he needs to read some documents related to operations and functionalities of above mentioned parameters.
<em>These documents are called User Manuals. It contains all necessary information related to the system that will be helpful for the user. In this document step by step process are mentioned to handle the machine or device that is very helpful for entry level employ.</em>
Answer:
"A set is an unordered collection. A dictionary is an unordered collection of data that stores data in key-value pairs."
Explanation:
Set =>
Collection of non-repetitive elements.
Unordered
Unindexed
No way to change items.
Dictionary =>
Collection of key-value pairs.
Unordered
Indexed
Mutable