Answer:
Here is my code below: username = 'Polly1220' password = 'Bob' userInput = input("What is your username?\ n") if userInput == username: a=input("Password?\ n") if a == password: print("Welcome!") else: print("That is the wrong password.") else: print("That is the wrong username.")
Answer:
A(n) <u>Cipher</u> or crypto-system is an encryption method or process encompassing the algorithm, key(s) or crypto-variable(s), and procedures used to perform encryption and decryption.
Explanation:
- Cryptography is such a technique that is used for the secure transfer of the information. We make codes for this purpose.
- Cryptosystem is such a system in cryptography is simply an encryption method that has three algorithms. One algorithm is used for the generation of key, one for encryption and decryption.
- Encryption is a process of converting the information in a data that is not understandable and decryption, this non-understandable data is converted into information so that we can read it.
Because of the reflection on the window or mirror.
<h2>
Answer:</h2>
2. input in the hash algorithm
<h2>
Explanation:</h2>
In a hash algorithm, a function called <em>hash function (say H) </em>is chosen to transform a variable sized input n, and return a fixed size string called the <em>hash value (say h). </em>i.e
H(n) => h
Comparing this to the birthday attacks;
i. the hash function is getting the people's birthdays - H,
ii. the input is each person in the group of people - n,
iii. the hash is the value of the birthday of each person - H(n).
Answer:
cents = int(input("Enter the number of cents: "))
quarters = cents // 25
cents -= quarters * 25
dimes = cents // 10
cents -= dimes * 10
nickels = cents // 5
cents -= nickels * 5
pennies = cents % 5
print("quarters: " + str(quarters) + ", dimes: " + str(dimes) + ", nickels: " + str(nickels) + ", pennies: " + str(pennies))
print("In total " + str(quarters + dimes + nickels + pennies) + " coins needed.")
Explanation:
*The code is in Python.
Ask the user to enter the number of cents
Calculate the number of quarters, dimes, nickels, and pennies in the given amount. Print each of them and the total amount of coins
Note that floor division, //, is used to get the corresponding coin values. For example, if the entered value is 51,
quarters = 51 // 25 = 2 (returns the lower integer, if the result is not an integer)