Write A Programme In Python To Print Twinkle-Twinkle Little Star Poem? Code: print ( '''Twinkle, twinkle, little star How I wonder what you are Up above the world so high Like a diamond in the sky''' ) Output : Download Source Code
Write A Python Program, Create n Empty Dictionary Allow 4 Friends To, Enter Their Favorite Programming Language As values and User Keys as their Name Assume That The Names Are Unique. Code: FavLang = {} a = input ( "Enter your Favorite Language Raka : \n " ) b = input ( "Enter your Favorite Language Rama : \n " ) c = input ( "Enter your Favorite Language Raaj : \n " ) d = input ( "Enter your Favorite Language Raja : \n " ) FavLang [ "Raja" ] = d FavLang [ "Raka" ] = a FavLang [ "Rama" ] = b FavLang [ "Raaj" ] = c print ( FavLang ) Output: Enter your Favorite Language Raka : Python Enter your Favorite Language Rama : C Enter your Favorite Language Raaj : C# Enter your Favorite Language Raja : Java {'Raja': 'Java', 'Raka': 'Python', 'Rama': 'C', 'Raaj': 'C#'} Download Code
Write Python Program To Store Seven Fruits Name In a List Enter By The User. Code: fruit1 = input ( "Enter Fruit Number 1: " ) fruit2 = input ( "Enter Fruit Number 2: " ) fruit3 = input ( "Enter Fruit Number 3: " ) fruit4 = input ( "Enter Fruit Number 4: " ) fruit5 = input ( "Enter Fruit Number 5: " ) fruit6 = input ( "Enter Fruit Number 6: " ) fruit7 = input ( "Enter Fruit Number 7: " ) Fruits = [ fruit1 , fruit2 , fruit3 , fruit4 , fruit5 , fruit6 , fruit7 ] print ( Fruits ) Output: Download Source Code
Comments
Post a Comment