a guest Jan 27th, 2020 77 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import sympy
  2. x, y = sympy.symbols('x y')
  3. f = x + y
  4. variable, variable_value = input('Введите строку в формате имя переменной значение "x 5"').split()
  5. f = f.subs(eval(variable), int(variable_value))
  6. print(f)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand