Post Reply 
Python, how to input a complex number
04-30-2021, 10:36 AM
Post: #8
RE: Python, how to input a complex number
(04-29-2021 02:36 PM)Dirk.nl Wrote:  According to Python documents, you can enter a complex number like this; var=complex(input())
For example, 3+5j
The Python App gives an error message here.
Could someone for me test / try this and explain what I'm doing wrong ?

How about var=complex(float(input()))

Tom L
Cui bono?
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Python, how to input a complex number - toml_12953 - 04-30-2021 10:36 AM



User(s) browsing this thread: 2 Guest(s)