last day (16 days later) » 

23:20
i can wait until you get time if you have no time right now
idk :)
My computer is just acting up
I have about 40 minutes. Happy to help with anything you've got
I need a Yes/No code included at the end of my program
but whatever i add doesn't work
you mean like a prompt
Do you want to continue (Y/n)?
?
yeah
like that
you're on python 2.x right?
23:26
If the answer is (Y) start the program again from the beginning, or if the answer is (N) print the statement "Thank you, Goodbye" quit
no 3.
if input("Do you want to coninute? (y/N)").lower() == "y":
    run()
else:
    print("goodbye")
    exit(0)
then put the code that starts off your program in a run or main function
(which you should always do anyway)
will this work ?
I wrote
print = input ("Would you like another transaction? y/n: ")
you shouldn't use print as a variable name
oh? why?
you're assigning the input of the user to a variable called print, but this variable already contains your print function. so, next time you use print, it'll say "object of <type 'str'> is not callable", or something like that
23:30
i've got the error again expected an indented block
paste the code that throws the error
#Entering account number
an = input("Enter your account number: ")
while not an.isdigit():
    print ("Invalid Account Number, please re-enter")
an = input("Enter your account number: ")
an = int(an)

balance = int(1500)
print ("Balance in your account is:",(balance))
print ("Choose either 1 or 2")

#To show the available options:
print ("1. Deposit")
print ("2. Withdrawal")

#Defining input and choice:
ch = input("Please enter your choice: ")
ch = int(ch)

#Choice & Calculations:
if ch == 1:
deposit = input ("Enter the amount to deposit : ")
at line three, you start a while block
they look like this:
while x:
    # do something
#this is outside of the while block
it can't tell which of the following lines belong inside the while block
right
i edited
it's the same for if
the same goes for the if block at the end
23:34
i did
but it does not ask for yes/no
by the way, you don't need to write ìnt(123). just 123 will work fine
o boy
i've got more errors each time i execute it
TypeError: 'int' object is not callable
what's the line causing the error?
23:39
second
you must have assigned to input somewhere
i should find a pythonist to choose as boyfriend
no where?
I don't know what that's about, can you post the whole code again as it is now?
#Entering account number
input=0
an = input("Enter your account number: ")
while not an.isdigit():
    print ("Invalid Account Number, please re-enter")
an = input("Enter your account number: ")
an = int(an)

balance = int(1500)
print ("Balance in your account is:",(balance))
print ("Choose either 1 or 2")

#To show the available options:
print ("1. Deposit")
print ("2. Withdrawal")

#Defining input and choice:
ch = input("Please enter your choice: ")
ch = int(ch)

#Choice & Calculations:
if ch == 1:
in line 23+
if "ch" is not == 1, you use "deposit" without having declared it
this is the code:
if ch == 1:
    deposit = input ("Enter the amount to deposit : ")
deposit = int(deposit)
total1 = int()
total1 = (deposit + 1500)
print ("Your balance after deposit is:",(total1))
and if ch != 1, this is the code:
deposit = int(deposit)
total1 = int()
total1 = (deposit + 1500)
print ("Your balance after deposit is:",(total1))
that should raise a NameError for "int(deposit)"
23:46
if ch is not ==.. is wrong?
You need to indent the whole thing
for instance
if ch == 1:
    a = 9
    a += 2
    ...

print("this happens whether ch is 1 or not")
in other languages you'd have braces for that
if (ch == 1) {
   do something
}

...
i see
but is not == works like != , right?
`a is not b` means that a and b are not the exact same object
`a != b` means that the values of a and b are different
so,
float(1) == int(1) is True, but float(1) is int(1) will be False
i understand now
you're doing very well for a complete beginner, by the way
23:52
thank you
there are certain "patterns" you're going to learn over time
so kind of you
i'm wondering if you want to have a girlfriend
def main():
    print("welcome to the program")

if __name__ == '__main__':
    main()
nothing is important to me except money and python :D
23:55
thanks you so much again for your time
was a great help
you're quite welcome, any time
you're welcome to be my friend , anytime ;D
very kind (:
you have one? if i may ask
yeah I do
23:59
and two? :D jk

  last day (16 days later) »