Solution of Exercise 211: setof perfect square in python
Exercise 211 Write a Python program that returns the set of perfect square integers less than or equal to 100. Solution # function that tests if a number is a…
Python Courses & Exercises with solutions !
Exercise 211 Write a Python program that returns the set of perfect square integers less than or equal to 100. Solution # function that tests if a number is a…
Exercise 210 Resume the previous exercise (Exercise 209) without using the intersection() and union() methods. Solution A = {11, 21, 5, 7, 43, 32, 13, 9}B = {2, 19, 11,…
Exercise 209 Write a program in Python language that returns the intersection and the union of the following three sets: A = {11, 21, 5, 7, 43, 32, 13, 9}B…
Exercise 208 Write a program in Python that remove an element from a given set A without using the discard() or remove() methods. Solution # define a set AA =…
Exercise 207 Given a set A = { 'a', 'b', 'c', 'd' }. Write an algorithm in Python that adds an element 'x' to A without using the add() method.…
Exercise206 Given two sets A = {'a' , 'b' , 'c' , 'd'} and B = {'c' , 'e' , 'd' , 'h'}. Write a Python program that returns their…