Python Operations
Python Operations
Programming
Python Programs
1) Write a Python program which accepts the user's first and last name and print them.
sum = int(a)+int(b)
difference = int(a)-int(b)
simpleinterest = int(Principal)*int(Rate)*int(Time)
area = int(l)*int(b)
perimeter= 2*(int(l)+int(b))
print("The area of the rectangle is", area, "and the perimeter is" ,perimeter)
area = int(s)*int(s)
perimeter= int(s)*4
print("The area of the square is", area, "and the perimeter is" ,perimeter)
print ("The square of the number is", square,"and it's cube is", cube)
8) Write a Python program to three subject marks and calculate its total and average.
average = total / 3
9) Write a Python program to Celsius into Fahrenheit using the formula (Celsius *1.8)+32.
11) Write a Python program to input a number and display its next two consecutive numbers.
n = input("Any Number:")
nextnumber = int(n)+1
nexPttonextnumber = int(n)+2
print("The number is", n, "and the next numbers are" ,nextnumber, "and",nexttonextnumber)
km = input("Input kilometers:")
m = int(km)*1000
print("10 km in m is", m,'m')
13) Write a Python program to input temperature for all seven days and calculate the average
a = input("First string:")
b = input("Second string:")
concatenate = a + b
print(concatenate)
a = schoolname * 5
print (a)