Horje
f string float format Code Example
f-string ponto decimal python
valor_hora_trabalho = float(input("Valor por hora trabalhada: "))
horas_trabalhadas = float(input("Horas trabalhadas: "))

salario  = valor_hora_trabalho * horas_trabalhadas

print(f"Salário do mês: R${salario:.2f}")
f string float format
>>> a = 10.1234
>>> f'{a:.2f}'
'10.12'
f string decimal places
>>> a = 10.1234
>>> f'{a:.2f}'
'10.12'




Python

Related
count similar values in list python Code Example count similar values in list python Code Example
how to return the derivative of a function in python Code Example how to return the derivative of a function in python Code Example
get list input from user in python Code Example get list input from user in python Code Example
print whole dataframe python Code Example print whole dataframe python Code Example
how to clear the console python Code Example how to clear the console python Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
7