Category : double

while solving mathematical problem i get this problem . same type of operation geeting diff ans mod=1e9+21 mod=1000000000+21 for i in range(20,21): f3=pow(math.sqrt(7),i+2)*math.cos(i*math.atan(math.sqrt(3)/2)) #combine x1=pow(math.sqrt(7),i+2)%mod #diff x2=math.cos(i*math.atan(math.sqrt(3)/2))%mod print((x1*x2)%mod) print(f3%mod) output 866216427.0 729324812.000003 i try to compute combine modulo then i get 866216427.0 as an output .then i try individual now i get diff ans than ..

Read more

I have uninstalled a couple of installations of Python from my Windows 10 machine, but when I try to run pip from the command prompt now, using the only python install that is specified in PATH in the System Environment Variables, it gives me this error: Fatal error in launcher: Unable to create process using ..

Read more

Example of the code that works great s="abc123" swap_seq="103254" swapped=”.join([s[int(i)] for i in swap_seq]) if s[0].isupper(): swapped.capitalize() print (swapped) but I have a large amount of characters that I need to be swapped 18 exactly, just wondering how to do the double digits The example i’m trying to get it working with is the following. ..

Read more

I have a LocationGlobal and a double. print(LocationGlobal.lat) returns -35.3632566. But print(LocationGlobal.lat – double) returns -9.999999974752427e-07. but I excepted 0.0000001. What I must to do to take value 0.0000001 full code location = LocationGlobal.lat myDouble = -35.3632556 print(location) #-35.3632566 print(myDouble) #-35.3632556 print(location – myDouble) #expected 0.0000001 but output -9.999999974752427e-07 full output -35.3632566 -35.3632556 -9.999999974752427e-07 Source: ..

Read more