[Python] how do i create a function to calculate the fare for a trip based on just distance...

Discussão em 'Python' iniciado por Stack, Fevereiro 15, 2025.

  1. Stack

    Stack Membro Participativo

    how can a ride sharing app use a function to calculate the estimate fare for a trip. based on the distance and time of the day

    i tried using a define function, but I got really confused on how to even calculate the distance. if I'll be using lots of elif's?, or give different function for morning, afternoon and night??

    Continue reading...

Compartilhe esta Página