Python Tutorial for Beginners |Import Math Functions in Python |code with Bushra

Publicado el: 27 octubre 2023
en el canal de: Code with Bushra
122
3

This Python code defines a function named "function" that takes two input arguments, 'a' and 'b'. Inside the function, it converts 'a' and 'b' to integers, performs several mathematical operations on them, including addition, subtraction, multiplication, and division, and stores the results in 'add', 'subtract', 'multiply', and 'divide' variables, respectively. The division result is stored as a float to retain decimal precision. The function then returns these four results as a tuple. Outside the function, the code prompts the user to enter two values for 'a' and 'b' using the "input" function. It then calls the "function" with these user-provided values and prints the tuple containing the results of the mathematical operations.

FOLLOW MY ACCOUNTS :
FACEBOOK:  / codewithbushra  
LINKEDIN:  / codewithbushra  


En esta página del sitio puede ver el video en línea Python Tutorial for Beginners |Import Math Functions in Python |code with Bushra de Duración hora minuto segunda en buena calidad , que subió el usuario Code with Bushra 27 octubre 2023, comparta el enlace con amigos y conocidos, en youtube este video ya ha sido visto 122 veces y le gustó 3 a los espectadores. Disfruta viendo!