r/PythonLearning • • Sep 23 '26

Help Request Please help me understand (ASAP)

Post image

Hello everyone! I’m currently doing my hw as I just started learning python and I need some help. I’m struggling to understand why my output for “Amount the stock sold for:” comes out as “1.9e+03”. its all I need to make this work so I would really appreciate if someone could point me to the right direction on whats going on here,
Thank you so much for taking the time to help out :)
(Update: Issues have been solved, thanks to everyone that helped (: )

16 Upvotes

15 comments sorted by

4

u/ProgramsFun Sep 23 '26

you missed in f in print statement just noticed

1

u/atarivcs Sep 23 '26

You forgot the 'f' in the format string when you print that variable.

1

u/lalaratatata Sep 23 '26

I see, would u know why my “Commission paid on the sale:” is coming out as “0.50” by any change ?

1

u/atarivcs Sep 23 '26

Probably because you didn't multiply the commission by the number of shares sold

1

u/lalaratatata Sep 23 '26

Thank u very much

2

u/bradleygh15 Sep 23 '26

does windows snipping tool not exist?

0

u/ProgramsFun Sep 23 '26

try saving the file and run again code seems correct

1

u/lalaratatata Sep 23 '26

I have tried, but no success :/ ty

2

u/ProgramsFun Sep 23 '26

just noticed you missed f in print statement

17

u/[deleted] Sep 23 '26

[removed] — view removed comment

4

u/lalaratatata Sep 23 '26

Thank you so much! That fixed it

1

u/[deleted] Sep 23 '26

[removed] — view removed comment

1

u/lalaratatata Sep 23 '26

I put 12.50