subject
Engineering, 13.11.2019 00:31 queenkimm26

(1) input the password
(2) convert letters from the character array to numbers using the double()function and subtract 32.
(3) add up all the numbers in the array using the sum()function.
(4) convert back to a number between 0 and 94 by using the mod() function to divide by 95 and keep the remainder.
(5) convert back to a characters by adding 32 and using the char() function.

write a simple password checker that asks a user to input a password, hashes that password using the algorithm above, and compares to the hashed password 'w'.the code should then print out if the password was "correct" or not. run your code with the correct password "hello", the incorrect password "goodbye", and the password "! ".(make sure there’s five exclamation points).

ansver
Answers: 2

Another question on Engineering

question
Engineering, 04.07.2019 18:10
An air conditioning system consist of a 5 cm diameter pipe, operating at a pressure of 200 kpa. the air initially enters the pipe at 15°c with a velocity of 20 m/s and relative humidity of 80%. if the heat supply throughout the process is 960 w, determine the relative humidity and the temperature at the outlet
Answers: 3
question
Engineering, 04.07.2019 19:10
Plan an experiment to measure the surface tension of a liquid similar to water. if necessary, review the ncfmf video surface tension for ideas. which method would be most suitable for use in an undergraduate laboratory? what experimental precision could be expected?
Answers: 2
question
Engineering, 04.07.2019 19:20
At steady state, air at 200 kpa, 325 k, and mass flow rate of 0.5 kg/s enters an insulated duct having differing inlet and exit cross-sectional areas. the inlet cross-sectional area is 6 cm2. at the duct exit, the pressure of the air is 100 kpa and the velocity is 250 m/s. neglecting potential energy effects and modeling air as an 1.008 kj/kg k, determine ideal gas with constant cp = (a) the velocity of the air at the inlet, in m/s. (b) the temperature of the air at the exit, in k. (c) the exit cross-sectional area, in cm2
Answers: 2
question
Engineering, 04.07.2019 19:20
Determine (a) the maximum thermal efficiency of reversible power cycles operating between a hot reservoir at 1000°c and a cold reservoir at 200°c and (b) the maximum cops for reversible refrigeration and heat pump cycies, respectively, between 28°c and 14°c.
Answers: 1
You know the right answer?
(1) input the password
(2) convert letters from the character array to numbers using the doubl...
Questions
question
Mathematics, 29.01.2021 08:50
Questions on the website: 13722359