import math p1 = () p2 = () print("input Vp1 Hp1 VHp1") Vp1 = int(input()) Hp1 = int(input()) VHp1 = int(input()) p1 = (Vp1, Hp1, VHp1) print("input Vp2 Hp2 VHp2") Vp2 = int(input()) Hp2 = int(input()) VHp2 =int(input()) p2 = (Vp2, Hp2, VHp2) v_1= tuple(map(lambda p1, p2: p1 - p2, p1,p2)) v_1_vd = v_1[0] v_1_hd = v_1[1] v_1_vhd = v_1[2] LD = math.sqrt((v_1_hd**2) + (v_1_vd**2) + (v_1_vhd**2)) print("LD =", LD)
Friday, January 29, 2021
Linear_dist Python
Subscribe to:
Post Comments (Atom)
Gammon => Ham Calculator V1.0
def ham_cooking_time (grams): """ Calculates the cooking time for a ham based on its weight. Args: g...
-
def ham_cooking_time (grams): """ Calculates the cooking time for a ham based on its weight. Args: g...
-
import random class EuroMillions : """Generates a random EuroMillions ticket with no duplicate numbers.""...
-
import random import string # To be extended one bit at a time lottery_numbers_picked = 1033458226 lottery = [ "1" , ...
No comments:
Post a Comment