Breaking News

New Updates

Python Master

/2023/03/blog-post_31.html

Chania

The City

Chania is the capital of the Chania region on the island of Crete. The city can be divided in two parts, the old town and the modern city.

You will learn more about web layout and responsive web pages in a later chapter.

__to edit
https://broadway-kochi.blogspot.com/p/python.html



Create a BIM calculating program using function:



def BIM(w, h):
div= w/h**2
return div
w=int(input("Enter the W : "))
h=float(input("Enter the H : "))
BIM(w, h)
print("Bim is : ", BIM(w, h))


output:
Enter the W : 70
Enter the H : 1.70
Bim is : 24.221


















def BIM(w, h):
div= w/h**2
return div
try: w=int(input("Enter the W : "))
h=float(input("Enter the H : "))
BIM(w, h)
print("Bim is : ", BIM(w, h))
except:
print('Error...')
finally:
print("have a Nice day (Y)")





output:
Enter the W : 0
Enter the H : 0
Error...
have a Nice day (Y)
file=open("deme.txt", 'w')
file.close()
file=open("deme.txt", 'r')
welcome=file.read()
print(welcome)
file.close()





welcome=file.readile()
welcome=file.read(5)




file=open("deme.txt", 'w')
txt=file.write("Hellow world")
file.close()




file=open("deme.txt", 'a')
file.write("Append: Appan unnum kalayillada..")
file.close





def division(a, b): ans=a/b return ans try: a=int(input("Enter the 1st Number : ")) b=int(input("Enter the 2nd Number : ")) division(a, b) print(division(a, b)) except: print("ZeroDivisionError") finally: print("Have a nice day")


Enter the 1st Number : 5 Enter the 2nd Number : 0 ZeroDivisionError Have a nice day ---------------------------------------------------------------------- from pcs ---------------------------------------------------------------------




Loging

Phase 1: Foundational Python Skills (1-2 Months)

Core Python Concepts:

  1. Variables, data types (numbers, strings, booleans, lists, dictionaries), operators
  2. Control flow (if/else statements, loops)
  3. Functions (defining, calling, arguments, return values)
  4. Object-oriented programming (OOP) basics (classes, objects, methods, inheritance)
  • Syllubus
      1. Phase 1: Foundational Python Skills (1-2 Months)

    1. Maths
    2. Maths tircks

No comments