The document contains 8 Python code snippets that demonstrate different programming concepts:
1. Temperature conversion program with if/else conditional statements
2. Area calculation program for different shapes using functions
3. Percentage calculation and grade assignment program using if/else conditional statements
4. Fibonacci series generation using loops
5. Factorial calculation using loops and functions
6. Series summation program using if/else conditional statements
7. Histogram plotting using matplotlib package
8. Sine and cosine curve plotting on the same graph using matplotlib package
Python Programming Course Lecture by IoT Code Lab Training.
Discussed Topic:
Chapter 1: Basic Programming
* Operator
* Arithmetic Operation Example
* Assignment Operation Example
* Built in Function Example
* Math Module Example
* Other Operators
* Practice Problem 1.1
* Practice Problem 1.2
* Practice Problem 1.3
Blazing Fast, Pure Effects without Monads — LambdaConf 2018John De Goes
Effect monads like IO are the way functional programmers interact with the real world. Yet, monadic effects in programming languages like Scala often perform poorly compared to their Haskell counterparts—as much as 10x slower in some benchmarks. In this presentation, John A. De Goes, author of the Scalaz 8 effect system, dredges up an old paper to cast new light on the question of how to model effects, and comes to the surprising conclusion that in Scala, monads may not be the fastest way to model purely functional effects. Join John as he shows a new model of effects that offers performance improvements without sacrificing the wonderful purity that functional programmers rely on to reason about their software.
Python Programming Course Lecture by IoT Code Lab Training.
Discussed Topic:
Chapter 1: Basic Programming
* Operator
* Arithmetic Operation Example
* Assignment Operation Example
* Built in Function Example
* Math Module Example
* Other Operators
* Practice Problem 1.1
* Practice Problem 1.2
* Practice Problem 1.3
Blazing Fast, Pure Effects without Monads — LambdaConf 2018John De Goes
Effect monads like IO are the way functional programmers interact with the real world. Yet, monadic effects in programming languages like Scala often perform poorly compared to their Haskell counterparts—as much as 10x slower in some benchmarks. In this presentation, John A. De Goes, author of the Scalaz 8 effect system, dredges up an old paper to cast new light on the question of how to model effects, and comes to the surprising conclusion that in Scala, monads may not be the fastest way to model purely functional effects. Join John as he shows a new model of effects that offers performance improvements without sacrificing the wonderful purity that functional programmers rely on to reason about their software.
A New Double Numerical Integration Formula Based On The First Order DerivativeIRJESJOURNAL
ABSTRACT: A new double numerical integration formula based on the value of integrated function and first order derivative of the integrable function was proposed. Different from the traditional mechanical quadrature formula, contibuted integral function and first order derivative of the integral function. Four nodes are selected appropriately in the integral interval. Used the value of function and first order derivative, constructed a new numerical integration formula that achieve seven order algebraic precision. Then analysed the algebraic precision、 remainder、stypticity and stability of the formula. Then generalized the formula into double integral. In the end, according to the two typical examples vertified the formula’s validity and fesibility. This formula enrich the content of numerical calculation. Provided a new method for solving double numerical integrations.
With my simple implementation I wanted to demonstrate the basic ideas of th IO Monad.
My impl of the IO Monad is just a feasibility study, not production code!
When coding my impl of IO I was very much inspired by cats.effect.IO and monix.eval.Task which I studied at that time. Both are implementions of the IO Monad.
The API of my IO is very similar to the basics of Monix Task. This IO implementation also helped me to understand the IO Monad (of cats-effect) and Monix Task.
Interop with Future is also supported. You can convert IO to a Future. Vice versa you can convert a Future to an IO.
The development of my impl can be followed step by step in the code files in package iomonad.
A New Double Numerical Integration Formula Based On The First Order DerivativeIRJESJOURNAL
ABSTRACT: A new double numerical integration formula based on the value of integrated function and first order derivative of the integrable function was proposed. Different from the traditional mechanical quadrature formula, contibuted integral function and first order derivative of the integral function. Four nodes are selected appropriately in the integral interval. Used the value of function and first order derivative, constructed a new numerical integration formula that achieve seven order algebraic precision. Then analysed the algebraic precision、 remainder、stypticity and stability of the formula. Then generalized the formula into double integral. In the end, according to the two typical examples vertified the formula’s validity and fesibility. This formula enrich the content of numerical calculation. Provided a new method for solving double numerical integrations.
With my simple implementation I wanted to demonstrate the basic ideas of th IO Monad.
My impl of the IO Monad is just a feasibility study, not production code!
When coding my impl of IO I was very much inspired by cats.effect.IO and monix.eval.Task which I studied at that time. Both are implementions of the IO Monad.
The API of my IO is very similar to the basics of Monix Task. This IO implementation also helped me to understand the IO Monad (of cats-effect) and Monix Task.
Interop with Future is also supported. You can convert IO to a Future. Vice versa you can convert a Future to an IO.
The development of my impl can be followed step by step in the code files in package iomonad.
Similar to Lab 3 Python Programming Lab 1-8 MKU.pdf (20)
The Roman Empire A Historical Colossus.pdfkaushalkr1407
The Roman Empire, a vast and enduring power, stands as one of history's most remarkable civilizations, leaving an indelible imprint on the world. It emerged from the Roman Republic, transitioning into an imperial powerhouse under the leadership of Augustus Caesar in 27 BCE. This transformation marked the beginning of an era defined by unprecedented territorial expansion, architectural marvels, and profound cultural influence.
The empire's roots lie in the city of Rome, founded, according to legend, by Romulus in 753 BCE. Over centuries, Rome evolved from a small settlement to a formidable republic, characterized by a complex political system with elected officials and checks on power. However, internal strife, class conflicts, and military ambitions paved the way for the end of the Republic. Julius Caesar’s dictatorship and subsequent assassination in 44 BCE created a power vacuum, leading to a civil war. Octavian, later Augustus, emerged victorious, heralding the Roman Empire’s birth.
Under Augustus, the empire experienced the Pax Romana, a 200-year period of relative peace and stability. Augustus reformed the military, established efficient administrative systems, and initiated grand construction projects. The empire's borders expanded, encompassing territories from Britain to Egypt and from Spain to the Euphrates. Roman legions, renowned for their discipline and engineering prowess, secured and maintained these vast territories, building roads, fortifications, and cities that facilitated control and integration.
The Roman Empire’s society was hierarchical, with a rigid class system. At the top were the patricians, wealthy elites who held significant political power. Below them were the plebeians, free citizens with limited political influence, and the vast numbers of slaves who formed the backbone of the economy. The family unit was central, governed by the paterfamilias, the male head who held absolute authority.
Culturally, the Romans were eclectic, absorbing and adapting elements from the civilizations they encountered, particularly the Greeks. Roman art, literature, and philosophy reflected this synthesis, creating a rich cultural tapestry. Latin, the Roman language, became the lingua franca of the Western world, influencing numerous modern languages.
Roman architecture and engineering achievements were monumental. They perfected the arch, vault, and dome, constructing enduring structures like the Colosseum, Pantheon, and aqueducts. These engineering marvels not only showcased Roman ingenuity but also served practical purposes, from public entertainment to water supply.
Unit 8 - Information and Communication Technology (Paper I).pdfThiyagu K
This slides describes the basic concepts of ICT, basics of Email, Emerging Technology and Digital Initiatives in Education. This presentations aligns with the UGC Paper I syllabus.
How to Make a Field invisible in Odoo 17Celine George
It is possible to hide or invisible some fields in odoo. Commonly using “invisible” attribute in the field definition to invisible the fields. This slide will show how to make a field invisible in odoo 17.
2024.06.01 Introducing a competency framework for languag learning materials ...Sandy Millin
http://sandymillin.wordpress.com/iateflwebinar2024
Published classroom materials form the basis of syllabuses, drive teacher professional development, and have a potentially huge influence on learners, teachers and education systems. All teachers also create their own materials, whether a few sentences on a blackboard, a highly-structured fully-realised online course, or anything in between. Despite this, the knowledge and skills needed to create effective language learning materials are rarely part of teacher training, and are mostly learnt by trial and error.
Knowledge and skills frameworks, generally called competency frameworks, for ELT teachers, trainers and managers have existed for a few years now. However, until I created one for my MA dissertation, there wasn’t one drawing together what we need to know and do to be able to effectively produce language learning materials.
This webinar will introduce you to my framework, highlighting the key competencies I identified from my research. It will also show how anybody involved in language teaching (any language, not just English!), teacher training, managing schools or developing language learning materials can benefit from using the framework.
Operation “Blue Star” is the only event in the history of Independent India where the state went into war with its own people. Even after about 40 years it is not clear if it was culmination of states anger over people of the region, a political game of power or start of dictatorial chapter in the democratic setup.
The people of Punjab felt alienated from main stream due to denial of their just demands during a long democratic struggle since independence. As it happen all over the word, it led to militant struggle with great loss of lives of military, police and civilian personnel. Killing of Indira Gandhi and massacre of innocent Sikhs in Delhi and other India cities was also associated with this movement.
Read| The latest issue of The Challenger is here! We are thrilled to announce that our school paper has qualified for the NATIONAL SCHOOLS PRESS CONFERENCE (NSPC) 2024. Thank you for your unwavering support and trust. Dive into the stories that made us stand out!
1. def main():
print('enter the option')
print('1: celsius to fahrenheit')
print('2: fahrenheit to celsius')
o=int(input('emter the option'))
if(o==1):
c=float(input('emter celsius'))
f=float((9.0/5.0))*c+32
print('fharenheit',f)
else:
f=float(input('enter fharenheit'))
c=float(5.0/9.0)*(f-32.0)
print('celsius',c)
if __name__=='__main__':
main()
1.TEMPERATURE CONVERSION
Print Function & Input Function
Fahrenheit Declared Function
Fahrenheit Declared Function
if…else function
Call Main Funtion
Mr. V. VEERANAN, M.Sc. Computer Science., Dip.in.Yoga.,
2. def areasquare(a):
area=a*a
return(area)
def arearectangle(l,b):
a=l*b
return(a)
def areacircle(r):
import math
a1=math.pi*r*r
return(a1)
def areatriangle(b,h):
a2=float(0.5*b*h)
return(a2)
def main():
print('enter your option')
print('1. enter area of square')
print('2. enter area of rectangle')
print('3. enter area of circle')
print('4. enter area of triangle')
1 2
2.AREA OF THE SHAPES
Square
Rectangle
Circle
Triangle
Print Function
Mr. V. VEERANAN, M.Sc. Computer Science., Dip.in.Yoga.,
3. o=int(input('enter your option'))
if(o==1):
a=int(input('enter area'))
x=areasquare(a)
print('area of square',x)
elif(o==2):
l1=int(input('enter length'))
b1=int(input('enter breath'))
y=arearectangle(l1,b1)
print('area of rectangel',y)
elif(o==3):
r=int(input('enter a circle'))
z=areacircle(r)
print('area of circle',z)
elif(o==4):
b1=int(input('enter the breath'))
h1=float(input('enter the heigth'))
aa=areatriangle(b1,h1)
print('area of triangle',aa)
if __name__=='__main__':
main()
3 4
2. AREA OF THE SHAPES
Square
Rectangle
Circle
Triangle
Mr. V. VEERANAN, M.Sc. Computer Science., Dip.in.Yoga.,
4. def main():
print('enter the marks')
m1=float(input('tamil'))
m2=float(input('english'))
m3=float(input('computer'))
t=m1+m2+m3
p=(t/300)*100
print('mark obtained in tamil',m1)
print('mark obtained in english',m2)
print('mark obtained in computer',m3)
print('total marks in 3 subjects',t)
print('percentage',p)
if(p>=80):
print('grade A')
elif(p>70 and p<80):
print('grade B')
elif(p>60 and p<70):
print('grade C')
elif(p>40 and p<60):
print('grade d')
elif(p<40):
print('grade E')
if __name__=='__main__':
main()
3. PERCENTAGE
Print & Marks
Print
Grade A
Grade B
Grade C
Grade D
Grade E
Mr. V. VEERANAN, M.Sc. Computer Science., Dip.in.Yoga.,
5. def main():
print('fibonacci series')
n=int(input('enter the range'))
a=1
b=2
print(a)
print(b)
for i in range(n+1):
c=a+b
print(c)
a=b
b=c
if __name__=='__main__':
main()
4. FIBONACCI SERIES
Print & Declare
Print Range
Mr. V. VEERANAN, M.Sc. Computer Science., Dip.in.Yoga.,
6. def main():
n=int(input('enter the factorial of number:'))
fact=1
for i in range(1,n+1):
fact=fact*1
print('factorial of the number %d is %d',(n,fact))
if __name__=='__main__':
main()
5. FACTORIAL PROGRAM
Input
Print range
Mr. V. VEERANAN, M.Sc. Computer Science., Dip.in.Yoga.,
7. def facto(n):
fact=1
for i in range(1,n+1):
fact=fact*i
return fact
def main():
n=int(input('enter the value'))
sum=0.0
for i in range(1,n+1):
if(i%2==0):
sum=float(sum)-float(i)/float(facto(i))
else:
sum=float(sum)+float(i)/float(facto(i))
print('sum of the series',round(sum,3))
if __name__=='__main__':
main()
6. SUM OF SERIES
Mr. V. VEERANAN, M.Sc. Computer Science., Dip.in.Yoga.,
Range
Sum
if
else
8. import matplotlib.pyplot as plt
def plothistogram(data):
plt.hist(data)
plt.xlabel('value')
plt.ylabel('Frequency')
plt.title('histogram')
plt.xlim(min(data)-1,max(data)+1)
plt.show()
def main():
data=eval(input('enter data to be plotted as histogram:'))
plothistogram(data)
if __name__=='__main__':
main()
7. HISTOGRAM
Mr. V. VEERANAN, M.Sc. Computer Science., Dip.in.Yoga.,
Package
Value & Limed
Print
9. import matplotlib.pyplot as plt
import math
def sinecurve():
plt.subplot(2,1,1)
degrees=range(0,360+1)
sinevalues=[math.sin(math.radians (i))for i in degrees]
plt.plot(sinevalues)
plt.xlabel('degrees')
plt.ylabel('sine value')
plt.title('sine curve')
plt.grid()
8. SINE AND COSINE
Mr. V. VEERANAN, M.Sc. Computer Science., Dip.in.Yoga.,
Package
Sine