<jupyter_start><jupyter_text>Question 1:Please write a program using generator to print the numbers which can be divisible by 5 and 7 between 0 and n in comma separated form while n is input by console.Example:If the following n is given as input to the program:100Then, the output of the program should be:0,35,70<jupyter_code>def gen(n):
    for i in range(0,n):
        if i%5 == 0 or i%7 == 0:
            j = i
            yield(j)
        
    
x = gen(10)
x.__next__()<jupyter_output><empty_output><jupyter_text>Question 2:Please write a program using generator to print the even numbers between 0 and n in comma separated form while n is input by console.Example:If the following n is given as input to the program:10Then, the output of the program should be:0,2,4,6,8,10<jupyter_code>def gen_(n):
    for i in range(0,n):
        if i%2 == 0:
            j = i
            yield(j)
x = gen_(10)
x.__next__()<jupyter_output><empty_output><jupyter_text>Question 3:The Fibonacci Sequence is computed based on the following formula:f(n)=0 if n=0f(n)=1 if n=1f(n)=f(n-1)+f(n-2) if n>1Please write a program using list comprehension to print the Fibonacci Sequence in comma separated form with a given n input by console.Example:If the following n is given as input to the program:7Then, the output of the program should be:0,1,1,2,3,5,8,13<jupyter_code>def fib(n):
    if n == 0:
        return (0)
    if n == 1:
        return (1)
    if n>1:
        return fib(n-1)+fib(n-2) 
    
n=int(input('Enter a number :')) 
values = [str(fib(x)) for x in range(0, n+1)]
values<jupyter_output>Enter a number :7<jupyter_text>Question 4:    Assuming that we have some email addresses in the "<EMAIL>" format, please write program to print the user name of a given email address. Both user names and company names are composed of letters only.Example:    If the following email address is given as input to the program:<EMAIL>Then, the output of the program should be:john<jupyter_code>email = input("Enter the email address : ").split('@')
company = str(email[1]).split('.')
print("User name : ",email[0])
print("Company name : ",company[0])<jupyter_output>Enter the email address : <EMAIL>
User name :  john
Company name :  google<jupyter_text>Question 5:Define a class named Shape and its subclass Square. The Square class has an init function which takes a length as argument. Both classes have a area function which can print the area of the shape where Shape's area is 0 by default.<jupyter_code>class Shape(object):
    def __init__(self):
        pass

    def area(self):
        return 0

class Square(Shape):
    def __init__(self, l):
        Shape.__init__(self)
        self.length = l

    def area(self):
        return self.length*self.length

objSquare= Square(5)
print(objSquare.area())<jupyter_output>25
{'fraction_non_alphanumeric': 0.096201632942847, 'fraction_numerical': 0.025914093006744764, 'mean_word_length': 3.776271186440678, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 23, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '5', 'dir': 'jupyter-structured-clean-dedup', 'id': '205002', 'license': 'MIT', 'n_tokens_mistral': 930, 'n_tokens_neox': 881, 'n_words': 351, 'path': 'Programming_Assingment_15.ipynb', 'repo_name': 'Shanu2092/Python-Basic-Programming-Assignment', 'size': '2850'}