1. Create a tuple and find the minimum and maximum number from it. t= (100,200,-25,300,400) print "Max value element : ", max(t) print "Max value element : ", min(t)
2. Write a Python program to find the repeated items of a tuple.
t = (1, 2, 3, 4, 2, 7, 8, 8, 3,6,9,6); print("Repeated elements in given array: "); for i in range(0, len(t)): for j in range(i+1, len(t)): if(t[i] == t[j]): print(t[j]);
3. Write a Python program to print the number in words for Eg.
1234=>One Two Three Four num = input ("Enter a Number = ") dic = { "0" : "Zero" , "1":"One " , "2" : "Two" , "3" : "Three" , "4" : "Four" , "5" : "Five" , "6" : "Six" , "7" : "Seven" , "8" : "Eight" , "9" : "Nine"} for i in num: print(dic[i],end=" ")
Learn Python Programming for Beginners: Best Step-by-Step Guide for Coding with Python, Great for Kids and Adults. Includes Practical Exercises on Data Analysis, Machine Learning and More.
Microsoft 365 Guide to Success: 10 Books in 1 | Kick-start Your Career Learning the Key Information to Master Your Microsoft Office Files to Optimize Your Tasks & Surprise Your Colleagues | Access, Excel, OneDrive, Outlook, PowerPoint, Word, Teams, etc.
Microsoft PowerPoint Guide for Success: Learn in a Guided Way to Create, Edit & Format Your Presentations Documents to Visual Explain Your Projects & Surprise Your Bosses And Colleagues | Big Four Consulting Firms Method
Microsoft Excel Guide for Success: Transform Your Work with Microsoft Excel, Unleash Formulas, Functions, and Charts to Optimize Tasks and Surpass Expectations [II EDITION]
Modern Tkinter for Busy Python Developers: Quickly Learn to Create Great Looking User Interfaces for Windows, Mac and Linux Using Python's Standard GUI Toolkit