• 0 Posts
  • 2 Comments
Joined 11 months ago
cake
Cake day: August 2nd, 2023

help-circle
  • Many people have given you answers of varying lengfhs, so I feel free to ask my counter-question…

    You say you had int() and float() but would do you assume would happen if you had just replaced ‘input(Who are you?)’ with ‘int(7)’? What value would be assigned to name if the statement was ‘nam = int(7)’?

    Following the logic you’re espousing in the OP, ‘nam’ would be equal to the string “int(7)” and the print statement would output “Welcome int(7)”. Either you understand why that wouldn’t be the case and should see why your original example works. Or you don’t and you should double check your understanding of functions and keep tapping people here for help.