Professional Documents
Culture Documents
Section:- CSB-06
Q1)
import math
cylinder_area_and_volume(radius,length)
Output:-
Q2)
celsius = float(input("Enter temperature in Celsius: "))
Output:-
Q3)
feet = float(input("Enter distance in feet: "))
meter_per_foot = 0.3048
Output:-
Q4)
Output:-
Q5)
def is_prime(n):
if n <= 1:
return False
for i in range(2, n):
if n % i == 0:
return False
return True
def sum_of_primes(n):
prime_sum = 0
for i in range(2, n):
if is_prime(i):
prime_sum += i
return prime_sum
Output:-
Q6)
import math
Output:-
Q7)
mass = float(input("Enter the amount of water in kilograms: "))
temp_initial = float(input("Enter the initial temperature of the water in Celsius: "))
temp_final = float(input("Enter the final temperature of the water in Celsius: "))
Output:-