Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
print floating point number
#8
Quote:hbkmjr wrote: In cmd use the full path to the python 3.4 exe.

C:\Users\path to\python3\python.exe yourpythonfile.py
This works!
But going to >>> by entering 'python3', then entering the program name, results in "File <stdin> , line 1 in <module> NameError: name: 'seq' is not defined" error. The program filename is seq.py and that's what I enter at >>>. It is in the Python34 directory where I am when I enter 'python3'.

(Aug-13-2017, 09:42 AM)snippsat Wrote:
Regulus Wrote:Is that what's causing the floating point numbers to print incorrectly? How can I start running 3.4?
Yes,and install 3.6 Python 3.6 and pip installation under Windows also part 2.
Excellent advice. I will try it as soon as I resolve this problem I've had in Win 7 that has prevented me from installing anything from the internet since I downgraded from Win 10 to Win 7.
(Aug-13-2017, 05:40 AM)Regulus Wrote: Btw, I don't understand what this suggestion means: "Add a dot 18. and it magically work."
You make it float bye adding .,then it work for Python 2.
c_n = float(((12*n + 5)/(3*n + 18.)))
...
That worked in 2.7.5! How strange.. Thank you.
Reply


Messages In This Thread
print floating point number - by Regulus - Aug-12-2017, 10:29 PM
RE: print floating point number - by Larz60+ - Aug-12-2017, 10:48 PM
RE: print floating point number - by Regulus - Aug-12-2017, 11:07 PM
RE: print floating point number - by snippsat - Aug-12-2017, 11:08 PM
RE: print floating point number - by Regulus - Aug-13-2017, 05:40 AM
RE: print floating point number - by hbknjr - Aug-13-2017, 06:54 AM
RE: print floating point number - by snippsat - Aug-13-2017, 09:42 AM
RE: print floating point number - by Regulus - Aug-13-2017, 03:42 PM
RE: print floating point number - by hbknjr - Aug-13-2017, 04:13 PM
RE: print floating point number - by snippsat - Aug-13-2017, 04:15 PM
RE: print floating point number - by Regulus - Aug-13-2017, 09:26 PM
RE: print floating point number - by snippsat - Aug-13-2017, 04:26 PM
RE: print floating point number - by wavic - Aug-13-2017, 04:32 PM
RE: print floating point number - by snippsat - Aug-13-2017, 04:50 PM
RE: print floating point number - by sparkz_alot - Aug-13-2017, 08:51 PM
RE: print floating point number - by nilamo - Aug-14-2017, 02:42 PM
RE: print floating point number - by Larz60+ - Aug-14-2017, 12:01 AM
RE: print floating point number - by Regulus - Aug-14-2017, 01:12 AM
RE: print floating point number - by Larz60+ - Aug-14-2017, 08:26 AM
RE: print floating point number - by sparkz_alot - Aug-14-2017, 12:25 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Print Player Name and Number of Pokemon webmanoffesto 1 1,130 Aug-23-2022, 08:54 PM
Last Post: deanhystad
  print two different sequence number mantonegro 2 1,690 Nov-16-2020, 06:19 PM
Last Post: mantonegro
  Print the number of items in a list on ubuntu terminal buttercup 2 1,961 Jul-24-2020, 01:46 PM
Last Post: ndc85430
  Beginner Code, how to print something after a number of turns (guessing game) QTPi 4 2,798 Jun-18-2020, 04:59 PM
Last Post: QTPi
  floating point not increasing properly rakeshpe43 4 2,417 Apr-30-2020, 05:37 AM
Last Post: rakeshpe43
  Print 'X' a number of times Than999 1 2,669 Jan-18-2020, 06:41 PM
Last Post: Larz60+
  connecting the first point to the last point Matplotlib omar_mohsen 0 4,623 Jan-15-2020, 01:23 PM
Last Post: omar_mohsen
  how do I make a number only print once but the number keeps on decreasing? syafiq14 5 3,010 Jan-03-2020, 10:34 AM
Last Post: perfringo
  Complex floating issue arshad 2 11,870 Nov-05-2019, 03:26 PM
Last Post: arshad
  floating point arithmetic exDeveloper 2 2,139 Sep-25-2019, 04:33 PM
Last Post: DeaD_EyE

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020