conv.py

Created by delteilteddy7

Created on September 21, 2025

459 Bytes


def ms_to_kmh(v_ms):
    return v_ms * 3.6

def kmh_to_ms(v_kmh):
    return v_kmh / 3.6

print("Conversion de vitesses")
print("1 : m/s -> km/h")
print("2 : km/h -> m/s")

choix = int(input("Ton choix : "))

if choix == 1:
    v = float(input("Vitesse en m/s : "))
    print(v, "m/s =", ms_to_kmh(v), "km/h")
elif choix == 2:
    v = float(input("Vitesse en km/h : "))
    print(v, "km/h =", kmh_to_ms(v), "m/s")
else:
    print("Choix invalide")

During your visit to our site, NumWorks needs to install "cookies" or use other technologies to collect data about you in order to:

With the exception of Cookies essential to the operation of the site, NumWorks leaves you the choice: you can accept Cookies for audience measurement by clicking on the "Accept and continue" button, or refuse these Cookies by clicking on the "Continue without accepting" button or by continuing your browsing. You can update your choice at any time by clicking on the link "Manage my cookies" at the bottom of the page. For more information, please consult our cookies policy.