[Tutor] Executing "if :" function on terminal

2017-09-05 Thread Nathan Kckaiyer
Dear Tutor, i have just started learning python. I have repeatedly hit a road block on my mac os terminal . Everytime i use the "if :" command i get syntax errors. i do not see any errors on text editor i am following instructions from a book Original input on editor >>> a=2 >>> if a==2 :

Re: [Tutor] Executing "if :" function on terminal

2017-09-05 Thread Alan Gauld via Tutor
On 05/09/17 08:56, Nathan Kckaiyer wrote: > i have just started learning python. I have repeatedly hit a road > block on my mac os terminal . Everytime i use the "if :" command i > get syntax errors. The problem is that you are somehow executing the Python interpreter prompt in the interpreter.

[Tutor] I want to display Integral symbols

2017-09-05 Thread edmundo pierre via Tutor
I have been trying to display mathematics symbols on my Tkinter (using Python) project, but was not successful .I am trying  to compute integrals on my Tkinter project and will like to display this image on my tkinter:∫2xdx. Jupiter can display that symbol using sympy, but I can not dis

[Tutor] Help With Python Tasks

2017-09-05 Thread Ruth Hardy
Dear Sir or Madam I was wondering if you can help me please with these computer science tasks as I don’t know where to start: First Task Write code do the following things involving strings. Wherever possible, you should try to incorporate functions/procedures, although they are not appropr

Re: [Tutor] I want to display Integral symbols

2017-09-05 Thread Alan Gauld via Tutor
On 05/09/17 14:29, edmundo pierre via Tutor wrote: > I have been trying to display mathematics symbols on my Tkinter (using > Python) project, > but was not successful So show us what you did. Its hard to figure out what's gone wrong when we can't see your code. And that includes telling us wh

Re: [Tutor] Help With Python Tasks

2017-09-05 Thread Alan Gauld via Tutor
On 05/09/17 19:25, Ruth Hardy wrote: > I was wondering if you can help me please with these computer science tasks We can help, but we won;t do them for you. > First Task > > Write code do the following things involving strings. Wherever possible, > you should try to incorporate functions/pro

[Tutor] Select a string

2017-09-05 Thread Pat Martin
Hello all, I am trying to write a program for a programming class that finds the number of a specific string (bob) in a string of characters. I am using one of the sample strings they give me and it should find 2 instances of bob but my script returns 0. Since they want it to find 2 from the bobob

Re: [Tutor] Select a string

2017-09-05 Thread Ben Finney
Pat Martin writes: > My eyes are crossing looking at the code, can someone give me a hint > on what I am missing that causes this to not give me the correct > answer of 2. It's good to admit that looking at the code has ceased to help :-) So, try a different approach. Without using the code, ca

Re: [Tutor] Select a string

2017-09-05 Thread Cameron Simpson
On 05Sep2017 22:34, Pat Martin wrote: I am trying to write a program for a programming class that finds the number of a specific string (bob) in a string of characters. I am using one of the sample strings they give me and it should find 2 instances of bob but my script returns 0. Since they wan