Q. Write a program to generate 6 digit random secure OTP between 100000 to 999999.

 

Answer = 

 

import random
count = 1
while count <= 6 :
    num = random.randint(100000,999999)
    print("OTP =",num)
    count += 1



2 Comments

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

  1. its wrong we need only one OTP not 6
    this is right 👉
    import random
    num = random.randint(100000,999999)
    print("OTP =",num)

    ReplyDelete

Post a Comment

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

Previous Post Next Post