#D or d means deposit while W or w means withdrawal. bal=0 while('true'): ch = input ('''Enter d or D for Deposit Enter w or W to Withdraw Enter x to exit ''') if (ch=='d' or ch == 'D'): amt = int (input ('Enter amount: ')) bal += amt elif (ch=='w' or ch == 'W'): amt = int (input ('Enter amount: ')) bal-= amt else: print (bal) break
x=input('Enter the charcater: ') r=int(input('Enter the no. of rows: ')) c=int(input('Enter the no. of columns: ')) print(x*c) ns=x+' '*(c-2)+x for i in range (r-2): print(ns) print(x*c)
Comments
Post a Comment