The hexademical number system uses base 16 with digits 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F. Hexadecimal is often used in computer systems programming. Write a Python program, in a file called convertHex.py, to request a decimal number from the user and output the hexadecimal value. To compute the hexadecimal value we have to find the hexadecimal digits hn, hn-1, hn-2, ..., h2, h1, and h0, such that
d = hn x 16n + hn-1 x 16n-1 + hn-2 x 16n-2 + ... + h2 x 162 + h1 x 161 + h0 x 160
These hexadecimal digits can be found by successively dividing d by 16 until the quotient is 0; the remainders are h0, h1, ..., hn-1, hn.
For example, if d=589:
So 589 in decimal is 24D in hexadecimal.
Your program should include the following functions:
Sample output:
Enter decimal value: 589 589 is equal to 24D in hexadecimal
In: Computer Science
On Apollo Moon missions, the lunar module would blast off from the Moon's surface and dock with the command module in lunar orbit. After docking, the lunar module would be jettisoned and allowed to crash back onto the lunar surface. Seismometers placed on the Moon's surface by the astronauts would then pick up the resulting seismic waves.
Find the impact speed of the lunar module, given that it is jettisoned from an orbit 170 km above the lunar surface moving with a speed of 1550 m/s
Thanks!
In: Physics
WEEK 3 DISCUSSION# 4
ANSWER THE FOLLOWING :
1: Fully explain how to use one of the threat modeling tools
2: What are the benefits or issues with Microsoft’s Threat Modeling process and tool?
In: Computer Science
Patrick Ntini holds 500 shares in Aloes Processing Co. The firm has 50 000 shares outstanding and R100 000 earnings available to common shareholders. Shares are currently selling at R25 per share. The firm decides to retain earnings and rather issue a 10% share dividend.
Based on the above, answer the following questions:
1.1 Determine the current EPS value. (3)
1.2 What proportion of the firm does Patrick currently hold? (3)
1.3 What proportion of the firm will Patrick hold after the share dividend? (4)
1.4 At what market price should the stock sell after the share dividend? (5) 1.5 Discuss how Patrick is affected by the share dividend (5)
In: Accounting
Consider the titration of a 38.0mL sample of 0.170M HBr with 0.205M KOH. Determine each of the following:
Part A: the initial pH
Part B: the volume of added base required to reach the equivalence point
Part C: the pH at 11.0mL of added base
Part D: the pH at the equivalence point
Part E: the pH after adding 5.0 mL of base beyond the equivalence point
In: Chemistry
C++Design and implement a program (name it LinearBinarySearch) to implement and test the linear and binary search algorithm discussed in the lecture slides. Define method LinearSearch() to implement linear search of an array of integers. Modify the algorithm implementation to count number of comparisons it takes to find a target value (if exist) in the array. Define method BinarySearch() to implement binary search of an array of integers. Modify the algorithm implementation to count number of comparisons it takes to find a target value (if exist) in the array. Now, develop a test method to read integer values from the user in to an array and then call methods LinearSearch() and BinarySearch() and printout the number of comparison took to find the target values using each search method. Document your code and organized your outputs as follows: Arrays Values: Target value: Linear Search Comparisons: Binary Search Comparisons:
In: Computer Science
(1) What is the needle of a compass attracted to?
(2) What is the difference between ferromagnetic and magnetic?
(3) In terms of electrons, what causes permanent magnetism?
(4) What is the technique in making synthetic magnets?
In: Physics
Part 1: evolutionary speaking with respect to life-history traits of longevity and reproductive, what do bats, seals, and tsetse flies have in common (what factors have favored the evolution of long life)?
part 2: what are 3 life-history traits of mayflies that are required for their very short adult lives?
In: Biology
Exercises for Probability
Exercise 2-17
Evertight, a leading manufacturer of quality nails, produces 1-, 2-, 3-, 4-, and 5-inch nails for various uses. In the production process, if there is an over- run or the nails are slightly defective, they are placed in a common bin. Yesterday, 651 of the 1-inch nails, 243 of the 2-inch nails, 41 of the 3-inch nails, 451 of the 4-inch nails, and 333 of the 5-inch nails were placed in the bin.
Exercise 2-18
Last year, at Northern Manufacturing Company, 200 people had colds during the year. One hundred fifty- five people who did no exercising had colds, and the remainder of the people with colds were involved in a weekly exercise program. Half of the 1,000 employees were involved in some type of exercise.
Exercise 2-27
In a sample of 1,000 representing a survey from the entire population, 650 people were from Laketown, and the rest of the people were from River City. Out of the sample, 19 people had some form of cancer. Thirteen of these people were from Laketown.
Exercise 1
An engineering company advertises a job in three papers, A, B and C. It is known that these papers attract undergraduate engineering readerships in the proportions 2:3:1. The probabilities that an engineering undergraduate sees and replies to the job advertisement in these papers are 0.002, 0.001 and 0.005 respectively. Assume that the undergraduate sees only one job advertisement.
Exercise 2-33
Gary Schwartz is the top salesman for his company. Records indicate that he makes a sale on 70% of his sales calls. If he calls on four potential clients, what is the probability that he makes exactly 3 sales? What is the probability that he makes exactly 4 sales?
Exercise 2
A special five football matches series will be played between UAE and KSA. The probability that UAE will win a match against KSA is 0.6.
(i). What is the probability that UAE will win at least 3 matches in the series?
(ii). What is the probability that UAE will lose all the matches of the series?
(iii). What is the probability that UAE will win at most 2 matches in the series?
Exercise 2-34
Trowbridge Manufacturing produces cases for personal computers and other electronic equipment. The quality control inspector for this company believes that a particular process is out of control. Normally, only 5% of all cases are deemed defective due to discolorations. If 6 such cases are sampled, what is the probability that there will be 0 defective cases if the process is operating correctly? What is the probability that there will be exactly 1 defective case?
Exercise 2-34
If 10% of all disk drives produced on an assembly line are defective, what is the probability that there will be exactly one defect in a random sample of 5 of these? What is the probability that there will be no defects in a random sample of 5?
Exercise 2-38
Steve Goodman, production foreman for the Florida Gold Fruit Company, estimates that the average sale of oranges is 4,700 and the standard deviation is 500 oranges. Sales follow a normal distribution.
(a) What is the probability that sales will be greater than 5,500 oranges?
(b) What is the probability that sales will be greater than 4,500 oranges?
(c) What is the probability that sales will be less than 4,900 oranges?
(d) What is the probability that sales will be less than 4,300 oranges?
Exercise 2-41
The time to complete a construction project is normally distributed with a mean of 60 weeks and a standard deviation of 4 weeks.
(a) What is the probability the project will be finished in 62 weeks or less?
(b) What is the probability the project will be finished in 66 weeks or less?
(c) What is the probability the project will take longer than 65 weeks?
Exercise 2-42
A new integrated computer system is to be installed worldwide for a major corporation. Bids on this project are being solicited, and the contract will be awarded to one of the bidders. As a part of the proposal for this project, bidders must specify how long the project will take. There will be a significant penalty for finishing late. One potential contractor determines that the average time to complete a project of this type is 40 weeks with a standard deviation of 5 weeks. The time required to complete this project is assumed to be normally distributed.
Exercise 2-43
Patients arrive at the emergency room of Costa Valley Hospital at an average of 5 per day. The demand for emergency room treatment at Costa Valley follows a Poisson distribution.
(a) Using Appendix C, compute the probability of exactly 0, 1, 2, 3, 4, and 5 arrivals per day.
(b) What is the sum of these probabilities, and why is the number less than 1?
Exercise 2-44
Using the data in Problem 2-43, determine the probability of more than 3 visits for emergency room service on any given day.
In: Math
A uranium and iron atom reside a distance R = 58.70 nm apart. The uranium atom is singly ionized; the iron atom is doubly ionized. Calculate the distance r from the uranium atom necessary for an electron to reside in equilibrium. Ignore the insignificant gravitational attraction between the particles.
What is the magnitude of the force on the electron from the uranium ion?
In: Physics
In winter a lake has a 0.30m thick ice layer over 1.20m of water. A light beam from above strikes a spot on the ice, making a 29? angle with the normal.
Part A
How far horizontally from that spot does the light ray strike the lake bottom?
In: Physics
Would it be useful to have an encryption that is additive and multiplicative in Homomorphic?
In: Computer Science
A small solid sphere of mass M0, of radius R0, and of uniform density ρ0 is placed in a large bowl containing water. It floats and the level of the water in the dish is L. Given the information below, determine the possible effects on the water level L, (R-Rises, F-Falls, U-Unchanged), when that sphere is replaced by a new solid sphere of uniform density.
The new sphere has radius R > R0 and density ρ < ρ0
The new sphere has radius R = R0 and mass M < M0
The new sphere has mass M < M0 and density ρ = ρ0
The new sphere has density ρ = ρ0 and mass M > M0
The new sphere has mass M = M0 and density ρ > ρ0
The new sphere has mass M = M0 and density ρ < ρ0
In: Physics
Blood type AB is found in only 3% of the population.† If 330 people are chosen at random, find the probability of the following. (Use the normal approximation. Round your answers to four decimal places.)
(a) 5 or more will have this blood type
(b) between 5 and 10 will have this blood type
In: Math
The following information is to be used for the next two questions. Molar absorptivity data for the cobalt and nickel complexes with 2,3-quinoxalinedithiol are εCo = 36400 and εNi = 5520 at 510 nm and εCo = 1240 and ε Ni = 17500 at 656 nm. A 0.514-g sample was dissolved and diluted to 100.0 mL. A 25.0-mL aliquot was treated to eliminate interferences; after addition of 2,3-quinoxalinedithiol, the volume was adjusted to 50.0 mL. This solution had an absorbance of 1.246 at 510 nm and 0.367 at 656 nm in a 1.00-cm cell.
1. Calculate the concentration of cobalt (in ppm) in the initial solution prepared by dissolving the sample.
2. Calculate the concentration of nickel (in ppm) in the initial solution prepared by dissolving the sample.
In: Chemistry