Bottom Page

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 Function Execution Times
#1
Hi,
If we want that any Python Function should work only once or twice then how can be done the same?
Thanks
Quote
#2
run once or twice.
Please explain a bit better and receive a better answer.
sunnyarora likes this post
Quote
#3
import random

def any_python_function(something):
    print(something)


once_or_twice = random.choice((1,2))

for times in range(once_or_twice):
    any_python_function(once_or_twice)
sunnyarora likes this post
Quote
#4
I want to execute the program in in two parts

first;
We input the password from user and store aside.

second ;
We again input password to give them access if first input password matches with second.

Thanks
Quote

Top Page

Possibly Related Threads...
Thread Author Replies Views Last Post
  Calling the function to change the times chris0147 6 1,646 Aug-30-2017, 12:40 AM
Last Post: chris0147

Forum Jump:


Users browsing this thread: 1 Guest(s)