Skip to content

Commit a1be3f8

Browse files
committed
hii
1 parent 26f177e commit a1be3f8

8 files changed

+79
-0
lines changed

Calculator_using_Operator.py

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
first_num = input("Enter first number : ")
2+
second_num = input("Enter second number : ")
3+
option = input("Choose any option : \n1.Addition \n2.Substraction \n3.Multiplication \n4.Division \n5.Modulo \nEnter your choice : ")
4+
5+
if option == '1':
6+
Sum = int(first_num) + int(second_num)
7+
print(Sum)
8+
9+
elif option == '2':
10+
Sub = int(first_num) - int(second_num)
11+
print(Sub)
12+
13+
elif option == '3':
14+
Mul = int(first_num) * int(second_num)
15+
print(Mul)
16+
17+
elif option == '4':
18+
Div = int(first_num) / int(second_num)
19+
print(Div)
20+
21+
elif option == '5':
22+
Mod = int(first_num) % int(second_num)
23+
print(Mod)
24+
25+
else:
26+
print("Wrong choise....")
27+
28+
print("Thank You !!")

HelloWorld_Pro.py

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
print("Hello World . . ")
2+
print("Hello Coders . . ")
3+
print("Hello Rutika . . ")

InputsInPython.py

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
name = input("What is your name ? ")
2+
print(name)
3+
4+
superHeroName = input("What is your superHero name ? ")
5+
print("Hello " +superHeroName)

StringMethods.py

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name = "Tony Stark" # String declaration
2+
3+
print("String in Upper case : " + name.upper()) # method use to convert string into upper case . .
4+
5+
print("String in lower case : " + name.lower()) # mothod use to convert string into lower case . .
6+
7+
print("Index of r is :" + str(name.index('r'))) # method use for index of characters . .
8+
9+
print("Find a : " + str(name.find("a"))) # method use to find string index . .
10+
11+
print("Replace Tony to Lisa : " + name.replace("Tony", "Lisa")) # method use to replace string to another . .
12+
13+
print("Stark" in name)

VariablesInPython.py

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
name = "Rutika"
2+
surName = "Kasar"
3+
age = 22
4+
percentage = 72.12
5+
is_adult = True
6+
7+
# concatenation of string. . .
8+
print("Name : " +name +" " +surName)
9+
print(age)
10+
print(is_adult)

age_if-else_Program.py

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
age = input("Enter your age : ")
2+
3+
if int(age) >= 18:
4+
print("You are adult . . ")
5+
print("You are eligible to vote....")
6+
7+
elif int(age) >= 3 and int(age) < 18:
8+
print("You are school student . .")
9+
10+
else:
11+
print("You are child . . ")
12+
13+
print("Thank You !!!!")

sumOfTwoNum.py

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
firstNum = input("Enter first num : ")
2+
secondNum = input("Enter second num : ")
3+
sum = int (firstNum )+ int(secondNum)
4+
print("Sum of two numbers : " + str(sum))

typeConversion.py

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
old_age = input("What is your old age : ")
2+
new_age = int(old_age) + 5
3+
print("new age : " , new_age)

0 commit comments

Comments
 (0)