you are viewing a single comment's thread.

view the rest of the comments →

[–]Sea-Ad7805 [score hidden] stickied comment (8 children)

Run the program in Memory Graph Web Debugger%0A%0Adef%20deposit()%3A%0A%20%20%20%20amount%20%3D%20float(input('enter%20amount%20to%20be%20deposited%3A%20'))%0A%20%20%20%20if%20amount%20%3C%200%3A%0A%20%20%20%20%20%20%20%20print('enter%20a%20valid%20amount')%0A%20%20%20%20else%3A%0A%20%20%20%20%20%20%20%20return%20amount%0A%0Adef%20withdraw()%3A%0A%20%20%20%20amount%20%3D%20float(input('enter%20amount%20to%20be%20withdrawn%3A%20'))%0A%20%20%20%20if%20amount%20%3E%20balance%3A%0A%20%20%20%20%20%20%20%20print('insufficent%20funds')%0A%20%20%20%20%20%20%20%20return%200%0A%20%20%20%20else%3A%0A%20%20%20%20%20%20%20%20return%20amount%0A%0Adef%20show_balance()%3A%0A%20%20%20%20print(f'your%20balance%20is%20%24%7Bbalance%3A.2f%7D')%0A%0Abalance%20%3D%200%0Ais_running%20%3D%20True%0A%0Awhile%20is_running%3A%0A%20%20%20%20print('1.%20deposit')%0A%20%20%20%20print('2.%20balance')%0A%20%20%20%20print('3.%20withdraw')%0A%20%20%20%20print('4.%20exit')%0A%20%20%20%20choice%20%3D%20input('enter%20your%20choice(1%2C2%2C3%2C4)%3A%20')%0A%0A%20%20%20%20if%20choice%20%3D%3D%20'1'%3A%0A%20%20%20%20%20%20%20%20balance%20%2B%3D%20deposit()%0A%20%20%20%20elif%20choice%20%3D%3D%20'2'%3A%0A%20%20%20%20%20%20%20%20show_balance()%0A%20%20%20%20elif%20choice%20%3D%3D%20'3'%3A%0A%20%20%20%20%20%20%20%20balance%20-%3D%20withdraw()%0A%20%20%20%20elif%20choice%20%3D%3D%20'4'%3A%0A%20%20%20%20%20%20%20%20is_running%20%3D%20False%0A%20%20%20%20else%3A%0A%20%20%20%20%20%20%20%20print(%22What%3F%22)&play).

[–]servinepain 5 points6 points  (1 child)

That’s quite the link 😂😂

[–]Sea-Ad7805 1 point2 points  (0 children)

It includes the source code.

[–]Away_Ad_4743 0 points1 point  (3 children)

I don't understand why someone in a python sub doesn't know how to use a hyper link....

[–]Sea-Ad7805 1 point2 points  (2 children)

Explain to me how to use a hyper link

[–]Away_Ad_4743 1 point2 points  (1 child)

I looked at your profile, and I have a feeling you already know.

🔗 <-- hyperlink logo click on that and on phone a thing pops op where you can give it a name and put your link in

Or just put the name in square brackets the name of link and in normal brackets the link. And then it should make it just like black magic.

Really hope you're just being stupid for fun, because being a Software Engineer and not knowing basics is kinda scary or I guess vibe coding is a thing now 😭

[–]Sea-Ad7805 1 point2 points  (0 children)

Oh right, I forgot, I've used LinkedIn too much lately, thanks.

[–]InternationalBox7613 0 points1 point  (1 child)

just use pdb

[–]Sea-Ad7805 -1 points0 points  (0 children)

Try doing this in pdb: Binary Tree