print("welcome to the bill calculator")
minutes = float(input("number of minutes you used: "))
data = float(input("the amount of data you used in GB: "))
print("your basic plan costs $39.99 per month")
mcost = (minutes - 450) * .45
print("you will be charged " + str(mcost) + " for the minutes you used")
print("the monthly data fee is $30.00")
dcost = (data - 3) * 10
print("you will be charged " + str(dcost) + " for the extra data you used")
total = mcost + dcost + 69.99
print("your total bill is " + str(total))
the 20 value your teacher gave may be incorrect, bc 4.2-3*10 = 12 not 20, making the total 109.89
Answer:
Encryption method security:-
- Encryption method representing each alphabetic character as an integer between 0 and 25.
- Now, apply RSA algorithm for each integer is not an efficient secure encryption method.
Explanation:
- Let consider alphabetic characters set {A, B... Z} .
- Each alphabetic character forms a set of message block values M={0,1,2...,25).
- From encryption method the corresponding cipher text block value C = {0e mod n,1e mod n, 2e mod n,..., 25e mod n}.
- Then, compute the cipher text with knowledge of Bob's public key;
- If the public key is generated, then possibility to decrypt the cipher text to plain text.
- The generated public key is easily calculated by everyone and security is lost.
- Therefore, the encryption method is not secure.
Encryption method is not secure, Most efficient attack against this method:-
- Now, compute the encryption message with the function Me mod n for all the possible values of M.
- This is the most efficient attack against the scheme in encryption method.
- Then, create a look-up table with cipher text as an index to the corresponding plain text as a value for appropriate location in the table.
Answer:
num_guesses = 3 #initialized number of guesses to 3
user_guesses = [] #declared the user_guesses array
guess = 0 #guess variable initialized to 0
print('Enter a number: ') #prompt telling the user to enter a number
while guess < num_guesses: #loop capturing input and storing into array
num = int(input())
user_guesses.append(num)
guess = guess + 1
#end of loop
print(user_guesses) #array outputted to user
Explanation:
The above program captures numbers from the user and stores into an array (user_guesses), the length of the array is determined by the value contained in the num_guesses variable, it prints the combined input as an array.
I believe the step is <span>Insertion </span>