Simple Dice Game
Develop a Python application that will simulate a simple dice game by rolling two dice for the player as his bet followed by another roll of the two dice for the computer.
The mechanics is as follows:
1. If after the roll of the two dice, resulted to same number then the sum will be doubled.
2. If the value of each dice is different, then just get the sum of the values of each dice.
Who gets the highest value wins the game.
Provide a discursive discussion o n secondary victimisation within the Criminal Justice System (CJS) and explain how victims can be supported and empowered through victim support models. Use relevant examples.
Frequency of Numbers
Develop a Python application that will randomly select n integers from 1 to 9 and will count the number of occurrence of the numbers without using the Counter from collections library.
Sample Output:
How many numbers?: 7
[2, 6, 8, 2, 1, 1,6]
2-2
2-6
1-8
2-1
p: It is below freezing.
q: It is snowing.
Express each of these propositions in complete English sentences.
a) p ∧ q
b) p ∧ ¬q
c) ¬p ∧ ¬q
d) q ∨ p
e) p → q
f) q ∧ ¬p
g) q → p
2. Solve the following.
a) Construct a truth table.
¬p ∧ ( p ↔ ¬q )
b) Construct a truth table.
p → ( q ∧ r )
c) Construct a truth table.
( p → q ) ∨ ( ¬p ↔ r )
d) Find out if the following is a tautology, contradiction, or contingency
( p ∨ q ) ∧ ( ¬p ∧ ¬q )
e) Find out if the following propositions have logical equivalence.
( p ↔ q ) ≡ ( p → q ) ∧ ( q → p )
Jepoy has one 100-peso bill, two 200-peso bills, and five 500-peso bills in his wallet. He wants to randomly pick one bill. Let X be the random variable of choosing one bill from his wallet.
Questions:
1. Construct the probability distribution table of X. [2 points]
2. Compute for the mean of X, denoted as E(X). [2 points]
3. Interpret the mean of X. [1 point]
4. Compute for the variance of X, denoted as V(X). [5 points]
5. Compute for the standard deviation of X, denoted as SD(X). [2 points]
Interpret the standard deviation of X. [1 point
A bus initially with a speed of 25 m/s slows down with an acceleration of -3 m/s2. How far does it travel before coming to a complete stop?
How much work is needed to decreases the distance between a +15 µC charge
and a -20 µC charge from 1 m to 0.25 m?
There is an old adage that says "There is no such thing as a free lunch". This adage relates most closely with which of the following basic economic concepts?
Hawkeye pulls a quiver attached to his bow back 61 cm by exerting a force that increases uniformly with distance from 0 to 257 N. How much work does Hawkeye do on the string?
1. With the world returning to normalcy post the pandemic, as an HR hiring manager you have the task of forecasting the demand for the next year to make sure you hire the right number and right kind of people. Explain the techniques of HR demand forecasting that you will employ in depth