Hello , I have map of the following type: typedef map < int, vectorofInts > , Now the map has finite size. Each user when he registers, he will be allocated a key. Lets say the map size is 4. U1 will be allocated in K1. next U2 on K2, U3 on K3, U4 on K4. Later it happens in round robin way, U5 with K1 etc. Meantime, U1 may dropoff, in that case U6, needs to be allocated K1. to keep uniformity. Any feedback or idea regarding this alogrithm and optimum way to implement. Sorry that i am not …

Member Avatar
Member Avatar
+0 forum 4

""" Write a function to convert temperature from Celsius to Fahrenheit scale. oC to oF Conversion: Multipy by 9, then divide by 5, then add 32. Examples >>> Cel2Fah(28.0) '82.40' >>> Cel2Fah(0.00) '32.00' """ so it says, but i couldn't think of an a way to do so efficiently. But none the less, i felt i should try it and then look up a better way after the code i wrote is as follows; [CODE] def Cel2Fah(temp): Fah = temp * 9 / 5 + 32 Fah = float(Fah) Fah_string = str(Fah) a = Fah_string.split('.') b = a[1][0:2] if len(b) …

Member Avatar
Member Avatar
+0 forum 2

The End.