Re: [Tutor] Binary tree expressions

2015-08-19 Thread Quiles, Stephanie
ation Stephanie Quiles Sent from my iPhone > On Aug 19, 2015, at 2:41 AM, Alex Kleider wrote: > >> On 2015-08-18 07:36, Quiles, Stephanie wrote: >> Hello! >> Not sure if anyone can help me with these or not but here it goes... >> I have to draw an expression tree for the fo

[Tutor] Binary tree expressions

2015-08-18 Thread Quiles, Stephanie
Hello! Not sure if anyone can help me with these or not but here it goes... I have to draw an expression tree for the following (a+b)*c-(d-e). I believe that the last move would go first in the tree so in this case you would subtract c after computing what d-e was. So my tree would start out

[Tutor] generate random number list and search for number

2015-08-11 Thread Quiles, Stephanie
Hello everyone, Totally lost here. i have to create a program that asks user to input a value and then search for this value in a random list of values to see if it is found. Please see below for more detailed info. This problem requires you to use Python. We want to test out the ordered sequ

Re: [Tutor] Fraction Class HELP ME PLEASE!

2015-08-06 Thread Quiles, Stephanie
ction.__radd__(F1, F2)) print("Modulo of F1 and F2(this prints the remainder):", Fraction.__mod__(F1, F2)) print("Rshift( returns F1 shifted by F2:", Fraction.__rshift__(F1, F2)) if __name__ == '__main__': main() > On Aug 6, 2015, at 9:51 PM, Cameron S

Re: [Tutor] Fraction Class HELP ME PLEASE!

2015-08-06 Thread Quiles, Stephanie
("Is F1 different than F2?:", Fraction.__ne__(F1, F2)) print ("Is F1 same as F2?:", Fraction.__is__(F1, F2)) print("Is:", Fraction.__iadd__(F1, F2)) if __name__ == '__main__': main() > On Aug 6, 2015, at 5:44 PM, Cameron Simpson wrote: >

[Tutor] Fraction Class HELP ME PLEASE!

2015-08-06 Thread Quiles, Stephanie
Hello All, I need to do the following assignment. I need to know how do i hard code an example for each of the operators I am implementing? What i have so far is below? He said he does not care if we plug in some numbers or if we have user input numbers, however I am unsure of how to write a pr

Re: [Tutor] find pickle and retrieve saved data

2015-08-04 Thread Quiles, Stephanie
9, in decode (result, consumed) = self._buffer_decode(data, self.errors, final) UnicodeDecodeError: 'utf-8' codec can't decode byte 0x80 in position 0: invalid start byte Process finished with exit code 1 > On Aug 3, 2015, at 8:13 AM, Quiles, Stephanie > wrote: >

[Tutor] palindrome using stack and queue

2015-08-04 Thread Quiles, Stephanie
Hello , i have to write a palindrome tester using a stack and a queue. You will need to handle strings that may have upper/lower case letters and white space between the letters. We will not include punctuation marks in our strings. Here’s an example: The user inputs otto, you read the string

Re: [Tutor] find pickle and retrieve saved data

2015-08-03 Thread Quiles, Stephanie
I'm trying to tell it to print everything under that particular name. I would have to def info, correct? But set it equal to what to make it work? Stephanie Quiles Sent from my iPhone > On Aug 3, 2015, at 3:12 AM, Alan Gauld wrote: > >> On 03/08/15 04:04, Quiles, Stephanie

Re: [Tutor] email validation

2015-08-03 Thread Quiles, Stephanie
either. where should i insert them into the program to make it work? > On Aug 2, 2015, at 6:54 PM, Quiles, Stephanie > wrote: > > So i took your advice and i am much closer. however, when i type in an > invalid address it loops back to the first prompt and asks you to enter

[Tutor] find pickle and retrieve saved data

2015-08-02 Thread Quiles, Stephanie
how do i go about being able to add a feature to search for individual entries that have been saved into that dictionary or else tell me that the name I entered is not found? Here is the code that i have so far… import pickle def main(): infile = open("emails.dat", "rb") emails = pick

Re: [Tutor] email validation

2015-08-02 Thread Quiles, Stephanie
So i took your advice and i am much closer. however, when i type in an invalid address it loops back to the first prompt and asks you to enter your name: I want it to ask you to re-enter your email address instead how would i go about this? Here is the corrected code : import pickle def mai

[Tutor] infix to postfix eval

2015-08-02 Thread Quiles, Stephanie
hello again! I have to unify these methods so that i can enter an infix, convert it to a postfix and then solve. Here are the methods method #1 is : class Stack: def __init__(self): self.items = [] def isEmpty(self): return self.items == [] def push(self, item):

Re: [Tutor] email validation

2015-08-02 Thread Quiles, Stephanie
> On Aug 1, 2015, at 5:17 PM, Danny Yoo wrote: > Thank you, the program is now working but when the email is not entered > correctly it doesn’t make me go back and re-enter, it spits out an error code > but then moves on to the next field . Here is the code: import pickle def main():

[Tutor] email validation

2015-08-01 Thread Quiles, Stephanie
Hello All, I have a python assignment. I have to make sure that when user inputs email that the program verifies that the address as a @ and a “.” in the entry or else return an invalid email error. A Very rudimentary form of email validation. i cannot get the program to work. Here is what i

[Tutor] infix to postfix exponent handling

2015-08-01 Thread Quiles, Stephanie
My assignment calls for the program to be edited to handle the “^” symbol. the hint is that it should be done with just one line of code. Here is the assignment: Modify the infix-to-postfix algorithm to handle exponentiation. Use the ^ symbol as the input token for testing. Q-14: Modify the inf

Re: [Tutor] the big o

2015-07-28 Thread Quiles, Stephanie
x27;ll answer you inline. > > -Original Message- > From: Tutor [mailto:tutor-bounces+joseph.lee22590=gmail@python.org] On > Behalf Of Quiles, Stephanie > Sent: Monday, July 27, 2015 6:30 PM > To: python tutor > Subject: [Tutor] the big o > >> Hello, &

[Tutor] the big o

2015-07-28 Thread Quiles, Stephanie
Hello, I am trying to figure this out but i do not understand any of it. the question asks give the big-o performance of the following code fragment: for i in range(n): for j in range(n): k = 2 + 2 i am not sure how i am supposed to figure this out. i have been reading