Vitaliy_Novichikhin

Stepik 2.1.4 except error

Jun 12th, 2020
181
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.22 KB | None | 0 0
  1. import math
  2.  
  3. def f_x(x):
  4.    try:
  5.        y = 1 / (x+1) + x / (x-3)
  6.    except:
  7.        print('невозможное значение')
  8.    return y
  9.  
  10. t = float(input("t = "))
  11.  
  12. y = f_x(t)
  13.  
  14. print("f(", t, ") = ", y)
Add Comment
Please, Sign In to add comment