Advertisement
Sergio_Istea

concatenado.py

Mar 30th, 2023
905
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.40 KB | None | 0 0
  1. #!/usr/bin/env python3
  2.  
  3. var_entero = 3
  4. var_float = 3.5
  5. result_exp= var_entero + var_float
  6.  
  7. var_entero_str = str(var_entero)
  8. var_float_str = str(var_float)
  9. result_exp_str = str(result_exp)
  10.  
  11. output_str = "El resultado de " + var_entero_str + " + " + var_float_str + " es " + result_exp_str
  12.  
  13. print(output_str)
  14.  
  15.  
  16. print( "el resultado de" + str(var_entero) + str(var_float) + "es" + str(result_exp))
  17.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement