Help me output the code in on line | Sololearn: Learn to code for FREE!
¡Nuevo curso! ¡Todo programador debería aprender IA Generativa!
Prueba una lección gratuita
0

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 ("градусов Цельсия")

22nd Dec 2022, 3:06 AM
РИНА
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} градусов Цельсия')
22nd Dec 2022, 4:20 PM
Lothar
Lothar - avatar