top of page
learn_data_science.jpg

Data Scientist Program

 

Free Online Data Science Training for Complete Beginners.
 


No prior coding knowledge required!

Telephone code App zone 6 (oceanic)

Generality

An international dialing code is a telephone prefix used in the telephone numbers of countries or regions that are members of the International Telecommunication Union. The area code indicates the country where the owner of the number is located


def phone_code_ocean(county):
  dic_code_ocean = {
    "Australia" :"61",
    "Fiji" :"679",
    "Marianas" :"1-670",
    "Niue" :"683",
    "New Caledonia": "687",
    "New Zealand" :"64",
    "Papua New Guinea" :"675",
    "French Polynesia" :"689",
    "Solomon Islands": "677"}
 return dic_code_ocean.get(county, "country not found")

Example of use

print(phone_code_ocean("Australia"))

out

 61

Example of use

print(phone_code_ocean("cameroon"))

out

country not found

important concepts in python

A dictionary in python is a kind of list but instead of using indexes, we use alphanumeric keys.

The get() method allows you to retrieve a value from a dictionary and if the key is not found you can give a value to return by default country not found

 
 
 

댓글


COURSES, PROGRAMS & CERTIFICATIONS

 

Advanced Business Analytics Specialization

Applied Data Science with Python (University of Michigan)

Data Analyst Professional Certificate (IBM)

Data Science Professional Certificate (IBM)

Data Science Specialization (John Hopkins University)

Data Science with Python Certification Training 

Data Scientist Career Path

Data Scientist Nano Degree Program

Data Scientist Program

Deep Learning Specialization

Machine Learning Course (Andrew Ng @ Stanford)

Machine Learning, Data Science and Deep Learning

Machine Learning Specialization (University of Washington)

Master Python for Data Science

Mathematics for Machine Learning (Imperial College London)

Programming with Python

Python for Everybody Specialization (University of Michigan)

Python Machine Learning Certification Training

Reinforcement Learning Specialization (University of Alberta)

Join our mailing list

Data Insight participates in affiliate programs and may sometimes get a commission through purchases made through our links without any additional cost to our visitors.

bottom of page