Why does every time I try to change the variable into a flaot it doesn't work pls help me! | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
+ 1

Why does every time I try to change the variable into a flaot it doesn't work pls help me!

https://sololearn.com/compiler-playground/cq8x9BRfOfmo/?ref=app

1st May 2024, 6:04 PM
Abu ANTAR
Abu ANTAR - avatar
2 Respostas
+ 9
Abu ANTAR , there are some issue to fix: > the `price..` variables are strings that contain digits and also the currency (ā‚¬) symbol. remove the currency from the `price..` variables, and use int values or float values if you like. > now we can do a calculation wth the the `price` variables > for the output it is recommended to use f- strings. this enables us to manage the appearance of the digital places from the values and also the currency symbol in general the complete code looks a bit too verbose with all the print() statements
1st May 2024, 6:24 PM
Lothar
Lothar - avatar
+ 2
1st May 2024, 8:38 PM
Junior
Junior - avatar