<jupyter_start><jupyter_text>**LIST**<jupyter_code>my_list = [4, 7, 0, 3, 4]
my_iter = iter(my_list)

print(next(my_iter))
print(next(my_iter))

print(my_iter.__next__())
print(len(my_list))
mean = 1
if len(my_list) > 1:
    for element in my_list:
        print(element)
        mean = mean + element
   

print(mean)
print('total mean :', int(mean/len(my_list)))<jupyter_output>4
7
0
3
4
19
total mean : 3<jupyter_text>Trapezoidal Rule<jupyter_code>from math import sin
from math import sin, pi
value = 0

def f(x):
  return x*sin(x)
  
a = 0 ## lower limit
b = pi/2 ## upper limit
n = 1000 ## number of division

## h value
h = (b - a) / n

## formula
S = 0.5 * (f(a) + f(b))

##
for i in range(1, n):
  S = S +  f(a + i*h)
Integral = h * S
print('Integral Value {}'.format(Integral))<jupyter_output>Integral Value 1.0000002056167847<jupyter_text>**Euler Method**<jupyter_code>from math import exp

def dy(x,y):
  return x*y

## Analytical Sollution
def f(x):
  return exp(x**2/2)

## starting and final value of x
x = 0
xn = 2

## Initial value of y
y = 1

## Step Size
h = 0.5

## Total number of steps
n = int((xn - x)/h)

## header
print('x  \t\t  y(Euler) \t\t  y(Analytical)')
print('{0}  \t\t {1} \t\t  {2}'.format(x, y, f(x)))
for i in range(n):
  y += dy(x,y)*h ## calculate next h
  x += h        ## x increment
  print('{} \t\t {} \t\t {}'.format(x,y,f(x)))
## Tabular Format
num = 1
num2 = 2
print("Hello World {0} num {1}".format(num,num2))
# Solve the quadratic equation ax**2 + bx + c = 0

# import complex math module
import cmath

a = 1
b = 5
c = 6

# To take coefficient input from the users
# a = float(input('Enter a: '))
# b = float(input('Enter b: '))
# c = float(input('Enter c: '))

# calculate the discriminant
d = (b**2) - (4*a*c)

# find two solutions
sol1 = (-b-cmath.sqrt(d))/(2*a)
sol2 = (-b+cmath.sqrt(d))/(2*a)

print('The solution are {0} and {1}'.format(sol1,sol2))
# Solve the quadratic equation ax**2 + bx + c = 0

# import complex math module
import cmath

a = 1
b = 5
c = 6

# To take coefficient input from the users
# a = float(input('Enter a: '))
# b = float(input('Enter b: '))
# c = float(input('Enter c: '))

# calculate the discriminant
d = (b**2) - (4*a*c)

# find two solutions
sol1 = (-b-cmath.sqrt(d))/(2*a)
sol2 = (-b+cmath.sqrt(d))/(2*a)

print('The solution are {0} and {1}'.format(sol1,sol2))
num = 7
for i in range(1, num+1):
        factorial = factorial*i
        print('the factorial of ', factorial)
  
def your_name(numb):
  """
  modules print number above
  """
  print(numb)
  print('Hello WOrld')

  number = 5



  def mention_name(name):
    print('Blah')

    number = 5




number = 10
your_name(number)
# print(numb)
help(your_name)<jupyter_output>Help on function your_name in module __main__:

your_name(numb)
    modules print number above<jupyter_text>if condition == value:  print('Blah')elif condition != value:  print('blah blah')else:  print('Foo')<jupyter_code>variable = 5
a = 10
def expression(num):
  num = num + 1
  return num

a = 10
ans = expression(a)
from math import pi

print(pi)
from math import pi

def area_of_circle(radius):
  ans = pi * radius * radius
  return ans

def check(radius):
  if radius != 0:
    area_of_circle(radius)
  elif radius < 0:
    print()

print("area of the circle is ",area_of_circle(10))<jupyter_output>area of the circle is  314.1592653589793
{'fraction_non_alphanumeric': 0.16230677764565993, 'fraction_numerical': 0.03596908442330559, 'mean_word_length': 3.6801112656467314, 'pattern_counts': {'":': 0, '<': 14, '<?xml version=': 0, '>': 14, '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': '4', 'dir': 'jupyter-structured-clean-dedup', 'id': '586011', 'license': 'Apache-2.0', 'n_tokens_mistral': 1438, 'n_tokens_neox': 1349, 'n_words': 390, 'path': 'jupyter/Numerical_Python_class.ipynb', 'repo_name': 'Prady96/DUDIC', 'size': '3364'}