Re: [Tutor] Tutor Digest, Vol 161, Issue 41

2017-07-30 Thread Borisco Bizaro
Please I have been ask to write python code that ask user to enter a price
continuetly until key press to and give the total amount of price I have
enter using while loop I don't know how to go about it,please help me
On Jul 29, 2017 17:00,  wrote:

> Send Tutor mailing list submissions to
> tutor@python.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
> https://mail.python.org/mailman/listinfo/tutor
> or, via email, send a message with subject or body 'help' to
> tutor-requ...@python.org
>
> You can reach the person managing the list at
> tutor-ow...@python.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Tutor digest..."
>
> Today's Topics:
>
>1. Installing NUMPY (David Torres)
>
>
> -- Forwarded message --
> From: David Torres 
> To: tutor@python.org
> Cc:
> Bcc:
> Date: Fri, 28 Jul 2017 15:10:53 -0500
> Subject: [Tutor] Installing NUMPY
> Hello,
> I am having trouble executing a scripty that imports numpy. I have a
> feeling its because I had an old version of Numpy when I was using python
> 2.7. I am now using Pyhton 3X and I am getting the following error when I
> execute the program:::
>
>
> ImportError:
> Importing the multiarray numpy extension module failed.  Most
> likely you are trying to import a failed build of numpy.
> If you're working with a numpy git repo, try `git clean -xdf` (removes all
> files not under version control).  Otherwise reinstall numpy.
>
> Original error was: DLL load failed: The specified procedure could not be
> found.
>
>
>
> Please let me know if we can email each other or call. I would appreciate
> your help, I am very desperate! Thanks
> David A. Torres
> GitHub : https://github.com/dav1dt0rres
> -Man lives like a robot: mechanically efficient, but with no awareness.
> Department of Computer Science
>
>
>
> Department of Mathematics
> Department of Economics
>
>
> ___
> Tutor maillist  -  Tutor@python.org
> https://mail.python.org/mailman/listinfo/tutor
>
>
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Tutor Digest, Vol 161, Issue 41

2017-07-30 Thread Alan Gauld via Tutor
On 30/07/17 19:50, Borisco Bizaro wrote:
> Please I have been ask to write python code that ask user to enter a price
> continuetly until key press to and give the total amount of price I have
> enter using while loop I don't know how to go about it

First of all, please do not send the whole digest to the list
 - some people pay by the byte and we've all seen it already.

Second, we solve programming challenges by breaking them down
into small parts and solving each part.

Third we don't do homework for you, but we can point you
in the right direction.

So, looking at your problem...

> ...write python code that ask user to enter a price

Do you know how to do that bit? get the usr to enter
a price and store (or print) the value?

> continuetly until key press

We'll come back to this.

> to and give the total amount of price

Do you know how to get the total of a list of prices?
For exanmple if I say

prices = [12, 13.00, 24.50. 17. 5.30]

Can you print the total of prices?

> enter using while loop

This ties in with the earlier requirement:

> enter using while loop
> continuously until key press

Lets assume the "keypress" is 0.
Do you know how to write a while loop that terminates
when an input value is 0?

Let us know the answers and we can point you
a little further towards solving the problem.

-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos


___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Tutor Digest, Vol 161, Issue 33

2017-07-30 Thread Borisco Bizaro
Please I have been ask to write python code that ask user to enter a price
continuetly until key press to and give the total amount of price I have
enter using while loop I don't know how to go about it,please help me
This is what I have done,
untitled
a=1
b=2
while a wrote:

> Send Tutor mailing list submissions to
> tutor@python.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
> https://mail.python.org/mailman/listinfo/tutor
> or, via email, send a message with subject or body 'help' to
> tutor-requ...@python.org
>
> You can reach the person managing the list at
> tutor-ow...@python.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Tutor digest..."
>
> Today's Topics:
>
>1. Fwd: Re:  Python Help (Alan Gauld)
>2. Fwd: Re:  Python Help (Alan Gauld)
>3. Python3 Help (Brandon Anderson)
>4. class newbie (Michael C)
>
>
> -- Forwarded message --
> From: Alan Gauld 
> To: tutor 
> Cc:
> Bcc:
> Date: Sun, 23 Jul 2017 21:45:45 +0100
> Subject: [Tutor] Fwd: Re: Python Help
>
> Forwarding to list,
> please use ReplyAll or ReplyList when responding to the list.
>
>
>  Forwarded Message 
>
> I also tried the correct command for the mac ox s in terminal shell,
> running:
>
> Jims-MacBook-Pro-2:~ Jim$
> PYTHONPATH="/Users/Jim/Documents/illustris_python:$PYTHONPATH
>
> > export PYTHONPATH
>
>
> no error messages there but it is still not finding the module through
> python.
>
> Winonah
>
>
> On Sun, Jul 23, 2017 at 1:34 PM, Winonah Ojanen  > wrote:
>
> I did use the pip command and am attempting to add the files to my
> python path. I used
>  import sys
> sys.path.append("/Users/Jim/Documents/illustris_python")
>
> and that worked. I even checked to make sure the files were there
>
>
> import sys
> print (sys.path)
>
> ['', '/Users/Jim/anaconda/lib/python36.zip',
> '/Users/Jim/anaconda/lib/python3.6',
> '/Users/Jim/anaconda/lib/python3.6/lib-dynload',
> '/Users/Jim/anaconda/lib/python3.6/site-packages',
> '/Users/Jim/anaconda/lib/python3.6/site-packages/
> Sphinx-1.5.6-py3.6.egg',
> '/Users/Jim/anaconda/lib/python3.6/site-packages/aeosa',
> '/Users/Jim/anaconda/lib/python3.6/site-packages/
> setuptools-27.2.0-py3.6.egg',
> '/Users/Jim/anaconda/lib/python3.6/site-packages/IPython/extensions',
> '/Users/Jim/.ipython', 'Users/Jim/Documents/illustris_python']
>
> the file is clearly there but when i try to do import
> illustris_python as il it still can't find the module.
>
>
> Note that only shows the folder is in the path.
>
> What does an 'ls' listing reveal as to the contents of the folder?
> Is there a file called illustris_python.py? or maybe illustris_python.pyc?
>
>
>
> I also figured that I need to manually export to python path so i
> tried:
> export PYTHONPATH=$PYTHONPATH:/Users/Jim/Documents/illustris_python/
>   File "", line 1
> export PYTHONPATH=$PYTHONPATH:/Users/Jim/Documents/illustris_
> python/
> ^
> SyntaxError: invalid syntax
>
> I got invalid syntax... using a mac os x
>
> I tried typing in terminal open .bash_profile and telling it to
> export the python path in there like some others recommended but in
> terminal it is giving me an error message for that... it must not be
> the right command for the shell.
>
> Winonah
>
> On Sat, Jul 22, 2017 at 9:34 PM, Cameron Simpson  > wrote:
>
> On 23Jul2017 00:20, Alan Gauld  > wrote:
>
> On 22/07/17 19:14, Winonah Ojanen wrote:
>
> using python with anaconda in jupiter notebook. However,
> I am having
>
>
> Usual caveat: The tutor list is targeted at the standard
> library
> so any help for non standard library modules is best sought
> from
> the library support fora. In this case that includes the
> SciPy forum
> and any illustris one.
>
>
> Though arguably the OP's problem is an import issue, not really
> module specific.
>
> That having been said, I'll take a guess...
>
> $ mkdir Illustris-3
> $ mkdir Illustris-3/groups_135
>
> Are these folders in your PYTHONPATH? If not Python will not
> find them.
>
> import illustris_python as il
> --
> -
> ModuleNotFoundError   Traceback
> (most recent call last)
>
>
> The OP cded into the new dir; I'd normally expect things to be
> found if the module was a local file/dir. However...
>
> For some reason the computer is not recognizing this as
> 

[Tutor] While loop homework: was Re: Tutor Digest, Vol 161, Issue 33

2017-07-30 Thread Alan Gauld via Tutor
On 30/07/17 23:36, Borisco Bizaro wrote:

> a=1
> b=2
> while a   input ("enter another price :")

Do 'a' or 'b' ever change?
Does 'a print"\n\n press 0 key to stop"

Does the user ever get the chance to enter a value?
If they were, Where is the value stored and is the
value ever used?

>> When replying, please edit your Subject line so it is more specific
>> than "Re: Contents of Tutor digest..."

Please follow the instructions as requested.
It helps find answers in the archives.


-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos


___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


[Tutor] Recommended Python Compiler

2017-07-30 Thread George Sconyers via Tutor
Hello all. I am getting started with Python and looking for a recommended 
compiler for an Ubuntu environment. I've been using gedit but don't get the 
benefit of auto-indentation and color coding of key words. It is laziness for 
sure but as the programs get longer I am increasingly OK with being lazy. Wpuld 
also like something that facilitates debuggig and stepping through code. 
Thoughts?
ThanksGeorge


Sent from Yahoo Mail for iPhone
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Recommended Python Compiler

2017-07-30 Thread Danny Yoo
On Sun, Jul 30, 2017 at 3:22 PM, George Sconyers via Tutor
 wrote:
> Hello all. I am getting started with Python and looking for a recommended 
> compiler for an Ubuntu environment. I've been using gedit but don't get the 
> benefit of auto-indentation and color coding of key words. It is laziness for 
> sure but as the programs get longer I am increasingly OK with being lazy. 
> Wpuld also like something that facilitates debuggig and stepping through 
> code. Thoughts?


Hi George,

What you're asking for is an Integrated Development Environment (IDE),
not a compiler, which is an entirely different thing.


* An IDE is the program that you actively interact with to edit your
programs, explore relationships, do debugging, and run programs.

* A compiler is much more limited in scope: it's the tool used to
process your programs to be run.  It's not usually an interactive tool
though.


It's very often the case that an IDE will, behind the scenes,
integrate with a language compiler since the IDE will want to make it
easy for its users to run programs.


I've lately heard good things about PyCharm.  I have to admit that I
have not used it, though.  The PyCharm folks have a few video
tutorials: 
https://www.youtube.com/playlist?list=PLQ176FUIyIUZ1mwB-uImQE-gmkwzjNLjP
to show what their tool looks like.


For more recommendations and advice, you can take a look at the Wiki:

https://wiki.python.org/moin/IntegratedDevelopmentEnvironments


Good luck!
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Recommended Python Compiler

2017-07-30 Thread Alan Gauld via Tutor
On 30/07/17 23:22, George Sconyers via Tutor wrote:
> ...looking for a recommended compiler for an Ubuntu environment. 

In programming precision is everything.

You are not in fact looking for a compiler, you are
looking for a development environment or IDE.

A compiler takes source code and produces executable
machine code. C-Python does not have such a thing
(it uses an interpreter to translate the code at runtime)
although you an get one for the Java based Jython.
But that's not really what you are asking for...

> ...using gedit but don't get the benefit of auto-indentation > and color 
> coding of key words.

These are feature of the editor (usually a component of an IDE)
- and gedit can do the syntax colouring, I'm not sure about the
auto-indent... But rather than use gedit I suggest you use
IDLE which is a simple but useful Python IDE built in Python.

> ...something that facilitates debuggig and stepping through code. 

IDLE does all of the above.

You can get it via the Ubuntu software manager or Synaptic or apt-get...
Make sure you get the right version for your Python version

There are many other IDEs for Python, right up to professional tools
like Eclipse and Netbeans but IDLE is a good starting point. And
there are lots of YouTube videos to get you started.

HTH
-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos


___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Recommended Python Compiler

2017-07-30 Thread Mats Wichmann
since this all opinions :), I don't think idle is worth bothering with. for 
editor that can do ide like things, consider atom (free, get a bunch of 
plugins) or sublime text (not free). for a full ide, pycharm is great 
(community edition free). for a lightweight ide to get started, i liked thonny 
when i trialed it at somebody's request, but do look at that wiki page, tons of 
choices there.

On July 30, 2017 6:09:20 PM MDT, Alan Gauld via Tutor  wrote:
>On 30/07/17 23:22, George Sconyers via Tutor wrote:
>> ...looking for a recommended compiler for an Ubuntu environment. 
>
>In programming precision is everything.
>
>You are not in fact looking for a compiler, you are
>looking for a development environment or IDE.
>
>A compiler takes source code and produces executable
>machine code. C-Python does not have such a thing
>(it uses an interpreter to translate the code at runtime)
>although you an get one for the Java based Jython.
>But that's not really what you are asking for...
>
>> ...using gedit but don't get the benefit of auto-indentation > and
>color coding of key words.
>
>These are feature of the editor (usually a component of an IDE)
>- and gedit can do the syntax colouring, I'm not sure about the
>auto-indent... But rather than use gedit I suggest you use
>IDLE which is a simple but useful Python IDE built in Python.
>
>> ...something that facilitates debuggig and stepping through code. 
>
>IDLE does all of the above.
>
>You can get it via the Ubuntu software manager or Synaptic or
>apt-get...
>Make sure you get the right version for your Python version
>
>There are many other IDEs for Python, right up to professional tools
>like Eclipse and Netbeans but IDLE is a good starting point. And
>there are lots of YouTube videos to get you started.
>
>HTH
>-- 
>Alan G
>Author of the Learn to Program web site
>http://www.alan-g.me.uk/
>http://www.amazon.com/author/alan_gauld
>Follow my photo-blog on Flickr at:
>http://www.flickr.com/photos/alangauldphotos
>
>
>___
>Tutor maillist  -  Tutor@python.org
>To unsubscribe or change subscription options:
>https://mail.python.org/mailman/listinfo/tutor

-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Recommended Python Compiler

2017-07-30 Thread Ben Finney
George Sconyers via Tutor  writes:

> Hello all. I am getting started with Python and looking for a
> recommended compiler for an Ubuntu environment.

Python comes with a compiler: it is the ‘python’ command, which compiles
your program code ‘foo.py’ to a bytecode file, typically ‘foo.pyc’.

You might be looking for a different compiler, maybe one which compiles
not to Python byte code but instead to CPU machine code. There isn't
such a thing; running your compiled Python code typically requires a
Python interpreter.

(Yes, Python is both compiled *and* interpreted, in separate steps.
Those steps are typically done automatically behind the scenes, but they
are separate.)

You can find programs which will take your compiled bytecode, along with
a Python interpreter, and bundle them into a single executable file. Is
that what you're asking for?

-- 
 \ “Truth would quickly cease to become stranger than fiction, |
  `\ once we got as used to it.” —Henry L. Mencken |
_o__)  |
Ben Finney

___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor