Tuesday, May 31, 2022

Python 3

I've been reading Python stuff quite a bit, getting to grips with a Python 3 and Design Patterns book. I'm not so certain about the book, though. Time will tell. However, over the weekend I designed and wrote a Python program to create a quick reference table for the Mongoose Traveller 2nd edition Traveller game. It all boiled down to one key function:

def distance_km_and_thrust_to_seconds(distance_km,thrust):
    distance_meters = distance_km * 1000;
    result = 2 * math.sqrt(distance_meters/(thrust*10))
    return result