Skip to content

Commit d4d66af

Browse files
firstlacture
1 parent 269a021 commit d4d66af

File tree

6 files changed

+89
-0
lines changed

6 files changed

+89
-0
lines changed

basicsofpython/input.py

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# python has built in function to take input as system input device keybord
2+
3+
4+
name = input("enter your name")
5+
6+
print("yur name is " , name , type(name))
7+
8+
# now use type casting in input statement
9+
name = int(input("enter your name"))
10+
11+
print("yur name is " , name , type(name))

basicsofpython/oprators.py

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# types of oprators
2+
3+
# an oprator is a symbol that performs a certain ipration between oprands oprands are who on we perform oprations
4+
5+
# Arithmetic operators : (+ , - * , / , % . **)
6+
# relational / comparison operators ( == , != , > , < >= , <=)
7+
# assignment operators ( = , += , -= , *= , /* , %= , **=)
8+
# logical operators ( not , and , or )
9+
10+
# typer conversion
11+
12+
# type conversion is done by automatic conversion by python interpreter
13+
14+
# type casting is casting done by user santex used in notes
15+
# used to convert one data type to another data type
+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
side1 = float(input("please enter the masurement of side1"))
2+
side2 = float(input("please enter the masurement of side2"))
3+
4+
are = side1 * side2
5+
6+
7+
print("the area of the sqyare is " , are)
+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
num1 = int(input("please enter the first number :"))
2+
num2 = int(input("please enter the second number"))
3+
4+
boooool = num1>=num2
5+
6+
print("the number1 is grator than number2 this statement is " , boooool)

basicsofpython/practice/sumoftwo.py

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
num1 = int(input("please enter the first number :"))
2+
num2 = int(input("please enter the second number"))
3+
sumoftwo = num1 + num2
4+
5+
print("the sum of these two number is " , sumoftwo)

basicsofpython/variableanddatatype.py

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# print anything you want using this function
2+
print("hellow im bore with this program")
3+
print("hellow \n" , "thease is the after coma")
4+
5+
# variables in python #those are container what can store values
6+
7+
name = "savaliya bhargav"
8+
age = 18
9+
price = 900000000.45
10+
11+
print("my name is :" , name)
12+
print("my age is " , age )
13+
14+
age2 = age
15+
print(age2)
16+
17+
# identifiers is the name of variable should be simple short and understable
18+
19+
# data types
20+
21+
print(type(name))
22+
print(type(age))
23+
print(type(price))
24+
25+
26+
27+
28+
29+
30+
31+
32+
33+
34+
35+
36+
37+
38+
39+
40+
41+
42+
43+
44+
45+

0 commit comments

Comments
 (0)