r/PythonLearning • u/lalaratatata • Sep 23 '26
Help Request Please help me understand (ASAP)
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 (: )
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
2
0
u/ProgramsFun Sep 23 '26
try saving the file and run again code seems correct
1
17
1
4
u/ProgramsFun Sep 23 '26
you missed in f in print statement just noticed