this will help I am trying to take input for an exponent function but it doesn't give an output. , Range expects integer type, not float. code :
range(10)
#range(1,10)
range(10.0)
#TypeError: 'float' object cannot be interpreted as an integer
def exp_func(base,exponent):
result = 1
for index in range(0,exponent):
result*=base
return result
base = float(input("Enter base:"))
exponent = int(input("Enter exponent:"))
print(exp_func(base,exponent))
def exp_func(base,exponent):
return base ** exponent
Share :

Extract modulus n, private exponent and public exponent in Python cryptography library
By : Héctor G.
Date : March 29 2020, 07:55 AM
I wish this help you I am using Python cryptography library and I need to encrypt something with RSA. It all works great, except one thing. , You can access using public_numbers() and private_numbers() code :
public_key.public_numbers()
private_key.private_numbers()
In [13]: [a for a in dir(public_key) if not a.startswith("_")]
Out[13]: ['encrypt', 'key_size', 'public_bytes', 'public_numbers', 'verifier']
In [14]: [a for a in dir(private_key) if not a.startswith("_")]
Out[14]:
['decrypt',
'key_size',
'private_bytes',
'private_numbers',
'public_key',
'signer']
In [15]: [a for a in dir(private_key.private_numbers()) if not a.startswith("_")]
Out[15]: ['d', 'dmp1', 'dmq1', 'iqmp', 'p', 'private_key', 'public_numbers', 'q']
In [16]: [a for a in dir(public_key.public_numbers()) if not a.startswith("_")]
Out[16]: ['e', 'n', 'public_key']
In [17]: [a for a in dir(private_key.private_numbers().public_numbers) if not a.startswith("_")]
Out[17]: ['e', 'n', 'public_key']

Using arrays to do basic calculations with negative exponent
By : SteveB
Date : March 29 2020, 07:55 AM
wish helps you I'm trying to write a function which outputs the correct result when multiplying a number by a negative power of ten using arrays and split() method. For example the following expressions get the right result: 1x10^2 = 0.01 1x10^4 = 0.0001. , The problem is where you push the decimal point . instead of

Why does `math.ldexp` raise OverflowError for exponent>1024, but not for exponent<1073?
By : Ferenc Papp
Date : March 29 2020, 07:55 AM
To fix this issue IEEE floating point arithmetic is known to have some degree of imprecision. 0.0 is a value which is very close to math.ldexp(0.5, 1074). However, there is no valid way of expressing a value that is close to math.ldexp(0.5, 1025), so I would assume that's why it raises an Exception.

java:39: cannot find symbol symbol : method exponent(double,int) else { return base * exponent(base, exponent  1);}
By : Joey Lin
Date : March 29 2020, 07:55 AM
this will help , Instead of

How to store modulus, public exponent and private exponent securely on Android?
By : Chethan Kumar Adiman
Date : March 29 2020, 07:55 AM

