I have a function in which I want to print the value of these math data, how can I make that work?
import math
string = str(input('pi,tau or e'))
print(math.string)
I want it to also work when I randomly input sqrt(3) or something like that, so if statements would be a lot of work if it is possible to do it otherwise. I get the following error:
Traceback (most recent call last):
File "C:/Users/danny/Documents/TU Delft/Introduction to programming/assignment3_1.py", line 41, in <module>
print(math.string)
AttributeError: module 'math' has no attribute 'string'