From 4f8ca7058cfd6d407176d949c82a6148dd63fad0 Mon Sep 17 00:00:00 2001 From: Techme2911 <72927509+Techme2911@users.noreply.github.com> Date: Thu, 15 Oct 2020 19:09:21 +0530 Subject: [PATCH] Update 2Exercise1Harry.py Hi, i give you a better format for the dictionary with few words. you can also add many more words. It is better and easy to understand. I will really appreciate if you accept my pull requests --- 2Exercise1Harry.py | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/2Exercise1Harry.py b/2Exercise1Harry.py index 1a9566c..f87690f 100644 --- a/2Exercise1Harry.py +++ b/2Exercise1Harry.py @@ -1,4 +1,17 @@ -dict = {"a": "1st letter", "b": "2nd letter", "c": "3rd letter", "d": " 4th letter"} -#x = input("Ask something from dict:") -#print(dict[x]) -print(dict[input("Ask something from dict:")]) +print("Welecome to Dictionary") + +Dictionary = {"Supine":"Failing to act or protest as a result of moral weakness or indolence", + "Solitude":"The state or situation of being alone", + "Clinomania":" An excessive desire to remain in bed; morbid sleepiness.", + "Siesta":"A short sleep,Nap","ubiquitous":"omnipresent or appearing or found everywhere"} +Words = ("Supine","Soltitude","Clinomania","Siesta, ubiquitous") +print("Available Words") +print([Words]) + +print("Copy your word from the above list and paste it below") + +inpstr = input() +print(Dictionary[inpstr]) + +print( ) +print("Thank you for using my Dictionary")