On 03/08/15 04:02, Quiles, Stephanie wrote:
ok so i made a few corrections based on what you stated and moved the name
variable out of the loop. however, now its doing the same thing with alternate
email.
So you need a while loop for every element you want to validate.
while True: # overa
2015-08-03 5:02 GMT+02:00 Quiles, Stephanie <
stephanie.quiles...@albright.edu>:
> ok so i made a few corrections based on what you stated and moved the name
> variable out of the loop. however, now its doing the same thing with
> alternate email. if it is entered incorrectly, it goes back to emai
ok so i made a few corrections based on what you stated and moved the name
variable out of the loop. however, now its doing the same thing with alternate
email. if it is entered incorrectly, it goes back to email 1 and you have to
re-enter it. i tried the nested loops but they were not working e
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
On 02/08/15 23:54, 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 your name: I
want it to ask you to re-enter your email address instead how would i go about
this?
Just mo
On 02/08/15 09:31, Alan Gauld wrote:
them outside the main block and use them in your tests. In that case you
only need one function which I'd call something like test_email()
Ahem. Or you could call it is_good_address() of course! Oops!
def is_good_address(addr):
if '@' not in addr or
On 02/08/15 02:55, Quiles, Stephanie wrote:
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 th
> 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():
On 8/1/2015 10:54 AM, Quiles, Stephanie wrote:
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 c
On Sat, Aug 1, 2015 at 2:03 PM, Válas Péter wrote:
> Hi Stephanie,
>
> the function should be defined first, and used after. So put it before
> main().
It's perfectly legal and ok to say:
###
def main():
callHelper()
def callHelper():
print("I am the helper")
All your function definitions should be defined with 'def' at the
leftmost margin.
However, the line in your program that starts with "def
open_existing_file()..." is not flush with the margin. Python has,
subsequently, thought that the definition of the function is scoped
locally. Move the begi
Hi Stephanie,
the function should be defined first, and used after. So put it before
main().
Also, "if '@' not in email and '.' not in email:" seems to be erroneous.
You want both be present; this is an AND if you state it and becomes OR
when you deny.
if '@' not in email or '.' not in email:
In
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
13 matches
Mail list logo