Hello guest, if you read this it means you are not registered. Click here to register in a few simple steps, you will enjoy all features of our Forum.
Bottom Page

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
print floating point number
#11
(Aug-13-2017, 04:13 PM)hbknjr Wrote: If you correctly added python34 to the path and changed the python.exe name to python3.exe, You should be able to execute your seq.py file by typing following in CMD.
Should never do this @hbknjr.
Advisable for Windows is to have one main version that you run with python my.py in case over will 3.6 to run.
If use other version use py -version, py -2.7 my.py use Python 2.7 to run.
Quote
#12
Well, Windows has a PATH env. variable, right? So there is something called shortcuts, right? So make a shortcut in the PATH directory and let's point to the Python executable. Doesn't matter where is installed.
"As they say in Mexico 'dosvidaniya'. That makes two vidaniyas."
https://freedns.afraid.org
Quote
#13
(Aug-13-2017, 04:32 PM)wavic Wrote: Well, Windows has a PATH env. variable, right? So there is something called shortcuts, right?
The point @wavic is that Python 3.6  add to path automatically under installation. 
İmage

Then when use python my.py from command line it use 3.6 to run.
And pip command will install to 3.6

All other version can be run with py -version
py -3.4 my.py will run code in 3.4.
py -2.7 my.py will run code in 2.7.
py -3.4 -m pip install requests will install Requests to 3.4
This way it easy to access all version,and using python it will use 3.6 which should be main version on OS.
sparkz_alot likes this post
Quote
#14
Another way, I believe,  is to add a shebang line at the beginning of the script. Then double clicking the "my_file.py" in Windows or typing "./my_file.py" in Linux with run the correct version.
If it ain't broke, I just haven't gotten to it yet.
OS: Windows 10, openSuse 42.2, freeBSD 11, Raspian "Jessie"
Python 3.6.2, IDE: PyCharm 2017 Community Edition
Quote
#15
(Aug-12-2017, 11:07 PM)Regulus Wrote: Could the problem be my python environment? I code in Notepad++ and run the program at a DOS prompt. Here are the last few lines of my output with the new print command you kindly provided:
n = 496 and c = 3.0
n = 497 and c = 3.0
n = 498 and c = 3.0
n = 499 and c = 3.0

(Aug-13-2017, 04:15 PM)snippsat Wrote: Some advice follow my link over and install Python 3.6.
Restart Pc.
I will do that as soon as I resolve the problem I mentioned in post #8 (it got hidden inside other quotes). My Windows 7 doesn't install anything I download from the internet. The downgrade from Win 10 back to Win 7 somehow ruined that feature. I've asked how to fix it on Seven Forums, but no reply yet.
Quote
#16
Quote:My Windows 7 doesn't install anything I download from the internet.
Why? What are your permissions?
This sounds like a very restricted, or worse yet, corrupted operating system
Quote
#17
(Aug-14-2017, 12:01 AM)Larz60+ Wrote:
Quote:My Windows 7 doesn't install anything I download from the internet.
Why? What are your permissions?
This sounds like a very restricted, or worse yet, corrupted operating system
I must be missing an installation driver. It was working fine before the "upgrade" to Win 10, then I realized my computer isn't built for Win 10. The one thing I seem to have lost after switching back to Win 7 is the ability to install software I download online. Everything else is fine.

How do I check my permissions?
Quote
#18
Quote:How do I check my permissions?
There
  • right click the folder that you want to view permissions on.
  • Click properties
  • Click security (this is a tab)
  • View permissions in the second box
This is only useful if you are doing a few selected directories.
To do bulk reset, see: https://social.technet.microsoft.com/For...rosecurity
Quote
#19
It's been awhile since I've used MS 7, can you right click on the downloaded file and select "Run As Administrator"?

You should also be able to go into Control Panel --> User Accounts and verify that you are in the Administrator group. If it's not listed, you may have to login as the actual Administrator in order to add you to the group.  While logged in as Administrator, can you install programs?

Note that the Administrator account may be "hidden" (the default) here is one link to show how to activate it:
Activate Hidden Admin.  Make sure you "hide" it again when you are done.

EDIT: I should add, whether posting on this site or another, you should copy and paste any error code in it's entirety, this helps us or others understand what is actually going on. In your case, if you cannot install a file, MS will usually generate an 'error code', which can be looked up online and give you at least an idea of what is happening.
If it ain't broke, I just haven't gotten to it yet.
OS: Windows 10, openSuse 42.2, freeBSD 11, Raspian "Jessie"
Python 3.6.2, IDE: PyCharm 2017 Community Edition
Quote
#20
(Aug-13-2017, 08:51 PM)sparkz_alot Wrote: Another way, I believe,  is to add a shebang line at the beginning of the script. Then double clicking the "my_file.py" in Windows or typing "./my_file.py" in Linux with run the correct version.

Double clicking in windows works with file associations and the .py extension.  The shebang, in windows, is only used by the windows-specific python launcher, to switch to a different version of python if windows tries to use the wrong one.  It won't start python if windows doesn't already know that it should be starting python.
It's dangerous to go alone!  Take this: https://docs.python.org/3/library/index.html
HackerRank seems neat: https://www.hackerrank.com/nilamo
Quote

Top Page

Possibly Related Threads...
Thread Author Replies Views Last Post
  Sympy symbolic Point shoulddt 0 66 Jul-17-2017, 06:07 PM
Last Post: shoulddt
  New beginner, defining point help :( Armandas 3 265 Apr-25-2017, 09:53 PM
Last Post: Armandas
  Input a number with any number of digits and output it in reverse order of digits. sarada2099 6 414 Mar-12-2017, 05:45 PM
Last Post: Ofnuts
  dxfgrabber-return lines start point elhetch 3 371 Feb-26-2017, 12:28 PM
Last Post: buran

Forum Jump:


Users browsing this thread: 1 Guest(s)