Skip to content

Commit 8062dcc

Browse files
committed
Finished P2M1 Practice
1 parent dc122cf commit 8062dcc

1 file changed

Lines changed: 27 additions & 3 deletions

File tree

Python Fundamentals/Module_1.1_Practice_Python_Fundamentals.ipynb

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -572,13 +572,37 @@
572572
},
573573
{
574574
"cell_type": "code",
575-
"execution_count": null,
575+
"execution_count": 45,
576576
"metadata": {},
577-
"outputs": [],
577+
"outputs": [
578+
{
579+
"name": "stdout",
580+
"output_type": "stream",
581+
"text": [
582+
"Enter a 1-sentence quote. four score and seven years ago\n",
583+
"score\n",
584+
"seven\n",
585+
"years\n"
586+
]
587+
}
588+
],
578589
"source": [
579590
"# [] create words after \"G\"\n",
580591
"# sample quote \"Wheresoever you go, go with all your heart\" ~ Confucius (551 BC - 479 BC)\n",
581-
"\n"
592+
"\n",
593+
"def g_words():\n",
594+
" word = \"\"\n",
595+
" u_phrase = input(\"Enter a 1-sentence quote. \")\n",
596+
" for i in u_phrase:\n",
597+
" if i.isalpha() == True:\n",
598+
" word = word + i\n",
599+
" else:\n",
600+
" if word[0] > \"g\":\n",
601+
" print(word)\n",
602+
" word = \"\"\n",
603+
" else:\n",
604+
" word = \"\"\n",
605+
"g_words()"
582606
]
583607
},
584608
{

0 commit comments

Comments
 (0)