Sunday, January 31, 2021

Saturday, January 16, 2021

Python program for finding whether the given number is an odd or an even number

 n = int(input("Enter a number:"))

if n % 2 == 0:

    print(n, "is an even number")

else:

    print(n, "is an odd number")

Python code for finding net salary

sal = float(input("Enter salary:"))

exp = int(input("Enter work experience:"))

grade = input("Enter grade:")


if(exp>=15):

    if(grade == 'A' or grade == 'a'):

        ns = sal * 2

    elif(grade == 'B' or grade == 'b'):

        ns = sal * 1.75

    elif(grade == 'C' or grade == 'c'):

        ns = sal * 1.50

    else:

        print("Invalid Input")

elif(exp >= 10 and exp < 15):

    ns = sal * 1.50

elif(exp >= 5 and exp < 10):

    ns = sal * 1.40

else:

    ns = sal * 1.25

print("Net Salary:", ns)

Sunday, January 10, 2021

The Big Bang Theory - S7:E4


Funny Moments
- Sheldon's fun taken away
- Leonard, Raj, Howard's fun taken away from the movie
- Stuart's photo clicking
- Sheldon liking comic

Friday, January 8, 2021

Python code for merging first name, middle name, & last name

 fname=input("Enter First Name:")

mname=input("Enter Middle Name:")

lname=input("Enter Last Name:")

fullname=fname+mname+lname

print(fullname)

Python code for simple operational calculator

First Method:


n1=float(input("Enter number1:"))

n2=float(input("Enter number2:"))

sign=input("Enter sign:")

if sign=='+':

    print("Answer=",n1+n2)

elif sign=='-':

    print("Answer=",n1-n2)

elif sign=='*':

    print("Answer=",n1*n2)

elif sign=='/':

    print("Answer=",n1/n2)

else:

    print("Invalid sign")


Second Method: 


n1=float(input("Enter number1:"))

n2=float(input("Enter number2:"))

sign=input("Enter sign:")

if sign=='+':

    n=n1+n2

elif sign=='-':

    n=n1-n2

elif sign=='*':

    n=n1*n2

elif sign=='/':

    n=n1/n2

else:

    print("Invalid sign")

print("Answer=",n)

Thursday, January 7, 2021

Python code for finding greater number

 v1=int(input("Enter value1:"))

v2=int(input("Enter value2:"))

if(v1>v2):

    print("value1 is greater")

else:

    print("value2 is greater")

Python code for student result system

roll_no=input("Enter roll number:")

name=input("Enter name:")

city=input("Enter city:")

eng=int(input("Enter English Marks:"))

maths=int(input("Enter Maths Marks:"))

sci=int(input("Enter Science Marks:"))

total=eng+maths+sci

average=total/3

print("Roll Number:",roll_no)

print("Name:",name)

print("City:",city)

print("English Marks:",eng)

print("Maths Marks:",maths)

print("Science Marks:",sci)

print("Total Marks:",total)

print("Average:",average)

Python code to find the amount of seconds

 days=int(input("Input Days:")) * 3600 * 24

hours=int(input("Input Hours:"))*3600

minutes=int(input("Input Minutes:"))*60

seconds=int(input("Input Seconds:"))

time=days+hours+minutes+seconds

print("The amounts of seconds", time)

How to Fight Overthinking or Negative Thoughts?

How to Combat Overthinking or Negative Thoughts? 1. Don’t Fight Your Thoughts Trying to suppress or control negative thoughts often backfire...