Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import random
- print("Length of arrays is:")
- n=int(input())
- print("found number is:")
- f=int(input())
- founded=0
- arr1=list(range(n))
- arr2=list(range(n))
- arr3=list(range(n))
- for i in range(n):
- if i<n/2:
- arr1[i]=0
- else :
- arr1[i]=1
- if i%2==0:
- arr2[i]=0
- else :
- arr2[i]=1
- arr3[i]=random.randint(1,99)
- if arr3[i]==f:
- founded=1
- print(arr1)
- print(arr2)
- print(arr3)
- if founded==1:
- print("found number is founded")
- else :
- print("found number is not founded")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement