This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | print('Hello World!') | |
| s = input('What is your name?\n') | |
| print(f'Hello, {s}') | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | # -*- coding: utf-8 -*- | |
| """ | |
| Created on Sat Jun 11 10:57:33 2022 | |
| @author: Amar Doshi | |
| """ | |
| def is_palindrome(var): | |
| if type(var) is not str: | |
| var = str(var) | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | def fibo(): | |
| ''' | |
| Infinite Fibonacci sequence generator | |
| f = fibo() | |
| Generate number with: next(f) | |
| ''' | |
| p, q = 0, 1 | |
| while True: | |
| p, q = q, p + q | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | def fizzBuzz(n): | |
| for i in range(1, n + 1): | |
| three = (i % 3 == 0) | |
| five = (i % 5 == 0) | |
| if three and five: | |
| print('FizzBuzz') | |
| elif three: | |
| print('Fizz') | |
| elif five: | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | def collatz(n): | |
| if n < 1: | |
| raise ValueError("Only positive integers are allowed") | |
| s = [n] | |
| while n > 1: | |
| if n % 2 == 0: | |
| n //= 2 | |
| else: |