Floats | Sololearn: Learn to code for FREE!
¡Nuevo curso! ¡Todo programador debería aprender IA Generativa!
Prueba una lección gratuita
0

Floats

Why can’t I use a division sign when using float Print(float(-33.5) \ float(2.3))

21st Jun 2019, 9:26 AM
Oketunbi Olatunji
Oketunbi Olatunji - avatar
5 Respuestas
+ 4
You can use this: print(-33.5 / 2.3) please note: (1) python is case sensitve, so print() should be in lower case letters (2) your numbers are already floats so they don't need to be converted to floats before division hope this helps
21st Jun 2019, 10:01 AM
Lothar
Lothar - avatar
+ 3
What programming language you want to use? And please - show us your code sample.
21st Jun 2019, 9:31 AM
Lothar
Lothar - avatar
+ 3
Division sign is /
21st Jun 2019, 9:50 AM
Vlad Serbu
Vlad Serbu - avatar
21st Jun 2019, 5:55 PM
Seb TheS
Seb TheS - avatar
+ 1
The error in your code is about that you are using backslash instead of forwardslash for division. Backslashes should only be used in strings. Do not confuse / and \.
21st Jun 2019, 5:57 PM
Seb TheS
Seb TheS - avatar