-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPython_01.py
More file actions
66 lines (50 loc) · 1.64 KB
/
Copy pathPython_01.py
File metadata and controls
66 lines (50 loc) · 1.64 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# -*- coding: utf-8 -*-
"""Python_Class_01_BC2301.ipynb
Automatically generated by Colaboratory.
Original file is located at
https://colab.research.google.com/drive/1WYdpC-VO-7queHT8cwkpJuQ604mUk6Mx
"""
# This program is an output program
print("Hello world!")
print("Hello world!")
print("Hello world!")
print("Hello world again!")
print("THis is a sentence")
# This \n is a newline making technique
print("Hello World \nHello World Again!\nThis is the third line!\n this is a new line!")
print("\n \n \n Hello World \nHello World Again!\nThis is the third line!")
number = input("Give me a number: ")
print(number)
# data type
name = "John"
print(type(name))
number = 50
print(type(number))
decimal = 12.5
print(type(decimal))
status = False
print(type(status))
status = True
print(type(status))
print(5 + 6)
print(6 - 2)
print( 6 * 6)
print(36/3)
# This is a greeting program
name = input("Please give me your name: ")
print(f"Welcome to the system {name} !")
name = input("Please give me your name: ")
print("Assalamwalilaikum " + name + "!")
# You have to find the area of a circle from the radius
# take the radius from the user
radius = input("Give me the radius: ")
radius = int(radius)
Area = 3.14 * radius * radius
print(f" The area of the circle is {Area} unit square")
# You have to find the area of a rectagngle from the radius
# take the length and the breadth from the user
length = int(input("Give me the length of the rectangle: "))
breadth = int(input("Give me the breadth of the rectangle: "))
area = length * breadth
print(f" The area of the retangle is {area} uint square")
print(" The area of the retangle is " + str(area) + " uint square")