Functions Programs
Functions Programs
Functions Programs
if choice == '1':
print(num1,"+",num2,"=", add(num1,num2))
import cmath
a=1
b=5
c=6
# a = float(input('Enter a: '))
# b = float(input('Enter b: '))
# c = float(input('Enter c: '))
d = (b**2) - (4*a*c)
sol1 = (-b-cmath.sqrt(d))/(2*a)
sol2 = (-b+cmath.sqrt(d))/(2*a)
terms = 10
for i in range(terms):
print(random.randint(0,9))
or
import random
# will be printed
for x in range(10):