Learn Python Training from the Best Tutors

  • Affordable fees
  • 1-1 or Group class
  • Flexible Timings
  • Verified Tutors

Search in

Facebook Analytics

03/09/2019 0 0

Assume how the Facebook application will store the millions of customer's record in real-time:

facebook = {
'jose': {
'name': 'jose', 'age': 33,
'hobby': ['cricket', 'python'], # cricket,football
'mobile': 1111111111, 'email': 'joset@gmail.com',
'pages': {
'python': {'sudha', 'priyanka'},
'BusinessMantra': {'sudha', 'oviya'}
'sudha': {
'name': 'sudha', 'age': 32, 'hobby': ['Khabadi', 'Movies', chess'],
'mobile': 2222222222, 'email': 'sudha.ram@gmail.com',
'python':{'sudha', 'lok'},
'furnitures': {'chris', 'priyanka'}
'lok': {
'name': 'lok', 'age': 26, 'hobby': ['python','football'],
'mobile': 3333333333, 'email': 'lok123@gmail.com',
'python':{'chris', 'priyanka', 'jose'}
'priyanka': {
'name': 'priyanka', 'age': 26, 'hobby': 'football',
'mobile': 4444444444, 'email': 'pravi@gmail.com',
'pages':{'python':{'chris', 'jose'}}
'chris': {
'name': 'chris', 'age': 35, 'hobby': 'football',
'mobile': 5555555555, 'email': 'christopher.e@gmail.com',


If you look closely, the above stores 5 persons information in a structured form. Moreover, we can have any value as any type as to learn as much as of python-datatypes, in other terms, the main motive of storing in this structure is to learn all the data-types of python.

Assignment I(Store data):

  1. You have to allow fb-customer to enter multiple hobbies with comma separator(,) and you have to store them as a list in db.
    Ex: 'jose': {'name': 'jose', 'age': '33', 'hobby': ['cricket', 'python']
  2. Sync Contacts: Basically facebook(Messenger) will sync all your contacts to it's database. Here, the user will enter all his contacts(mobile numbers) with comma separator, that you have to store as a list like below,
    input: '6666666666,3333333333,4444444444' and store it in db like the below,
  3. Validate the input of mobile number as 10-digit(Ex:9876543210), ask repeatedly if they enter invalid input.
    Ex: Enter you mobile number:88 (if the user entered non 10-digit number, ask them correct mobile number until the valid input)
    Enter valid mobile number: 9876543210
  4. Validate the Email-id with the format of Gmail account
  5. Get the Age and Mobile number as integer input
  6. A customer can run any number of pages, add an item as the above sample into their database with the pages and it's followers(set datatype)

Assignment II(Read operation):

  1. Find the person who has the hobby same as I am looking: List all the customer who has cricket as hobby
  2. Find the Target group for digital advt: A customer approaching FB to promote his page. How will they find the intended audience for the page-suggestion?
    Ex: I wants to promote my 'Python Development&Automation' page, then how will you pick the right person for my page among the millions of user-profile exist in the fb db.
  3. Suggest Friend: We usually get friend suggestion from facebook analytics. Have you ever wonder how does it work..? Let's simulate this.
    As you know the pattern of stored data(facebook), you can classify the category like(same School/Company/Community/Birthplace/CurrentLocation/Contacts)
  4. When the customer posting a status on their page, we have to let this know to all the followers
    Ex: sudha wants to post the status in his ‘furnitures’ page, notify this to all it's followers


0 Dislike
Follow 2

Please Enter a comment


Other Lessons for You

5 Key Benefits of Internship
As many of my connects are about to complete their graduation and post graduation, its been my good advice to them to find internship. Let me throw some light in this article on that area. An internship...

Shekhar Pawar

0 0

Bit-wise operators
Operation Syntax Function Bitwise And a & b and_(a, b) Bitwise Exclusive Or a ^ b xor(a, b) Bitwise Inversion ~ a invert(a) Bitwise Or a b or_(a, b) Left...

Selenium Testing
Many, perhaps most, software applications today are written as web-based applications to be run in an Internet browser. The effectiveness of testing these applications varies widely among companies and...

Python Dictionary
Python dictionary is an unordered collection of items. While other compound datatypes have only value as an element, a dictionary has a key: value pair. Dictionaries are optimized to retrieve values when...

Learn Python : Formatting with the .format () method
A good way to format objects into your strings for print statements is with the string.format() method. The syntax is :'String here {} then also {}'.format('something1','something2')Example 1:print("This...

Biswanath Banerjee

0 1

Looking for Python Training Classes?

The best tutors for Python Training Classes are on UrbanPro

  • Select the best Tutor
  • Book & Attend a Free Demo
  • Pay and start Learning

Learn Python Training with the Best Tutors

The best Tutors for Python Training Classes are on UrbanPro

Book a Free Demo

This website uses cookies

We use cookies to improve user experience. Choose what cookies you allow us to use. You can read more about our Cookie Policy in our Privacy Policy

Accept All
Decline All

UrbanPro.com is India's largest network of most trusted tutors and institutes. Over 55 lakh students rely on UrbanPro.com, to fulfill their learning requirements across 1,000+ categories. Using UrbanPro.com, parents, and students can compare multiple Tutors and Institutes and choose the one that best suits their requirements. More than 7.5 lakh verified Tutors and Institutes are helping millions of students every day and growing their tutoring business on UrbanPro.com. Whether you are looking for a tutor to learn mathematics, a German language trainer to brush up your German language skills or an institute to upgrade your IT skills, we have got the best selection of Tutors and Training Institutes for you. Read more