Jump to content

zak100

Senior Members
  • Joined

  • Last visited

Everything posted by zak100

  1. Hi, I have got following regular expression: (bba U aab)* Is this similar to: (bba)* U (aab)* I think they are same, please guide me. Zulfi.
  2. Hi, Thanks for the comprehensive answer. I would try to understand it. Zulfi.
  3. Hi, I have written the following Python program: 1.a= ["a", "f", "bar", "b","a", "aaaaa"] 2.ind = {a[i]:i for i in range(len(a))} 3.print(ind) 4.print("ind['a']= {0}".format(ind['a'])) 5.print("a[5]= {0}, a[4]= {1}, a[3]= {2}, a[2] = {3}, a[1] = {4}, a[0]= {5}".format(a[5],a[4], a[3], a[2], a[1], a[0])) output is: Line #1 , I can understand, we are creating an array of 6 elements, starting index is 0 and end index is 5. I can’t understand following things in line#2: a) what is the purpose of ‘ind’ variabel? b) What is the purpose of curly bracket in line#2 c)What is the purpose of colon in line#2 d) Which statements are under the impact of ‘for’ loop and how will we know that the scope of ‘for’ loop has ended? e) There are two enteries for ‘a’ in the array, why I am getting the index for “ind[‘a’] as 4. Somebody please guide me Zulfi.
  4. Hi, I was reading an article related to MonteCarlo Method. The link of the article is: http://ib.berkeley.edu/labs/slatkin/eriq/classes/guest_lect/mc_lecture_notes.pdf I found the equation in the following attached image. 1)In the equation related to the attached image, we are assigning a value to a function. What does this mean? 2)What the expected function will do with this value? 3)Please guide me by providing examples of function fX(ꭓ), E(g(X)) and g(ꭓ). Zulfi.

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.