Advertisement
VEGASo

Untitled

Apr 25th, 2021
303
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.57 KB | None | 0 0
  1. import autograd.numpy as np
  2. from autograd import grad
  3. import math
  4.  
  5.  
  6.  
  7.  
  8. print("Привет шкрэкус. Это программа поможет тебе по геометрии. by VEGAS")
  9. input("Нажми Enter что бы продолжить.")
  10.  
  11. print(" ")
  12. print("Шо я умею:")
  13.  
  14. print("1.Найти середину отрезка")
  15.  
  16. vibor = input("Выбери то что тебе надо, указав цифру: ")
  17.  
  18. if vibor == "1":
  19.  
  20.     print("Введи x1 y1 z1, а потом x2 y2 z2")
  21.  
  22.     ############################################# Тут я узнаю числа
  23.                                                ##
  24.     oneX = int(input("x1: "))                  ##
  25.     oneY = int(input("y1: "))                  ##
  26.     oneZ = int(input("z1: "))                  ##
  27.     #############################################   X Y Z
  28.                           ##
  29.     twoX = int(input("x2: "))                  ##  
  30.     twoY = int(input("y2: "))                  ##
  31.     twoZ = int(input("z2: "))                  ##
  32.     #############################################
  33.  
  34.     AresultX = float(oneX + twoX) ## Тут я прибавляю X1 и X2
  35.     BresultX = float(AresultX / 2) ## Тут я сумму X1 и X2 делю на 2
  36.  
  37.     AresultY = float(oneY + twoY)  ## ТОже что и в первом только с:
  38.     BresultY = float(AresultY / 2) ## Y
  39.                                    ##
  40.     AresultZ = float(oneZ + twoZ)  ## Z
  41.     BresultZ = float(AresultZ / 2) ##
  42.  
  43.     print(" ")
  44.     print("X:" + str(BresultX), "Y:" + str(BresultY), "Z:" + str(BresultZ)) ##Вывел на экран Координаты точки
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement