Skip to content

Commit

Permalink
Merge pull request #228 from sujith-rek/feat/add-TWP40-py
Browse files Browse the repository at this point in the history
feat: added python example for Temperature conversion
  • Loading branch information
NicolasSandoval authored Mar 12, 2024
2 parents d3289e3 + 436dda4 commit 2b47f8b
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions _sources/lectures/TWP40/TWP40_12.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,12 @@ Conversión de grados usando C
C = 5.0 * (F - 32.0) / 9.0;
printf("Celsius: %2.1f\n", C);
}
Conversión de grados usando Python
----------------------------------

.. code-block:: python
F = float(input("Farenheit: "))
C = 5.0 * (F - 32.0) // 9.0
print("Celsius: %2.1f" % C)

0 comments on commit 2b47f8b

Please sign in to comment.