¡Nuevo curso! ¡Todo programador debería aprender IA Generativa!
Prueba una lección gratuita0
Help me output the code in on line
How to write correctly the last three lenses of code in one line. print ("Это программа преобразует градусы Фаренгейта в гралусы Цельсия.") print (" Введите температуру в градусах Фаренгейта:"), fahrenheit = int(input()) celsius = (fahrenheit - 32) * 5 // 9 print ("это") print (celsius ) print ("градусов Цельсия")
1 Respuesta
+ 5
РИНА ,
instead of printing 3 lines or concatening we can also use f-string notation.
inside the qotes we can print any text, or we can output the content of variables or expressions by enclosing them with *curly brackets* like { }
...
print(f'это {celsius} градусов Цельсия')