About 1,170,000 results
Open links in new tab
  1. Python - How to take user input and use that in function

    Jun 18, 2016 · Python - How to take user input and use that in function Asked 9 years, 5 months ago Modified 1 year, 10 months ago Viewed 33k times

  2. python - is it possible to use input () in the body of a function ...

    Oct 28, 2021 · 2 Yes, you can put input calls inside a function body. It makes your function impure, which is not ideal from a functional programming point of view, but not every program …

  3. python - How to use a variable defined inside one function from …

    The simplest option is to use a global variable. Then create a function that gets the current word. Notice that to global variables inside a function, you do need to use the global keyword.

  4. python - How do you use input function along with def function?

    Jun 9, 2015 · Define a function smaller_num that takes in two numbers to determine and return the smaller number of the two. Ask user for two numbers Use the function to determine the …

  5. Why can't I use input() in Jupyter Notebook? - Stack Overflow

    May 6, 2020 · When I try to use the input () function in Jupyter Notebook, it looks like the notebook becomes unresponsive. For example when I try this code: print ('Enter your name:') …

  6. python - Using the output of a function as an input of another …

    Suppose i have function like this. def funA (a,b): if a>5: c=a+b if a<5: c=a-b return c So is it possible for me to use the variable C outside in another function like this?

  7. python - Getting a hidden password input - Stack Overflow

    By default, the password input will be fully invisible. If you want to show asterisks in place of the user typed password, use the echo_char parameter added in Python 3.14.

  8. python - Can I use a variable inside of an input statement? - Stack ...

    Oct 1, 2016 · Can I use a variable inside of an input statement? [duplicate] Asked 9 years, 2 months ago Modified 9 years, 2 months ago Viewed 47k times

  9. python - Using user input to call functions - Stack Overflow

    Sep 19, 2012 · I was trying to make a "game" in Python where the user inputs a command. However, I do not know whether you can take that input to be a function name. This is my …

  10. What does Python's eval() do? - Stack Overflow

    Eval function try to execute and interpret the string (argument) passed to it as python code. x=1 print (eval ('x+1')) Output of the above code will be 2. The disadvantage of such approach is …