File size: 1,180 Bytes
6dbbe29 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
{
"nbformat": 4,
"nbformat_minor": 0,
"metadata": {
"colab": {
"provenance": []
},
"kernelspec": {
"name": "python3",
"display_name": "Python 3"
},
"language_info": {
"name": "python"
}
},
"cells": [
{
"cell_type": "code",
"execution_count": 24,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "Cqh1q7nRxxKa",
"outputId": "d9891e4f-5352-48bb-8a45-26d52f701ee1"
},
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"dot605 (717) 466-1813\n"
]
}
],
"source": [
"import random\n",
"\n",
"def generate_phone_number():\n",
" area_code = random.randint(100,999)\n",
" exchange_code = random.randint(100,999)\n",
" subscriber_number = random.randint(1000,9999)\n",
" return f\"({area_code}) {exchange_code}-{subscriber_number}\"\n",
"\n",
"phone_number = generate_phone_number()\n",
"print(\"dot605\", generate_phone_number())"
]
}
]
} |