[Tutor] QUESTION

2017-03-04 Thread Tasha Burman
Hello python tutors, I am having difficulty with a power function; what is another way I can do 4**9 without using **? Thanks, Tasha ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman

Re: [Tutor] QUESTION

2017-03-04 Thread Alan Gauld via Tutor
On 04/03/17 01:37, Tasha Burman wrote: > I am having difficulty with a power function; > what is another way I can do 4**9 without using **? You can use the pow() function. answer = pow(4,9) However, I'm not sure that really answers your question? Do you mean that you want to write your own pow

[Tutor] Calculate 4**9 without using **, was Re: QUESTION

2017-03-04 Thread Peter Otten
Tasha Burman wrote: > Hello python tutors, > I am having difficulty with a power function; what is another way I can do > 4**9 without using **? Thanks, Hello Tasha, "what is another way I can do 4**9 without using **?" sounds a lot like a homework question -- so you really have to think about

Re: [Tutor] Calculate 4**9 without using **, was Re: QUESTION

2017-03-04 Thread D . V . N . Sarma డి . వి . ఎన్ . శర్మ
Much simpler is 4*4*4*4*4*4*4*4*4 regards, Sarma. On Sat, Mar 4, 2017 at 2:20 PM, Peter Otten <__pete...@web.de> wrote: > Tasha Burman wrote: > > > Hello python tutors, > > I am having difficulty with a power function; what is another way I can > do > > 4**9 without using **? Thanks, > > Hello

Re: [Tutor] Calculate 4**9 without using **, was Re: QUESTION

2017-03-04 Thread Peter Otten
D.V.N.Sarma డి.వి.ఎన్.శర్మ wrote: > On Sat, Mar 4, 2017 at 2:20 PM, Peter Otten <__pete...@web.de> wrote: >> "what is another way I can do 4**9 without using **?" >> >> sounds a lot like a homework question -- so you really have to think >> about it yourself a bit. A few hints: >> >> How would you

Re: [Tutor] Calculate 4**9 without using **

2017-03-04 Thread Sri Kavi
Hi, I'm a beginner learning to program with Python. I'm trying to explain a solution in plain English. Please correct me if I'm wrong. Create a function that takes base and exponent as arguments. In the body of the function: set a result variable to the base. User a for-loop with a range

Re: [Tutor] Problems with matplotlib

2017-03-04 Thread Pooja Bhalode
I had a similar issue when I tried to download matplotlib in my python directory. I think what Peter suggested is correct, if you remove the new file it would work for you. I had the same issue with copy.py file. Hope that helps. On Sat, Mar 4, 2017 at 2:30 AM, Peter Otten <__pete...@web.de> wr

Re: [Tutor] Calculate 4**9 without using **

2017-03-04 Thread Alan Gauld via Tutor
On 04/03/17 16:17, Sri Kavi wrote: > I'm a beginner learning to program with Python. I'm trying to explain a > solution in plain English. Please correct me if I'm wrong. See the thread earlier today with the subject QUESTION for more on this topic. > Create a function that takes base and exponen

Re: [Tutor] Calculate 4**9 without using **

2017-03-04 Thread Whom Isac
Hi there. So if you want to make a function for exponent (e^x)  rather than power such as x**n, then you need to use/import pythons math module such as Numpy. Use: import numpy as np List = [1,2,3,4,5] np.exp(list) This would give exponential value of each x in the list. If you want to

Re: [Tutor] Calculate 4**9 without using **

2017-03-04 Thread Alex Kleider
On 2017-03-04 08:17, Sri Kavi wrote: I'm a beginner learning to program with Python. I'm trying to explain a solution in plain English. Please correct me if I'm wrong. Create a function that takes base and exponent as arguments. Is seems that you are facing the same problem as Tasha Burman.

Re: [Tutor] Calculate 4**9 without using **

2017-03-04 Thread Steven D'Aprano
On Sat, Mar 04, 2017 at 06:07:23PM -0800, Alex Kleider wrote: > On 2017-03-04 08:17, Sri Kavi wrote: > > >I'm a beginner learning to program with Python. I'm trying to explain a > >solution in plain English. Please correct me if I'm wrong. > > >Create a function that takes base and exponent as ar