joeyajames / Python

Python code for YouTube videos.
MIT License
1.64k stars 1.35k forks source link

Updation in TempConversation.py #155

Open Soyvor opened 6 months ago

Soyvor commented 6 months ago

Function and Variable Naming: Changed function names and variable names to follow Python's naming conventions (snake_case).

Input Parsing: Changed eval to float for parsing input to ensure safer evaluation of user input.

Output Formatting: Used f-strings for cleaner and more readable output formatting.

Choice Comparison: Changed the comparison to strings ('1', '2', '3') instead of integers to match the input type.

Exit Condition: Changed the exit condition to compare the choice with a string '3' instead of an integer 3.

Main Guard: Added if name == "main": guard to ensure that main() function is executed only when the script is run directly, not when it's imported elsewhere. This is a common best practice in Python.