Join Our WhatsApp Group Join Subscribe Now!

BPP 313011 Practical No.13: Create a program to demonstrate use of: Built-in module (e.g. numeric, mathematical functional and programming module) in Python

BPP 313011 Practical No.13: Create a program to demonstrate use of: Built-in module (e.g. numeric, mathematical functional and programming module) in

 BPP 313011 Practical No.13: Create a program to demonstrate use of: Built-in module (e.g. numeric, mathematical functional and programming module) in Python

Python's built-in modules for file handling and input/output (I/O) operations offer a wide range of tools and functions for reading, writing, and manipulating files and data streams. These modules are essential for working with files, whether for data processing, text manipulation, or data storage.

BPP 313011 Practical

Practical related Questions

1. Write the output of the following program.

import math
def circle_area(r):
return math.pi*r**2
radius = 3
print("Area =", circle_area(radius))

Answer:

Area = 28.274333882308138

2. Write the output of the following program.

import fractions
for deci in ['0.6', '2.5', '2.3', '4e-1']:
fract = fractions.Fraction(deci)
print(fract)

Answer:

3/5
5/2
23/10
2/5

Exercise

1. Write a Python script to calculate the DC output voltage(Vdc) of Half wave rectifier using Formula: Vdc=(Vm/π) where Vm is the peak value of output voltage using math module.

Answer:



2. Write a Python script to calculate the Area of cross section of the wire, A = π*d2 /4 = m2 where d is the diameter of wire.

Answer:


3. Write a Python Script by using statistics module to calculate mean (average value), median (middle value), mode (most often value), standard deviation (spread of values).

Answer:


About the Author

Hi everyone, I'm Suraj Diware, and I'm passionate about helping students succeed in MSBTE programs. This blog is dedicated to providing clear and concise explanations of MSBTE curriculum topics, along with practical tips and resources to sup…

Post a Comment

Cookie Consent
We serve cookies on this site to analyze traffic, remember your preferences, and optimize your experience.
Oops!
It seems there is something wrong with your internet connection. Please connect to the internet and start browsing again.
AdBlock Detected!
We have detected that you are using adblocking plugin in your browser.
The revenue we earn by the advertisements is used to manage this website, we request you to whitelist our website in your adblocking plugin.
Site is Blocked
Sorry! This site is not available in your country.