Java, .NET, PHP, PYTHON, ANGULAR, ML, Data Science, Testing, CI Tutorials in Easy Languages.

"Best Software Training, Internship, Project Development center of Indore India, Helpline 780506-3968"

Conditional Statement in Python:-

It is used to solve condition-based problems using if and else block-level statement. it provides a separate block for if statement, else statement, and elif statement. elif statement is similar to elseif statement of C, C++ and Java language.


Type of Conditional Statement:-


1) Simple if:-


It will be executed when the condition will be true. for example,

 if we want to display the salary of employees when the salary will be above 10000 otherwise not display.



Syntax:-

if(condition): 

    statements


Q) WAP to increase the salary of employees from 500 if entered salary will be less than 10000 otherwise the same salaries will be displayed.


Solution:-


x = int(input("enter salary"))
if x<10000:
    x=x+500
print(x)  





Q) WAP to display the subject mark of the student which will be entered by the user's if the entered subject mark is eligible for grace then display mark including grace mark otherwise actual mark will display.



x = int(input("enter mark"))
if x>=28 and x<33:
    g=33-x
    print('grace mark is ',g)
    x=x+g

print(x)  


2) If...Else:-

'Else' is the dependent statement of if statement.
If--else will be implemented when the condition will be true and false. "if" block will execute when the condition is true and "else" block will execute when the condition is false.


Syntax of IF-ELSE:-

if(condition):       

  Statements

else:   

  Statements


Q) WAP to check that the entered number is a one-digit number or above one-digit number, the number can be positive or negative?


for example, if the user presses -1 then one digit, 9 then one digit, 20 then above one digit


num = int(input("enter number"))

if num>=-9 and num<=9:
    print("one digit number")
else:
    print("above one digit")



Assignment of IF-ELSE Statement:-

1)  WAP to increase the Salary of an employee from 500 if the entered salary is less than 10000 otherwise increase by 800?

2) WAP to Check Leap Year? 

Solution of this program:-

Using IF--Else:-

year = int(input("Enter year"))
if year%400==0 or (year%4==0 and year%100!=0):
    print("Leap year")
else:
    print("NOT a Leap Year")

Using NESTED IF--ELSE:-

year = int(input("Enter year"))
if year%400==0:
    print("Leap year")
else:
    if year%4==0 and year%100!=0:
        print("Leap Year")
    else:
        print("NOT a Leap Year")



3) WAP to check number is positive or negative?




3)  Nested If--else:-

 It is used to implement "multiple condition-based problems" that can not be solved by simple if-else. 

it will use more than one if-else statement using a nested sequence means it contains collections of outer if-else and inner if-else.

if the program has multiple conditions and we do not use the logical operator(and) then we prefer nested if-else.

we should manage the nested sequence should be managed by Indent to create the outer block and inner block.

Python does not prefer nested block mostly because indentation management is tuff hence python provides "elif" block to manage this.


Syntax of Nested If--Else:-

if(condition):  

  if(condition):        

      statement    

  else:        

      statement
else:  

    if(condition):           

      statement   

    else:          

      statement


Q) WAP to check that the entered number is a one-digit positive number, negative or two-digit positive number, or negative?

num = int(input("enter number"))

if num>=-9 and num<=9:
    if num>0:
        print("one digit positive number")
    else:
        print("one digit negative number")
else:
    if num>=10 and num<100:
        print("two digit positive number")
    else:
        if num>=-99 and num<=-10:
            print("two digit negative number")
        else:
            print("other number")



 Q WAP to check the greatest number?

a = int(input("enter first number"))
b = int(input("enter second number"))
c = int(input("enter third number"))
if a>b:
    if a>c:
        print("a is greatest")
    else:
        print("c is greatest")
else:
    if b>c:
        print("b is greatest")
    else:
        print("c is greatest")





WAP to check greatest using four different numbers?

a = int(input("enter first number"))
b = int(input("enter second number"))
c = int(input("enter third number"))
d = int(input("enter fourth number"))
if a>b:
    if a>c:
        if a>d:
         print("a is greatest")
        else:
         print("d is greatest")
    else:
        if c>d:
            print("c is greatest")
        else:
            print("d is greatest")

else:
    if b>c:
        if b>d:
          print("b is greatest")
        else:
          print("d is greatest")
    else:
        if c>d:
            print("c is greatest")
        else:
            print("d is greatest")
    
    


4)  Ladder if-else using elif statement:-

It provides a simple syntax structure as compare to nested if-else .ladder if-else will work step by step means if the first condition will be true then it will execute, if it will be false then execute elif block and at last if all condition will be false then else statement will execute.
Syntax of Elif Statement or Ladder IF-ELSE:-

if condition: 

    statement

elif condition:    

   statement

elif condition:
   statement

else: 

  statement

 ................................................................................................


WAP to check greatest number program using Ladder If--Else:-

a = int(input("enter first number"))
b = int(input("enter second number"))
c = int(input("enter third number"))

if a>b and a>c:
        print("a is greatest")
elif b>c:
        print("b is greatest")
else:
        print("c is greatest") 


Q WAP to check the greatest number using four different numbers?

a = int(input("Enter First Number"))
b = int(input("Enter Second Number"))
c = int(input("Enter Third Number"))
d = int(input("Enter Fourth Number"))

if a>b and a>c and a>d:
    print("a is greatest")
elif b>c and b>d:
    print("b is greatest")
elif c>d:
    print("c is greatest")
else:
    print("d is greatest")
             



Another Program of Ladder if--else:-

WAP to check that entered number is one digit negative number or a positive number?

num = int(input("enter number"))
if num>=-9 and num<0:
    print("one digit negative number")
elif num>0 and num<=9:
    print("one digit postive number")
elif num>=-99 and num<-9:
    print("two digit negative number")
else:
    print("two digit positive number")
           
       
 

5) Multiple If:-

If we require MULTIPLE CONDITION WITH MULTIPLE RESULTS then we use multiple if,
We can create more than one if statement to check multiple conditions and it will provide multiple results.

Q WAP to check divisibility of number from 3,5 and 9 with all combination:-

 num = int(input("enter number"))
if num%3==0:
    print("divisible by 3")
if num%5==0:
    print("divisible by 5")
if num%9==0:
    print("divisble by 9")

Q) WAP to check that entered input is numeric char or alphabet char?

ch = input("enter char")
if ord(ch)>=48 and ord(ch)<=57:
    print("Numeric")
elif (ord(ch)>=65 and ord(ch)<=90) or (ord(ch)>=97 and ord(ch)<=122):
    print("Alphabet")
else:
    print("Other")


Q WAP to display "YES" and "NO" when the user press 'y' and 'n'?


Q WAP to check the middle number is a three-digit number? 

A solution to this program:-


num = int(input("enter number to check middle number"))
a= num%10  #3
num=num//10 #12
b=num%10   #2
c=num//10   #1

if a>b and a<c or a>c and a<b:
     print(str(a)+" is middle number")
if b>a and b<c or b>c and b<a:
     print(str(b)+" is middle number")
if c>a and c<b or c>b and c<a:
    print(str(c)+" is middle number")

 




Q) WAP to calculate greatest using four different number using nested and ladder both?

a = int(input("enter first number"))

b = int(input("enter second number"))

c = int(input("enter third number"))

d = int(input("enter fourth number"))

if a>b:

    if a>c:

        if a>d:

         print("a is greatest")

        else:

         print("d is greatest")

    else:

        if c>d:

         print("c is greatest")

        else:

         print("d is greatest")

else:

    if b>c:

        if b>d:

         print("b is greatest")

        else:

         print("d is greatest")

    else:

        if c>d:

         print("c is greatest")

        else:

         print("d is greatest")



Q) WAP to check that entered char is vowel and consonant without using or operator?


  ch = input("enter char")

if ch=='a':
   print("Vowel")
else:
   if ch=='e':
     print("Vowel")
   else:
     if ch=='i':
        print("vowel")
     else:
        if ch=='o':
          print("vowel")
        else:
         if ch=='u': 
           print("vowel")
         else:
           print("Consonent")
           


Q) WAP to Calculate Marksheet using five different subjects with the following condition.

1) all subject marks should be 0 to 100.
2) if only one subject mark is <33 then the student will be suppl.
3) if all subject marks are >=33 then percentage and division should be calculated.
4) if a student is suppl then five bonus marks can be applied to be pass and the result will be "pass by grace".
5) Display Grace Subject name, distinction subject name,suppl subject name, and failed subject name.


The solution to this program:-

/* This is for User Input  */

s1= input("enter first subject name")
m1 = int(input("enter marks"))
s2= input("enter second subject name")
m2 = int(input("enter marks"))
s3= input("enter third subject name")
m3 = int(input("enter marks"))
s4= input("enter fourth subject name")
m4 = int(input("enter marks"))
s5= input("enter fifth subject name")
m5 = int(input("enter marks"))

if((m1>=0 and m1<=100) and (m2>=0 and m2<=100) and (m3>=0 and m3<=100) and (m4>=0 and m4<=100) and (m5>=0 and m5<=100)):
   c=0
   g=0
   sub=""
   dist=""

/*  check pass, fail and suppl according to c variable */

if m1<33:
       c=c+1
       g=m1
       sub=sub+s1
   if m2<33:
       c=c+1
       g=m2
       sub=sub+s2
   if m3<33:
       c=c+1
       g=m3
       sub=sub+s3
   if m4<33:
       c=c+1
       g=m4
       sub=sub+s4
   if m5<33:
       c=c+1
       g=m5
       sub=sub+s5

/*  Check Distinction */

   if m1>=75:
       dist=dist+s1+" "
   if m2>=75:
       dist=dist+s2+" "
   if m3>=75:
       dist=dist+s3+" "
   if m4>=75:
       dist=dist+s4+" "
   if m5>=75:
       dist=dist+s5+" "    



    
/*  it is used to manage pass, fail and supp according to c value*/

   if c==0 or (c==1 and g>=28):
      per= (m1+m2+m3+m4+m5)/5
      if per>33 and per<45:
          print("pass with third division")
      elif per<60:
          print("pass with second division")
      else:
          print("pass with first division")
      if(dist!=""):
       print("distinction subject name is "+dist)
          
      if c==1: 
       print("pass by grace and grace mark is "+str(33-g)+" subject is "+sub)
     
   elif c==1:
      print("suppl")
   else:
      print("fail")
else:
   print("entered subject marks should be 0 to 100")

11) WAP to check that salary is in income tax criteria or not. if in income tax then display income tax slab.


12)  WAP  TO CHECK THAT USERNAME AND PASSWORD BOTH ARE CORRECT OR NOT WHERE USERNAME IS YOUR FIRST NAME AND PASSWORD YOUR LASTNAME?

PROVIDE SEPARATE MESSAGES FOR INVALID USERNAME, INVALID PASSWORD, INVALID USERNAME, AND PASSWORD?










140 Comments

If you have any doubt in programming or join online classes then you can contact us by comment .

  1. # increase salary of employee from 500 if entered salary will be less then 10000 otherwise same salary will be displayed.

    salary=int(input(" Enter the employee salary :"))
    if(salary<10000):
    salary=salary+500;
    print("\n Total salary of employee is :",salary)

    ReplyDelete
  2. #display mark of student which will be entered by the user's ,if mark is eligible for grace then display mark including grace mark otherwise actual mark will display.
    marks=int(input("Enter the marks : "))
    if marks>=28 and marks<33:
    grace=33-marks
    print("\nEligibal for grace ",grace)
    marks=marks+grace

    print("\n Total marks after grace ",marks )

    ReplyDelete
  3. #check that entered number is one digit number or above one digit number ,number can be positive or negative?
    number=int(input("Enter the number :"))
    if(number>=9 or number<=-9):
    #if(number<-9):
    print("\n Above one digit numner")
    else:
    print("\n It's one digit number")

    ReplyDelete
  4. # check that entered number is one digit positive number,negative or two digit positive number or negative ,number can be positive and negative?
    number=int(input("Enter the number : "))
    if(number>=9 or number<=-9):
    print("\n Above one digit numner")
    else:
    print("\n It's one digit number")
    if(number>=0):
    print(" \n Number is positive")
    else:
    print("\n Number is negative")

    ReplyDelete
  5. #check divisibility of number from 3,5 and 9 with all combination:-
    number=int(input(" Enter the number : "))
    '''if(number%3==0 or number%5==0 or number%9==0):
    print("\n Number can be devide with given number : ")
    else:
    print("\n Number can't be devide with given number : ")'''
    if number%3==0:
    print("\n Number can be devide with number 3 ")
    if number%5==0:
    print("\n Number can be devide with number 5 ")
    if number%9==0:
    print("\n Number can be devide with number 9 ")
    else:
    print("\n Number can't be devide with number")

    ReplyDelete
  6. Program to check leap year-->

    a=int(input("enter the year"))
    if a%4==0:
    print("it is leap year")
    else:
    print("it is not leap year")

    ReplyDelete
  7. #WAP to Calculate Marksheet using five different subjects with the following condition.
    # all subject marks should be 0 to 100.
    s1=input("enter 1st subject name")
    m1=int(input("enter 1st subject marks"))
    s2=input("enter 2nd subject name")
    m2=int(input("enter 2nd subject marks"))
    s3=input("enter 3r subject name")
    m3=int(input("enter 3rd subject marks"))
    s4=input("enter 4th subject name")
    m4=int(input("enter 4th subject marks"))
    s5=input("enter 5th subject name")
    m5=int(input("enter 5th subject marks"))
    if (m1>=0 and m1<=100) and (m2>=0 and m2<=100) and (m3>=0 and m3<=100) and (m4>=0 and m4<=100)and (m5>=0 and m5<=100):
    print("all subject between 1 to 100")
    else:
    print("all subject not between 1 to 100")

    ReplyDelete
  8. # WAP to check that salary is in income tax criteria or not. if in income tax then display income tax slab.
    sal=int(input("enter gross salary"))
    i=''
    if(sal>200000):
    i=i+str(sal//4)#25% of income
    print("incometax slab",i)
    else:
    print("salary not come in income tax slab")

    ReplyDelete
  9. #if only one subject mark is <33 then the student will be suppl.
    s1=input("enter 1st subject name")
    m1=int(input("enter 1st subject marks"))
    s2=input("enter 2nd subject name")
    m2=int(input("enter 2nd subject marks"))
    s3=input("enter 3r subject name")
    m3=int(input("enter 3rd subject marks"))
    s4=input("enter 4th subject name")
    m4=int(input("enter 4th subject marks"))
    s5=input("enter 5th subject name")
    m5=int(input("enter 5th subject marks"))
    #if (m1>=0 and m1<=100) and (m2>=0 and m2<=100) and (m3>=0 and m3<=100) and (m4>=0 and m4<=100)and (m5>=0 and m5<=100):
    c=0 #compartement
    if (m1<33)or (m2<33) or (m3<33)or (m4<33)or (m5<33):
    print("student will be supplymentry")
    else:
    print("student pass")

    ReplyDelete
  10. to check that salary is in income tax criteria or not--->>

    salary=int(input("enter total salary"))

    if(salary>250000):
    i=(salary*5/100)
    print("income tax slab",i)
    else:
    print("salary is not in income tax slab")

    ReplyDelete
  11. Program to display "YES" and "NO" when user press 'y' and 'n'---->>>

    ch = input("enter char")

    if ch=='y':
    print("yes")
    else:
    if ch=='n':
    print("no")

    ReplyDelete
  12. Lokesh Rathore

    Increase the salary of employees from 500 if entered salary will be less than 10000 otherwise the same salaries will be displayed ??
    Solution:-
    sal = int(input("Enter Salary of Employee :- "))
    if sal<10000:
    sal=sal+500
    print(sal)

    ReplyDelete
  13. Lokesh Rathore

    Check that entered number is one digit positive number, negative or two-digit positive number or negative ??
    Solution:-
    n = int(input("Enter number :- "))

    if n>=-9 and n<=9:
    print("One Digit Number.")
    else:
    print("It's Above One Digit Number.")

    ReplyDelete
  14. Lokesh Rathore

    WAP to increase the Salary of an employee from 500 if the entered salary is less than 10000 otherwise increase by 800?

    Solution:-
    sal=int(input("Enter salary of Employee :- "))
    if sal<10000:
    sal=sal+500
    print(sal)
    else:
    sal = sal+800
    print(sal)

    ReplyDelete
  15. Lokesh Rathore

    WAP to Check the Leap Year using IfElse ?
    Solution :-
    year= int(input("Enter Year :- "))
    if year%4==0:
    print("This is Leap Year.")
    else:
    print("This is not Leap Year.")

    ReplyDelete
  16. Lokesh Rathore

    WAP to check the number is positive or negative using If Else ??

    Solution :-
    num=int(input("Enter a Number :- "))
    if num<0:
    print("This is Negative Number.")
    else:
    print("This is Positive Number.")

    ReplyDelete
  17. Lokesh Rathore

    Program to display "YES" and "NO" when user press 'y' and 'n' ??
    Solution:-
    char = input("Enter your choise y/n :- ")
    if char=='y':
    print("yes")
    else:
    if char=='n':
    print("no")

    ReplyDelete
  18. Lokesh Rathore


    WAP to calculate greatest using four different number using nested and ladder both?
    Solution :-
    a = int(input("Enter first number :-"))
    b = int(input("Enter second number :- "))
    c = int(input("Enter third number:- "))
    d = int(input("Enter fourth number :- "))
    if a>b:
    if a>c:
    if a>d:
    print("A is Greatest Number.")
    else:
    print("D is Greatest Number.")
    else:
    if c>d:
    print("C is Greatest Number.")
    else:
    print("D is Greatest Number.")
    else:
    if b>c:
    if b>d:
    print("B is Greatest Number.")
    else:
    print("D is Greatest Number.")
    else:
    if c>d:
    print("C is Greatest Number.")
    else:
    print("D is Greatest Number.")


    ReplyDelete
  19. Lokesh Rathore

    WAP to check that entered char is vowel and consonant without using or operator?
    Solution :-
    char = input("Enter character :- ")
    if char=='a':
    print("It is Vowel.")
    else:
    if char=='e':
    print("It is Vowel.")
    else:
    if char=='i':
    print("It is Vowel.")
    else:
    if char=='o':
    print("It is Vowel.")
    else:
    if char=='u':
    print("It is Vowel.")
    else:
    print("It is Consonent.")

    ReplyDelete
  20. deependra singh jadaunNovember 5, 2020 at 10:18 AM

    program for salary increment below 10000 salary
    s=int(input("enter salary of employee"))
    i=s+500
    if (s<10000):
    print("your salary is increased by 500; becomes {} ".format(i))
    else:
    print("your salary is '{}'".format(s))

    ReplyDelete
  21. deependra singh jadaunNovember 5, 2020 at 4:42 PM

    wap to check greatest no. when four nos. are given.
    a=int(input("enter first no."))
    b=int(input("enter second no."))
    c=int(input("enter third no."))
    d=int(input("enter fourth no."))

    if a>b and a>c:
    if a>d:
    print('str(a)'"is greatest")
    else:
    if b>a and b>c:
    if b>d:
    print("b is greatest")
    else:
    if c>a and c>b:
    if c>d:
    print("c is greatest")
    else:
    if d>a and d>b:
    if d>c:
    print("d is greatest")

    ReplyDelete
  22. deependra singh jadaunNovember 6, 2020 at 10:53 AM

    #wap to check vowel or consonant without "or"
    ch=input("enter any character")
    if ch=='a':
    print("vowel")
    elif ch=='e':
    print("vowel")
    elif ch=='i':
    print("vowel")
    elif ch=='o':
    print('vowel')
    elif ch=='u':
    print("vowel")
    else:
    print("consonant")

    ReplyDelete
  23. deependra singh jadaunNovember 6, 2020 at 10:55 AM

    #program to check greatest no. out of three given nos.
    a=int(input("enter first no"))
    b=int(input("enter second no."))
    c=int(input("enter third no."))

    if a>b and a>c:
    print("a is greatest")
    else:
    if b>c and b>a:
    print("b is greatest")
    else:
    if a==b==c:
    print("no. are equal")
    else:
    print("c is greatest")

    ReplyDelete
  24. deependra singh jadaunNovember 6, 2020 at 10:59 AM

    #
    Q) WAP to check that the entered number is a one-digit number or above one-digit number, the number can be positive or negative?
    x=int(input("enter any no."))
    if -9<=x<=9:
    if x<=9 and x>0:
    print("no. is one digit positive")
    else :
    if x>=-9 and x<0:
    print("one digit negative no.")
    else:
    x=0
    print("zero no.")
    else:
    if x>9 and x<=99:
    print("two digit positive no.")
    else:
    if x<-9 and x>=-99:
    print("two digit negative no.")
    else:

    print("other no.")

    ReplyDelete
  25. Parag Jaiswal
    # WAP to increase the Salary of an employee from 500 if the entered salary is less than 10000 otherwise increase by 800?


    sal = int(input("Enter salary = "))

    if sal<=10000:
    sal += 500
    print("Now your salary = ",sal)

    else:
    x= sal + 800
    print("Now your salary = " + str(x))

    ReplyDelete
  26. Parag Jaiswal
    #WAP to Check Leap Year?
    year = int(input("Enter year = "))

    if year %4 == 0:
    print(year, " is a leap year")
    else:
    print(year, "not a leap year")

    ReplyDelete
  27. Parag Jaiswal
    #WAP to check number is positive or negative?
    num = int(input("Enter number = "))

    if num < 0:
    print(num, "number is negative")

    else:
    print(num, "number is positive")

    ReplyDelete
  28. Parag Jaiswal
    # WAP to check that the entered number is a one-digit positive number, negative or two-digit positive number, or negative?

    num = int(input("Enter number = "))

    if num >= -9 and num <= 9:
    print(num, " is one digit number")
    if num<0:
    print(num , "is negative number")
    else:
    print(num, "is positive number")

    else:
    if num <= -10 and num >=-99:
    print(num, "is negative two digit number")

    if num >=10 and num <= 99:
    print(num,"is positive two digit number")

    ReplyDelete
  29. Parag Jaiswal
    Q WAP to check the greatest number usind AND operator?

    a = int(input("Enter first number = "))
    b = int(input("Enter second number = "))
    c = int(input("Enter third number = "))

    if a > b and a>c:
    print("First number is greater")

    else:
    if c>a and c>b:
    print("Third number is greater")
    else:
    print("Second number is greater")

    ReplyDelete
  30. Parag Jaiswal
    # WAP to check the greatest number?

    a = int(input("Enter first number = "))
    b = int(input("Enter second number = "))
    c = int(input("Enter third number = "))

    if a>b:
    if a>c:
    print("First number is greatest")
    else:
    print("Third number is greatest")

    else:
    if b>c:
    print("Second number is greatest")
    else:
    print("Third number is greatest")

    ReplyDelete
  31. Parag Jaiswal
    #MULTIPLE IF
    num = int(input("Enter number to check divisible by 3, 5,& 9 = "))

    if num % 3 ==0:
    print(num, "Divisible by 3")
    if num % 5 == 0:
    print(num, "Divisible by 5")
    if num % 9 ==0:
    print(num, "Divisible by 9")
    else:
    print("Not Divisible by 3_5_9")

    ReplyDelete
  32. Parag Jaiswal
    #WAP to display "YES" and "NO" when user press 'y' and 'n'?
    check= input("Enter Y or N = ")
    if check == 'y' or check == 'Y':
    print("YES")
    else:
    if check == 'n' or check == 'N':
    print("NO")

    ReplyDelete
  33. Parag Jaiswal
    #WAP to calculate greatest using four different number using nested and ladder both?
    a= int(input("Enter first number = "))
    b = int(input("Enter second number = "))
    c = int(input("Enter third number = "))
    d = int(input("Enter fourth number = "))

    if a>b:
    if a>c:
    if a>d:
    print("A is greatest")
    else:
    print("D is greatest")
    else:
    if c>d:
    print("C is greatest")
    else:
    print("D is greatest")
    else:
    if b>c:
    if b>d:
    print("B is gretest")
    else:
    print("D is greatest")

    ReplyDelete
  34. Parag Jaiswal
    # WAP to check that entered char is vowel and consonant without using or operator?
    let = input("Enter character = ")

    if let == 'a':
    print(str(let) + " is vowel")
    elif let == 'e':
    print(str(let) + " is vowel")
    elif let == 'i':
    print(str(let) + " is vowel")
    elif let == 'o':
    print(str(let) + " is vowel")
    elif let == 'u':
    print(str(let) + " is vowel")
    else:
    print(str(let) + " is Consonant")

    ReplyDelete
  35. Parag Jaiswal
    #WAP to Calculate Marksheet using five different subjects with the following condition.
    english = int(input("Enter marks obtained in english = "))
    if english < 0 or english > 100:
    print("Enter valid marks in english subject")

    hindi = int(input("Enter marks in Hindi = "))
    if hindi <0 or hindi >100:
    print("Enter valid marks in Hindi subject")

    maths = int(input("Enter marks in Maths = "))
    if maths <0 or maths >100:
    print("Enter valid marks in maths subject")

    science = int(input("Enter marks in science = "))
    if science <0 or science >100:
    print("Enter valid marks in Science subject")

    history = int(input("Enter marks in History = "))
    if history <0 or history >100:
    print("Enter valid marks in History subject")


    #percentage and division
    percent = ((english + hindi +maths +science +history)/500) *100

    if english>= 33:
    if hindi >= 33:
    if maths >= 33:
    if science >= 33:
    if history >= 33:
    print("Passed in all subject and percentage is = " + str(percent) +str('%'))
    if percent >= 60:
    print("First Division")
    elif percent >= 50 and percent <=59.99:
    print("Second Division")
    else:
    if percent >=33 and percent <=49.99:
    print("Third Division")

    ReplyDelete
  36. Parag Jaiswal
    #WAP to Calculate Marksheet using five different subjects with the following condition.
    # supplementary
    if english<33 and hindi>=33 and maths>=33 and science>=33 and history >=33:
    print("Supplementary in English subject")
    if english >= 28 and english<33:
    x = 33-english
    english += x
    print("Grace of " +str(x) +" marks in english subject")
    print("Passed in all subject and percentage is = " + str(percent) +str('%'))
    if percent >= 60:
    print("First Division")
    elif percent >= 50 and percent <=59.99:
    print("Second Division")
    else:
    if percent >=33 and percent <=49.99:
    print("Third Division")

    if english>+33 and hindi>=33 and maths>=33 and science>=33 and history<33:
    print("Supplementary in History subject")
    if history >= 28 and history<33:
    x = 33-history
    history += x
    print("Grace of " +str(x) +" marks in History subject")
    print("Passed in all subject and percentage is = " + str(percent) +str('%'))
    if percent >= 60:
    print("First Division")
    elif percent >= 50 and percent <=59.99:
    print("Second Division")
    else:
    if percent >=33 and percent <=49.99:
    print("Third Division")

    if english>=33 and hindi<33 and maths>=33 and science>=33 and history >=33:
    print("Supplementary in Hindi subject")
    if hindi >= 28 and hindi<33:
    x = 33-hindi
    hindi += x
    print("Grace of " +str(x) +" marks in hindi subject")
    print("Passed in all subject and percentage is = " + str(percent) +str('%'))
    if percent >= 60:
    print("First Division")
    elif percent >= 50 and percent <=59.99:
    print("Second Division")
    else:
    if percent >=33 and percent <=49.99:
    print("Third Division")

    if english>=33 and hindi>=33 and maths<33 and science>=33 and history >=33:
    print("Supplementary in Maths subject")
    if maths >= 28 and maths<33:
    x = 33-maths
    maths += x
    print("Grace of " +str(x) +" marks in Maths subject")
    print("Passed in all subject and percentage is = " + str(percent) +str('%'))
    if percent >= 60:
    print("First Division")
    elif percent >= 50 and percent <=59.99:
    print("Second Division")
    else:
    if percent >=33 and percent <=49.99:
    print("Third Division")
    if english>=33 and hindi>=33 and maths>=33 and science<33 and history >=33:
    print("Supplementary in English subject")
    if science >= 28 and science<33:
    x = 33-science
    science += x
    print("Grace of " +str(x) +" marks in english subject")
    print("Passed in all subject and percentage is = " + str(percent) +str('%'))
    if percent >= 60:
    print("First Division")
    elif percent >= 50 and percent <=59.99:
    print("Second Division")
    else:
    if percent >=33 and percent <=49.99:
    print("Third Division")

    ReplyDelete
  37. Parag Jaiswal
    #WAP to Calculate Marksheet using five different subjects with the following condition.

    #Distinction
    if english >= 75:
    print("Distinction in English Subject")
    else:
    if english<=27.99:
    print("Failed in English subject")


    if hindi >= 75:
    print("Distinction in Hindi Subject")
    else:
    if hindi<=27.99:
    print("Failed in Hindi subject")


    if maths >= 75:
    print("Distinction in Maths Subject")
    else:
    if maths<=27.99:
    print("Failed in Maths subject")


    if science >= 75:
    print("Distinction in Science Subject")
    else:
    if science<=27.99:
    print("Failed in Science subject")


    if history >= 75:
    print("Distinction in History Subject")
    else:
    if history<=27.99:
    print("Failed in History subject")

    ReplyDelete
  38. Adarsh dixit
    year = int(input("Enter a year: "))

    if (year % 4) == 0:
    if (year % 100) == 0:
    if (year % 400) == 0:
    print("{0} is a leap year".format(year))
    else:
    print("{0} is not a leap year".format(year))
    else:
    print("{0} is a leap year".format(year))
    else:
    print("{0} is not a leap year".format(year))

    ReplyDelete
  39. Adarsh dixit
    sal=int(input('enter salary'))
    if sal<=10000:
    sal=sal+500
    print(sal)

    ReplyDelete
  40. Adarsh dixit
    num = int(input("enter number"))

    if num>-10 and num<10:
    print("one digit number")
    else:
    print("above one digit")

    ReplyDelete
  41. Adarsh dixit
    marks=int(input('enter marks'))
    if marks>=28 and marks<33:
    grace=33-marks
    print('garce marks is',grace)
    marks=marks+grace
    print('total marks',marks)

    ReplyDelete
  42. # PYTHON ( 6 To 7 PM BATCH)
    # CODE to Display "YES" and "NO" when user press 'y' and 'n'.

    a = str(input("Press Y or N"))

    b = ("Yes"if a=="y" else "No " if a=="n" else "Something Went Wrong" )

    print(b)

    ReplyDelete
  43. ABHISHEK GOYAL
    #WAP to Calculate Marksheet using five different subjects with the following condition.

    m1=int(input("enter marks of sub 1 "))
    if m1>100 or m1<0:
    print("enter marks between 0 and 100")
    m11=int(input("enter marks again"))
    m1=m11

    m2=int(input("enter marks of sub 2 "))
    if m2>100 or m2<0:
    print("enter marks between 0 and 100")
    m22=int(input("enter marks again"))
    m2=m22

    m3=int(input("enter marks of sub 3 "))
    if m3>100 or m3<0:
    print("enter marks between 0 and 100")
    m33=int(input("enter marks again"))
    m3=m33

    m4=int(input("enter marks of sub 4 "))
    if m4>100 or m4<0:
    print("enter marks between 0 and 100")
    m44=int(input("enter marks again"))
    m4=m44

    m5=int(input("enter marks of sub 5 "))
    if m5>100 or m5<0:
    print("enter marks between 0 and 100")
    m55=int(input("enter marks again"))
    m5=m55

    c=0
    if m1<33:
    c=c+1
    m6=m1+(33-m1)
    m7=33-m1
    m1=m6
    print("graced in subject 1 by ", m7,' marks')

    if m2<33:
    c=c+1
    m6=m2+(33-m2)
    m7=33-m2
    m2=m6
    print("graced in subject 2 by ", m7,' marks')

    if m3<33:
    c=c+1
    m6=m3+(33-m3)
    m7=33-m3
    m3=m6
    print("graced in subject 3 by ", m7,' marks')

    if m4<33:
    c=c+1
    m6=m4+(33-m4)
    m7=33-m4
    m4=m6
    print("graced in subject 4 by ", m7,' marks')

    if m5<33:
    c=c+1
    m6=m5+(33-m5)
    m7=33-m5
    m5=m6
    print("graced in subject 5 by ", m7,' marks')



    #print(c)


    if c==0:
    p= ((m1+m2+m3+m4+m5)/5)
    print(p)
    if p>=90:
    print("A Grade")
    elif p>=80 and p<90:
    print("B Grade")
    elif p>=70 and p<80:
    print("C Grade")
    else:
    print("D Grade")


    elif c==1:
    p=((m1+m2+m3+m4+m5)/5)
    print(p)
    if p>=90:
    print("A Grade")
    elif p>=80 and p<90:
    print("B Grade")
    elif p>=70 and p<80:
    print("C Grade")
    else:
    print("D Grade")

    elif c>1:
    print("FAILED!!!")



    ReplyDelete
  44. #AKASH PATEL:- LEAP YEAR PROGRAM
    year = int(input("Enter a year: "))

    if (year % 4) == 0:
    if (year % 100) == 0:
    if (year % 400) == 0:
    print("{0} is a leap year".format(year))
    else:
    print("{0} is not a leap year".format(year))
    else:
    print("{0} is a leap year".format(year))
    else:
    print("{0} is not a leap year".format(year))

    ReplyDelete
  45. #AKASH PATEL
    WAP to increase the Salary of an employee from 500 if the entered salary is less than 10000 otherwise increase by 800:-

    sal=int(input("Enter salary of Employee :- "))
    if sal<10000:
    sal=sal+500
    print(sal)
    else:
    sal = sal+800
    print(sal)



    ReplyDelete
  46. #AKASH PATEL
    WAP to check number is positive or negative:-
    num = int(input("Enter number = "))

    if num > 0:
    print(num, "number is positive")

    else:
    print(num, "number is negative")

    ReplyDelete
  47. Program to check vowel, consonent

    ch1 = input("enter char")

    ch = chr(ord(ch1)+32) if ord(ch1)>=65 and ord(ch1)<=90 else ch1
    s=''
    if ch=='a':
    s='vowel'
    elif ch=='e':
    s='vowel'
    elif ch=='i':
    s='vowel'
    elif ch=='o':
    s='vowel'
    elif ch=='u':
    s='vowel'
    else:
    s='consonant'
    print(s)

    ReplyDelete
  48. #if salery of employee lessthen 10000 salery add 500 ammaunt
    salary=int(input(" Enter the employee salary :"))
    if(salary<10000):
    salary=salary+500
    print("total salary is",salary)

    ReplyDelete
  49. sb1= input("Enter the Subject name = ")
    n1 = int(input("Enter the Marks = "))
    sb2= input("Enter the Subject name = ")
    n2 = int(input("Enter the Marks = "))
    sb3= input("Enter the Subject name = ")
    n3 = int(input("Enter the Marks = "))
    sb4= input("Enter the Subject name = ")
    n4 = int(input("Enter the Marks = "))
    sb5= input("Enter the Subject name = ")
    n5 = int(input("Enter the Marks = "))

    if(n1>0 and n1<=100) and (n2>0 and n2<=100 ) and (n3>0 and n3<=100 ) and (n4>0 and n4<=100 ) and (n5>0 and n5<=100 ) :
    count = 0
    sup = 0
    g = 0
    sub = ""
    if (n1>=28 and n1<33) :
    g = 33-m1
    sup = sup +1
    sub = sub + sb1
    print("You have Supply in = ",sub)
    print("You have passed with grace ",g)
    elif (n1>=33):
    sub = sub + sb1
    count = count+1
    print("You have Passed in =",sub)
    else:
    ("You are Fail ")

    if (n2>=28 and n2<33) :
    g = 33-m2
    sup = sup +1

    sub = sub +sb2
    print("You have Supply in =",sub)
    print("You have passed with grace ",g)
    elif (n2>=33):
    sub = sub + sb2
    count = count+1
    print("You have Passed in ",sub)
    else:
    ("You are Fail ")

    if (n3>=28 and n3<33) :
    g = 33-m3
    sup = sup +1

    sub = sub +sb3
    print("You have Supply in ",sub)
    print("You have passed with grace ",g)
    elif (n3>=33):
    sub = sub + sb3
    count = count+1
    print("You have Passed in = ",sub)
    else:
    ("You are Fail ")

    if (n4>=28 and n4<33) :
    g = 33-m4
    sup = sup +1
    sub = sub +sb4
    print("You have Supply in ",sub)
    print("You have passed with grace ",g)
    elif (n4>=33):
    sub = sub +sb4
    count = count+1
    print("You have Passed in = ",sub)
    else:
    ("You are Fail ")

    if (n5>=28 and n5<33):
    g = 33-m5
    sup = sup+1
    sub = sub +sb5
    print("You have Supply in ",sub)
    print("You have passed with grace ",g)
    elif (n5>=33):
    sub = sub +sb5
    count = count+1
    print("You have Passed in = ", sub)
    else:
    ("You are Fail ")
    if (count==5):

    p = (n1+n2+n3+n4+n5)/5


    if(p>60):
    print("You Have Passed in First Division")
    elif(p>45 and p<=60):
    print("You Have Passed in Second Division")

    else:
    print("You Have Passed in Third Division")

    elif(c==1):
    print("You Have passed With Grace ",g)

    else:
    print('You Have Failed Try Next Year ')


    else:
    print("Enter the valid marks between 0 to 100")

    ReplyDelete
  50. # program for calculate Income Tax 2021 slap#


    salery = int(input("Enter Your Salery = "))
    if (salery <=300000):
    print("You are not Tax Paid Person")
    elif(salery>=300000 and salery <=500000):
    p = (salery*5)/100
    print("You Are Tax Paid Persion .You will pay Tax = ",p)
    elif(salery>=500000 and salery<=100000):
    if (salery>500000):
    s = salery-500000
    p = (s*20)/100
    t = p +10000
    print("You will be Pay Total Tax = ",t)
    else:
    Print("You Will Pay Income Tax = 1000 ")

    elif(salery>=1000000):
    if (salery>1000000):
    s = salery-1000000
    p = (s*30)/100
    t = p+110000
    print("You Will Pay Total Income Tax = ",t)
    else:
    print("You Will Pay Income Tax = 110000")

    else:
    print("Enter Valid Salery ")

    ReplyDelete
  51. #Akash patel
    Income tax slab program:-
    salary=int(input("enter total salary"))

    if(salary>250000):
    its=(salary*5/100)
    print("income tax slab",its)
    else:
    print("salary is not in income tax slab")

    ReplyDelete
  52. Ch = input("enter char")
    if ord(ch)>=65 and ord(ch)<=90:
    print("it is in upper case")
    elif (ord(ch)>=97 and ord(ch)<=122)
    Print ("it is in lower case
    (ch)>=48 and (ch)<=57):
    print("it is numeric")
    else:
    If chr(ch) =='@' Or chr(ch) =='$' or chr (ch) =='#'
    Print("special character. ") else:
    Print(" Others ")

    ReplyDelete
  53. # income tax calculation
    income=int(input("Enter income"))
    if income<=250000:
    tax=0
    print("tax")
    elif income>=250001 and income<=500000:
    tax=income*0.05
    print("tax",tax)
    elif income>=500001 and income<=750000:
    tax=incoome*0.10
    print("tax",tax)
    elif income>=750001 and income<=1000000:
    tax=income*0.15
    print("tax",tax)
    elif income>=1000001 and income<=1250000:
    tax=incoome*0.10
    print("tax",tax)
    elif income>=1250001 and income<=1500000:
    tax=income*0.15
    print("tax",tax)
    else:
    tax=income*0.30
    print("tax",tax)

    ReplyDelete
  54. salary=int(input("Enter The Salary:="))
    txt=0
    if salary>=300000 and salary <500000:
    txt=salary*0.05
    print("Salary is:=",txt)
    elif salary>=500000 and salary<=750000:
    tax=salary*0.1
    print("Salary is:=",tax)
    elif salary>=750000 and salary<1000000:
    tax=salary*0.15
    print("Salary is:=",tax)
    elif salary>=1000000:
    tax=salary*0.3
    print("Salary is:",tax)

    ReplyDelete
  55. # program for calculate 2021 income tex slabs #

    salery = int(input("Enter Your Salery "))
    if (salery <=300000):
    print("You are not Tax Paid Person")
    elif(salery>=300000 and salery <=500000):
    p = (salery*5)/100
    print("You Are Tax Paid Persion .You will pay Tax = ",p)
    elif(salery>=500001 and salery<=1000000):
    if (salery>500000):
    s = salery-500000
    p = (s*20)/100
    print("You will be Pay Total Tax = ",p+10000)
    else:
    Print("You Will Pay Income Tax = 10000 ")

    elif(salery>=1000000):
    if (salery>1000000):
    s = salery-1000000
    p = (s*30)/100
    print("You Will Pay Total Income Tax = ",p+110000)
    else:
    print("You Will Pay Income Tax = 110000")

    else:
    print("Enter Valid Salery ")

    ReplyDelete
  56. # program for check enter username & password are correct or incorrect #

    u = input("Enter Your Username = ")
    if (u == "vishal"):
    p = input("Enter Your Password = ")
    if(p =="Baghel@123"):
    print(" Congratulation ,Your Username & Password is Correct , Now You can Process")
    else:
    print("Your Password Is Incorrect ")
    print("Try Again")

    else:
    print("Your Username Is incorrect")
    print("Try Again")

    ReplyDelete
  57. ASSIGNMENT OF PYTHON PROGRAM?

    Q1)WAP to manage baning operation with credit, debit, check balance when user press c,d and b.
    before transaction first enter pincode?
    pinode will be 1234.


    Q2) Create horoscope according to rashi?


    Q3) WAP to calculate addition, substraction, multiplication and division where user press +,-,*, and / symbol?

    Q4) WAP to check that today is sunday or not?

    ReplyDelete
  58. # VISHAL BAGHEL #
    # program for banking use #
    pin = int(input("Enter Your Four Digit Pin = "))
    if (pin==4321):
    ch = input("Enter C for Credit & D for Debit & B for Balance = ")
    if(ch =='c' or ch=='C'):
    print("Your Credit Amount is 10000 Rs")
    elif(ch=='d' or ch=='D'):
    print("Your Debit Amount is = 5000")
    elif(ch=='b' or ch=='B'):
    print("Your Total Balance is 150000 ")
    else:
    print("Plz Enter C , D & B only ")
    else :
    print ("You are Enter Wrong Pin No. ")
    print("Try Again ")

    ReplyDelete
  59. #VISHAL BAGHEL#
    #Program for Two Digit Calculater #
    num1 = int(input("Enter First Digit only Number Accept = "))
    num2 = int(input("Enter Second Digit only Number Accept = "))
    o = input("Enter + for Addition & - for Substraction & * for Multiplication & / for Divide = ")

    if (o=='+'):
    s = num1 + num2
    print("Your Enter No Addition is = "+str(s))
    elif(o=='-'):
    if(num1>num2):
    s = num1-num2
    print("Your Enter No Substraction is = "+str(s))
    else:
    s = num2-num1
    print("Your Enter No Substraction is = "+str(-s))
    elif(o=='*'):
    s = num1 * num2
    print("Your Enter No Multiplication is = "+str(s))
    elif(o=='/'):
    s = num1 / num2
    print("Your Enter No Division is = "+str(s))

    else:
    print("Plz Enter Valid NO.")
    print("Try Again")

    ReplyDelete
  60. WAP to calculate addition, substraction, multiplication and division where user press +,-,*, and / symbol?

    a=int(input("Enter first number:="))
    b=int(input("Enter Second number:="))
    symbol=input(" Press + for addiion\n - for substraction \n * for mulltipication \n / for division\n")
    if symbol=="+":
    print("sum of the number is:=",a+b)
    elif symbol=="-":
    print("substractin is:=",a-b)
    elif symbol=="*":
    print("mulltipicatoin is:=",a*b)
    elif symbol=="/":
    print("division is:=",a/b)
    else:
    print("Incorrect Symbol")

    ReplyDelete
  61. # sunil parmar
    # WAP to calculate addition, substraction, multiplication and division where user press +,-,*,/, symbole

    num1=int(input("Enter first number"))
    num2=int(input("Enter second number"))
    ch=input("Enter any char for operation +, -, *,/")
    if ch=='+':
    result=num1+num2
    print(num1, ch, num2, ":",result)
    elif ch=='-':
    result=num1-num2
    print(num1, ch, num2, ":",result)
    elif ch=='*':
    result=num1*num2
    print(num1, ch, num2, ":",result)
    elif ch=='/':
    result=num1/num2
    print(num1, ch, num2, ":",result)
    else:
    print("input character is not valid")

    ReplyDelete
  62. #sunil parmar


    #banking operation
    p=input("Press your pin")
    if p=='1234':
    x=input("Press c,b,d for banking operation")
    if x=='c' or x=='C':
    print("creadit amount")
    elif x=='d' or x=='D':
    print("dabit amount")
    elif x=='b' or x=='B':
    print("Balance Enquary")
    else:
    print("transaction failed")

    ReplyDelete
  63. WAP to calculate addition, substraction, multiplication and division where user press +,-,*, and / symbol?


    n1=int(input("Enter the first number= : "))
    n2=int(input("Enter the second number= : "))
    ch=input("Enter any of these operator for operation +, -, *, / = ")
    if ch=='+':
    r=n1+n2;
    print("you enter + operator :- \n",n1,ch,n2,": ",r)
    elif ch=='-':
    r=n1-n2;
    print("you enter - operator :- \n",n1,ch,n2,": ",r)
    elif ch=='*':
    r=n1*n2;
    print("you enter * operator :- \n",n1,ch,n2,": ",r)
    elif ch=='/':
    result=n1/n2;
    print("you enter / operator :- \n",n1,ch,n2,": ",r)
    else:
    print("Please enter any of these operator +,-,*,/")

    ReplyDelete
  64. #Akash patel
    Arithmetic operation program :-
    a=int(input("ENTER FIRST NUMBER")
    b=int(input("ENTER SECOND NUMBER")
    Ch=input("press '+' , '-' , '*' or '/'symbol")
    if ch==' +':
    Result=a+b
    print("total is:", result)
    elif ch==' - ':
    Result=a-b
    print("total is:", result)
    elif ch==' * ':
    Result=a*b
    print("total is:", result)
    elif ch==' /':
    Result=a/b
    print("total is:", result)
    else
    Print("invalid key")

    ReplyDelete
  65. #Akash patel
    Know your rashi program by month:-
    ch=input("Enter the month in which you were born")

    if month == 'january':
    rashi = 'Capricorn'

    elif month == 'february':
    rashi= 'Aquarius'

    elif month == 'march':
    rashi = 'Pisces'

    elif month == 'april':
    rashi = 'Aries'

    elif month == 'may':
    rashi = 'Taurus'

    elif month == 'june':
    rashi = 'Gemini'

    elif month == 'july':
    rashi = 'Cancer'

    elif month == 'august':
    rashi = 'Leo'

    elif month == 'september':
    rashi = 'Virgo'

    elif month == 'october':
    rashi = 'Libra'

    elif month == 'november':
    rashi = 'scorpio
    else month == 'december':
    rashi = 'Sagittarius'

    print(rashi)

    ReplyDelete
  66. #Akash patel
    Banking problem :-
    x=int(input("Enter pincode")
    if x==1234:
    ch=input(" press c or d ")
    if ch=='c':
    print ("credit card")
    ch=input(" press b to check balance")
    if ch=='b':
    Print("balance is 5000")
    else ch=='d':
    print("debit card ")
    ch=input(" press b to check balance")
    if ch=='b':
    print("balance is 10000")
    Else :
    Print("invalid pin")

    ReplyDelete
  67. #Ravi Vyas
    num = int(input("Multiplication using value? : "))
    i = 1
    fact = 1
    while i <=10:
    if num>0 and num<10:
    product = num*i
    print(num, " * ", i, " = ", product, "\n")
    i = i + 1
    else:
    while num != 0:
    fact=fact*num
    num = num - 1
    i = i + 10

    if fact != 1:
    print(fact)

    ReplyDelete
  68. #Ravi Vyas
    num=int(input("Enter phonen number"))
    rev=0
    while (num>0):
    rev=(rev*10)+num%10
    num=num//10
    print(rev)

    ReplyDelete
  69. Solution of Leap Year Program to Check Leap Year or Not?
    year = int(input("Enter year to check leap year"))
    if year%400==0 or (year%4==0 and year%100!=0):
    print("Leap year")
    else:
    print("Not a Leap Year")


    ReplyDelete
  70. Solution of Leap Year Program to Check Leap Year or Not?
    year = int(input("Enter year to check leap year"))
    if year%400==0 or (year%4==0 and year%100!=0):
    print("Leap year")
    else:
    print("Not a Leap Year")


    ReplyDelete
  71. salary=int(input("enter ur salary"))
    if salary<=10000:
    salary=salary+500
    print (salary)
    else:
    salary=salary+800
    print(salary)

    ReplyDelete
  72. '''SURENDRA SINGH RAJPUT'''
    ch = input("Enter Your Input")
    if (ord(ch))>=48 and (ord (ch)<=57):
    print("Number")
    elif (ord(ch))>=65 and (ord(ch))<=90 or (ord(ch))>=97 and (ord(ch)<=122):
    print("This Is Alphabet")
    else:
    print("Not A Number and Alphabet")

    ReplyDelete
  73. year=int(input("enter year"))
    if ((year%400==0) or (year%4==0) and (year%100!=0)):
    print("entred year is leap year")
    else:
    print("entred year is not an leap year")

    ReplyDelete
  74. '''Surendra Singh Rajput'''
    #Income Tax Createria
    sal =int(input("Enter Your Salery"))
    if sal>=1000000:
    print("You are eliguble for piad Tax")
    else :
    print("You are Not eligible for Tax ")

    ReplyDelete
  75. num=int(input("enter number"))
    if num>=0:
    print("number is +ve")
    else:
    print("number is -ve")

    ReplyDelete
  76. #Vowel and Consonant By '''Surendra Singh Rajput'''
    ch = (input("Enter Char"))
    if ch=='a':
    print("Vowel")
    else:
    if ch=='e':
    print("Vowel")
    else:
    if ch=='i':
    print("Vowel")
    else:
    if ch=='o':
    print("Vowel")
    else:
    if ch=='u':
    print("Vowel")

    else:
    print("Consonat")

    ReplyDelete
  77. ch=input("enter character")
    if (ord(ch)>64 and ord(ch)<91) or (ord(ch)>96 and ord(ch)<123):
    print("value is alphabet")
    else:
    print("character is numaric")

    ReplyDelete
  78. #Mohit Singh Chouhan
    Other Assignment Questions .

    Ques . 1
    c=input("Enter any char : ")
    if c>chr(65) and cchr(96) and c65:
    print(" You are in Critical contion and you having high BP ")
    else:
    print("YOu are Healthy and Normal ")

    Ques.3
    o=input("ENter the Char : ")
    if o==chr(65)or o==chr(97) or o==chr(69) or o==chr(101) or o==chr(73) or o==chr(105) or o==chr(79) or o==chr(111) or o==chr(85) or o==chr(117):
    print(" it's a vowel")
    else:
    print("Consonants")

    Ques.4
    s=int(input("Enter the salary : "))
    if s>=450000:
    print("You are comming in tax criteria , your tax free amount is : ", s-35000 ) #here we assume the tax amount is 35000
    else:
    print("You are Tax free ")

    ReplyDelete
  79. i=int(input("enter number" ))
    if(i>0)and(i>-1):
    print("positive number")
    else:
    print("negetive number")'''

    '''(2)wap to check that entered character is numric or alphabet ?'''

    '''ch=input("enter number/ alphabet: ")
    if ch>='a' and ch<='z' or ch>='A' and ch<='Z':
    print("ALPHABET")
    else:
    print("NUMERIC")'''

    '''(3)WAP TO CHECK SALARY IS AN INCOME TAX CRITERIA OR NOT
    IF INCOME TAX THAN DISPLAY TOTAL SALARY NON TAXABLE AMOUNT'''

    i=int(input("ENTER SALARY: "))
    z=0
    if(i>=350000):
    print("SALARY ARE UNDER TAX CRITRIA ", (i*15)/100,"\nTOTAL AMOUNT AFTER DEDUCTION",i- (i*15)/100)
    else:
    print("non taxable amount")

    ReplyDelete
  80. #NIKHIL SINGH CHOUHAN

    '''(1)WAP to check number is positive or negative?

    i=int(input("enter number" ))
    if(i>0)and(i>-1):
    print("positive number")
    else:
    print("negetive number")'''

    '''(2)wap to check that entered character is numric or alphabet ?'''

    '''ch=input("enter number/ alphabet: ")
    if ch>='a' and ch<='z' or ch>='A' and ch<='Z':
    print("ALPHABET")
    else:
    print("NUMERIC")'''

    '''(3)WAP TO CHECK SALARY IS AN INCOME TAX CRITERIA OR NOT
    IF INCOME TAX THAN DISPLAY TOTAL SALARY NON TAXABLE AMOUNT'''

    i=int(input("ENTER SALARY: "))
    z=0
    if(i>=350000):
    print("SALARY ARE UNDER TAX CRITRIA ", (i*15)/100,"\nTOTAL AMOUNT AFTER DEDUCTION",i- (i*15)/100)
    else:
    print("non taxable amount")

    ReplyDelete
  81. #1) WAP to increase the Salary of an employee from 500 if the entered salary is less than 10000 otherwise increase by 800?
    sal=int(input("Enter value : "))
    if(sal<10000):
    sal=sal+500
    else:
    sal=sal+800
    print("Your salary is ",sal)

    ReplyDelete
  82. #2) WAP to Check Leap Year?
    year=int(input("Enter year : "))
    if((year%400==0) or (year%4==0 and year%100!=0 )):
    print("that's a leap year.....")
    else:
    print("that's not a leap year.....")

    ReplyDelete
  83. #3) WAP to check number is positive or negative?
    no = int(input("Enter a number : "))
    if(no>0):
    print("Number is Positive.....")
    else:
    print("Number is Negative.....")

    ReplyDelete
  84. #4) WAP to check the entered character is numeric or alphabet?
    ch = input("Entered any charactor : ")
    if((ch>='a' and ch<='z') or (ch>='A' and ch<='Z')):
    print("this character is a Alphabet.....")
    else:
    print("this character is a Numeric.....")

    ReplyDelete
  85. #5) WAP to display covid result critical of age is >65..........otherwise display Normal? (..and any madical related issues..)
    age = int(input("plzz enter your age : "))
    if(age>65):
    print("Covid Result : 'Critical'.....")
    else:
    print("Covid Result : if patient have any Madical related issus, he's 'Critical', otherwise he's 'Normal'.....")

    ReplyDelete
  86. #6) WAP to check V0wel and Consonant without using or Operator?
    al=input("Enter alphabet : ")
    s = 0 if(al=='a') else 0 if(al=='e') else 0 if(al=='i') else 0 if(al=='o') else 0 if(al=='u') else 0 if(al=='A') else 0 if(al=='E') else 0 if(al=='I') else 0 if(al=='O') else 0 if(al=='U') else 1
    #s = 2 if(int(al)<65 and int(al)>90) else 2 if(int(al)<97 and int(al)>122) else (0 if(al=='a') else (0 if(al=='e') else (0 if(al=='i') else(0 if(al=='o') else (0 if(al=='u') else (0 if(al=='A') else (0 if(al=='E') else (0 if(al=='I') else(0 if(al=='O') else (0 if(al=='U') else 1))))))))))
    if(s==0):
    print("It's not a Vowel.....")
    else:
    print("its a Consonants.....")

    ReplyDelete
  87. #7) WAP to check salary is an income tax criteria or not if income tax then display total salary non taxable income?
    sal=int(input("Entered your salary : "))
    if(sal>250000):
    print("It's a Taxable Income..... \ntotal ammount after deduction ", sal-(sal*15)/100)
    else:
    print("Non Taxable Income.....")

    ReplyDelete
  88. #NIKHIL SINGH CHOUHAN

    a=int(input("Enter Hindi Marks: "))
    b=int(input("Enter English Marks: "))
    c=int(input("Enter Maths Marks: " ))
    d=int(input("Enter Science Marks: " ))
    e=int(input("Enter sanskrit Marks: "))
    t=a+b+c+d+e
    p=(t/500)*100
    print("percentage of student,%.2f"%p)
    g=0
    h=0
    if(a>=33)and(b>=33)and(c>=33)and(d>=33)and(e>=33):
    if(a>=75):
    print("distintion in hindi")
    if(b>=75):
    print("distintio in english")
    if(c>=75):
    print("distintion in maths")
    if(d>=75):
    print("distintion in science")
    if(c>=75):
    print("distintion in sanskrit")

    if(p>=60):
    print("1st divison")
    if(p<60)and(p>40):
    print("2nd divison")
    if(p<=40):
    print("3rd divison")
    if(a>=28)or(b>=28)or(c>=28)or(d>=28)or(e>=28):
    if(a>=28)and(a<=33):
    g=33-a
    h=a+g
    print("supply in hindi \ngrace of number",g,"\npass with grace in hindi",h)
    if(b>28)and(b<=33):
    g=33-b
    h=b+g
    print("supply in english \ngrace of number",g,"\npass with grace in english",h)
    if(c>28)and(c<=33):
    g=33-c
    h=c+g
    print("supply in maths \ngrace of number",g,"\npass with grace in maths",h)
    if(d>28)and(d<=33):
    g=33-d
    h=d+g
    print("supply in science \n grace of number",g,"\npass with grace in science",h)
    if(e>28)and(e<=33):
    g=33-e
    h=e+g
    print("supply in sanskrit \ngrace of number",g,"\npass with grace in sanskrit",h)
    if(a<28)or(b<28)or(c<28)or(d<28)or(e<28):
    if(a<28):
    print("fail in hindi")
    if(b<28):
    print("fail in english")
    if(c<28):
    print("fail in maths")
    if(d<28):
    print("fail in science")
    if(e<28):
    print("fail in sanskrit")
    else:
    if (a>100)or(b>100)or(c>100)or(d>100)or(e>100):
    print("please cheak marks")

    ReplyDelete
  89. '''WAP to check that the entered number is a one-digit positive number,
    negative or two-digit positive number, or negative?
    #BY LADDER
    i=int(input("enter mumber"))
    if(i>=0)and(i<=9):
    print("NUMBER IS ONE DIGIT AND POSITIVE")
    elif(i<=0)and(i>=-9):
    print("NUMBER IS ONE DIGIT OR NEGETIVE ")
    elif(i>=9):
    print("number is two digit and positive number")
    else:
    print("number is two digit and negetive number")'''

    '''WAP to check that the entered number is a one-digit positive number,
    negative or two-digit positive number, or negative?
    #BY NASTED
    i=int(input("enter number"))
    if(i>=0):
    if(i<=9):
    print("NUMBER IS ONE DIGIT AND POSITIVE")
    else:
    print("NUMBER IS TWO DIGIT AND POSITIVE")
    else:
    if(i<=-9):
    print("NUMBER IS two DIGIT AND NEGETIVE")
    else:
    print("NUMBER IS one DIGIT AND NEGETIVE")'''

    ReplyDelete
  90. '''NIKHIL SINGH CHOUHAN
    #WAP to calculate greatest using four different number using nested and ladder both?
    #LADDER
    a=int(input("enter number"))
    b=int(input("enter number"))
    c=int(input("enter number"))
    d=int(input("enter number"))
    if(a>b):
    if(a>b):
    if(a>c):
    if(a>d):
    print("a is greatest")
    else:
    print("d is greatest")
    else:
    print("c is greatest")
    else:
    print("b is greatest")

    else:
    if(b>a):
    if(b>c):
    if(b>d):
    print("b is greatest")
    else:
    print(" d is greatest")
    else:
    print("c is greatest")'''
    #NESTED
    a=int(input("enter number"))
    b=int(input("enter number"))
    c=int(input("enter number"))
    d=int(input("enter number"))
    if(a>b)and(a>c)and(a>d):
    print("A IS GREATST NUMBER")
    elif(b>c)and(b>d):
    print("B IS GREATEST NUMBER")
    elif(c>d):
    print("C IS GREATER NUMBER")
    else:
    print("D IS GREATER NUMBER")

    ReplyDelete
  91. sachin kumar gautam

    #number is positive or negative
    num=int(input("Enter the number"))
    if num>0:
    print("number is positive")
    else:
    print("number is negative")

    ReplyDelete
  92. '''#NIKHIL SINGH CHOUHAN
    #WAP to check that salary is in income tax criteria or not. if in income tax then display income tax slab.
    #ladder
    i=int(input("enter salary"))
    if(i>250000):
    print("it is applicable salary for income tax 13% \n",(i*13)/100,"\nafter deducton income tax ACTUAL SALARY",i-(i*13)/100)
    elif(i>250000) and(i<=550000):
    print("it is applicable salary for income tax 13% \n",(i*18)/100,"\nafter deducton income tax ACTUAL SALARY",i-(i*18)/100)
    elif(i>550000) and(i<=200000):
    print("it is applicable salary for income tax 13% \n",(i*22)/100,"\nafter deducton income tax ACTUAL SALARY",i-(i*22)/100)
    elif(i>200000):
    print("it is applicable salary for income tax 13% \n",(i*30)/100,"\nafter deducton income tax ACTUAL SALARY",i-(i*30)/100)
    else:
    print("not applicable for tax") '''
    #NESTED
    i=int(input("enter salary"))
    if(i>200000):
    if(i<1500000):
    if(i<1000000):
    if(i<500000):
    print("not taxable amount")
    else:
    print("it is applicable salary for income tax 13% \n",(i*13)/100,"\nafter deducton income tax ACTUAL SALARY",i-(i*13)/100)
    else:
    print("it is applicable salary for income tax 18% \n",(i*18)/100,"\nafter deducton income tax ACTUAL SALARY",i-(i*18)/100)
    else:
    print("it is applicable salary for income tax 23% \n",(i*23)/100,"\nafter deducton income tax ACTUAL SALARY",i-(i*23)/100)
    else:
    print("it is applicable salary for income tax 30% \n",(i*30)/100,"\nafter deducton income tax ACTUAL SALARY",i-(i*30)/100)

    ReplyDelete
  93. s1=input("enter subject")
    a=int(input("enter marks"))
    s2=input("enter subject")
    b=int(input("enter marks"))
    s3=input("enter subject")
    c=int(input("enter marks"))
    s4=input("enter subject")
    d=int(input("enter marks"))
    s5=input("enter subject")
    e=int(input("enter marks"))
    if ((a>=0 and a<=100) and (b>=0 and b<=100) and (c>=0 and c<=100) and (d>=0 and d<=100) and (e>=0 and e<=100)):
    if (a<28 ):
    print("failed in ", s1)
    elif a<33:
    print("pass by grace in", s1,"by",33-a)
    elif a>75:
    print("distinction in", s1)
    else:
    print(" ")

    if (b<28 ):
    print ("failed in" ,s2)
    elif b<33:
    print("pass by grace in" ,s2,"by",33-b)
    elif b>75:
    print("distinction in" ,s2)
    else:
    print(" ")

    if (c<28):
    print ("failed in" ,s3)
    elif c<33:
    print("pass by grace",s3,"by" ,33-c)
    elif c>75:
    print("distinction in" ,s3)
    else:
    print(" ")

    if (d<28 ):
    print ("failed in" ,s4)
    elif d<33:
    print("pass by grace" ,s4,"by",33-d)
    elif d>75:
    print("distinction in" ,s4)
    else:
    print(" ")

    if (e<28 ):
    print ("failed in" ,s5 )
    elif e<33:
    print("pass by grace",s5,"by" ,33-e)
    elif e>75:
    print("distinction in" ,s5)
    else:
    print(" ")

    if ((a>=33) and (b>=33) and (c>=33) and (d>=33) and (e>=33)):
    percentage=(a+b+c+d+e)/5
    print("percentage is",percentage)
    if (percentage>75):
    print("distinction in all subjects or pass by distinction ")
    else:
    print(" ")
    if (percentage<75 and percentage>60):
    print("1st division ")
    else:
    print(" ")
    if (percentage<60 and percentage>50 ):
    print("2nd division")
    else:
    print(" ")
    if (percentage<50 and percentage>40):
    print("3rd division")
    else:
    print(" ")
    else:
    print("marks not bitween 0 to 100 in one or more subject")

    ReplyDelete
  94. #NIKHIL SINGH CHOUHAN
    '''wap TO CHECK THAT USERNAME AND PASSWORD BOTH ARE CORRECT OR NOT
    WHERE USERNAME IS YOUR FIRST NAME AND PASSWORD YOUR LASTNAME?

    PROVIDE SEPARATE MESSAGE FOR INVALID USERNAME, INVALID PASSWORD,
    INVALID USERNAME AND PASSWORD'''

    i=input("ENTER USER NAME")
    a=input("ENTER PASSWORD")
    if(i=="nikhil"):
    if(a=="singh"):
    print("password is correct")
    else:
    print("invalid password")
    elif(i!="nikhil"):
    print("invalib user name")
    else:
    print("INVALID USERNAME AND PASSWORD")

    ReplyDelete
  95. #NIKHIL SINGH CHOUHAN
    '''wap TO CHECK THAT USERNAME AND PASSWORD BOTH ARE CORRECT OR NOT
    WHERE USERNAME IS YOUR FIRST NAME AND PASSWORD YOUR LASTNAME?

    PROVIDE SEPARATE MESSAGE FOR INVALID USERNAME, INVALID PASSWORD,
    INVALID USERNAME AND PASSWORD

    i=input("ENTER USER NAME")
    a=input("ENTER PASSWORD")
    if(i=="nikhil"):
    if(a=="singh"):
    print("password is correct")
    else:
    print("invalid password")
    elif(i!="nikhil"):
    print("invalib user name")
    else:
    print("INVALID USERNAME AND PASSWORD")'''

    '''PROVIDE SEPARATE MESSAGE FOR INVALID USERNAME, INVALID PASSWORD,
    INVALID USERNAME AND PASSWORD'''
    i=input("enter user name")
    a=input("enter password")
    if(i=="nikhil")and(a=="singh")or(i=="NIKHIL")and(a=="SINGH"):
    print("USER NAME OR PASSWORD CORRECT")
    elif(i!="nikhil")and(a!="singh")or(i!="NIKHIL")and(a!="SINGH"):
    print("USER NAME OR PASSWORD ARE INCORRECT")
    elif (i=="nikhil")and(a!="singh")or(i=="NIKHIL")and(a!="SINGH"):
    print("INVALID PASSWORD ")
    else:
    print("INVALID USERNAME ")

    ReplyDelete
  96. # Aditya Gaur
    sub1 = int(input("enter marks"))
    sub2 = int(input("enter marks"))
    sub3 = int(input("enter marks"))
    sub4 = int(input("enter marks"))
    sub5 = int(input("enter marks"))

    if sub1>=28 and sub1<33:
    g=33-sub1
    print('grace mark is ',g)
    sub1=sub1+g
    elif sub2>=28 and sub2<33:
    g=33-sub2
    print('grace mark is ',g)
    sub2=sub2+g
    elif sub3>=28 and sub3<33:
    g=33-sub3
    print('grace mark is ',g)
    sub3=sub3+g
    elif sub4>=28 and sub4<33:
    g=33-sub4
    print('grace mark is ',g)
    sub4=sub4+g
    elif sub5>=28 and sub5<33:
    g=33-sub5
    print('grace mark is ',g)
    sub5=sub5+g

    avg=(sub1+sub2+sub3+sub4+sub5)/5
    print('%',avg)

    if(avg>=60 and avg<=100):
    print("1st DIv")
    elif(avg>=45 and avg<60):
    print("2nd DIv")
    elif(avg>=33 and avg<45):
    print("3rd DIv")
    else:
    print("Fail")

    ReplyDelete
  97. #Q) WAP to increase the salary of employees from 500 if entered salary will be less than 10000 otherwise the same salaries will be displayed.
    sal=int(input("Entered the salary : "))
    if(sal<10000):
    sal=sal+500;
    print(sal)

    ReplyDelete
  98. #Q) WAP to check that the entered number is a one-digit number or above one-digit number, the number can be positive or negative?
    no=int(input("Entered Number : "))
    if(no>=-9 and no<=9):
    print("This is a one digite number.....")
    else:
    print("This is not a one-digite number.....")

    ReplyDelete
  99. #Q) WAP to check that the entered number is a one-digit positive number, negative or two-digit positive number, or negative?
    no1=int(input("Entered Number : "))
    no = -no1 if(no1<0) else no1
    if(no<10):
    print("This is a one digite number.....")
    elif(no<100):
    print("This is a two digite number.....")
    else:
    print("it is above one or two digite number.....")

    ReplyDelete
  100. #Q) WAP to check that the entered number is a one-two-three digits positive or negative number?
    no1=int(input("Entered Number : "))
    no = -no1 if(no1<0) else no1
    if(no<10):
    print("This is a one digite number.....")
    elif(no<100):
    print("This is a two digite number.....")
    elif(no<1000):
    print("This is a three digite number.....")
    else:
    print("it is above one or two or three digite number.....")

    ReplyDelete
  101. #Q) WAP to check the greatest number?
    a=int(input("Entered Number : "))
    b=int(input("Entered Number : "))
    c=int(input("Entered Number : "))
    if(a>b and a>c):
    print("a is greatest.....")
    elif(b>a and b>c):
    print("b is greatest.....")
    else:
    print("c is greatest.....")

    ReplyDelete
  102. #Q) WAP to check divisibility of number from 3,5 and 9 with all combination:-
    no=int(input("Entered a number : "))
    if(no%3==0):
    print("This number is divisible by 3.....")
    if(no%5==0):
    print("This number is divisible by 5.....")
    if(no%9==0):
    print("This number is divisible by 9.....")

    ReplyDelete
  103. #Q) WAP to check that entered input is numeric char or alphabet char?
    ch1=input("Enter a charactor : ")
    ch = (ord(ch1)-32) if((ord(ch1)>=97) and (ord(ch1)<=122)) else ord(ch1)
    if(ch>=48 and ch<=57):
    print("this is a numeric.....")
    elif(ch>=65 and ch<=90):
    print("this is a Alphabet.....")
    else:
    print("you put something else charactor.....")

    ReplyDelete
  104. #Q) WAP to display "YES" and "NO" when the user press 'y' and 'n'?
    ch=input("Enter 'y' or 'n' : ")
    if(ch=='y'):
    print("YES")
    if(ch=='n'):
    print("NO")

    ReplyDelete
  105. #Q) WAP to check the middle number is a three-digit number?
    a=int(input("Entered a number : "))
    b=int(input("Entered a number : "))
    c=int(input("Entered a number : "))
    if((a>b and ac)):
    print("A is a middle number.....")
    elif((b>a and bc)):
    print("B is a middle number.....")
    else:
    print("C is a middle number.....")

    '''and thats a wrong logic, thats why i hide it.....
    if(a>b and aa and b<c):
    print("B is a middle number.....")
    else:
    print("C is a middle number.....")'''

    ReplyDelete
  106. #Q) WAP to calculate greatest using four different number using nested or ladder both? (and here i'm using nested, okkay..)
    a=int(input("Entered Number : "))
    b=int(input("Entered Number : "))
    c=int(input("Entered Number : "))
    d=int(input("Entered Number : "))
    if(a>b):
    if(a>c):
    if(a>d):
    print("a is greatest.....")
    else:
    print("d is greatest.....")
    else:
    if(c>d):
    print("c is greatest.....")
    else:
    print("d is greatest.....")
    else:
    if(b>c):
    if(b>d):
    print("b is greatest.....")
    else:
    print("d is greatest.....")
    else:
    if(c>d):
    print("c is greatest.....")
    else:
    print("d is greatest.....")'''

    ReplyDelete
  107. #Q) WAP to calculate greatest using four different number using nested or ladder both? (and here i'm using ladder, okkay..)
    a=int(input("Entered a number : "))
    b=int(input("Entered a number : "))
    c=int(input("Entered a number : "))
    d=int(input("Entered a number : "))
    if(a>b and a>c and a>d):
    print(a)
    elif(b>a and b>c and b>d):
    print(b)
    elif((b>a and c>b and c>d) or (a>b and c>a and c>d)):
    print(c)
    else:
    print(d)

    ReplyDelete
  108. #Q) WAP to check that entered char is vowel and consonant without using or operator?
    ch1 = input("enter char : ")
    if((ch1>='a' and ch1<='z') or (ch1>='A' and ch1<='Z')):
    ch = chr(ord(ch1)+32) if(ord(ch1)>=65 and ord(ch1)<=90) else ch1
    if(ch=='a'):
    print("Vowel")
    elif(ch=='e'):
    print("Vowel")
    elif(ch=='i'):
    print("Vowel")
    elif(ch=='o'):
    print("Vowel")
    elif(ch=='u'):
    print("Vowel")
    else:
    print("Consonant")
    else:
    print("You not putted an alphabets")

    ReplyDelete
  109. #Mark-sheet
    a=int(input("Enter the hindi marks = "))
    b=int(input("Enter the english marks = "))
    c=int(input("Enter the maths marks = "))
    d=int(input("Enter the science marks = "))
    e=int(input("Enter the so.science marks = "))
    if (a>=0 and a<=100) and (b>=0 and b<=100) and (c>=0 and c<=100) and (d>=0 and d<=100) and (e>=0 and e<=100) :
    per=(a+b+c+d+e)/5
    print("percentage",str(per)+"%")
    grc,p=0,0
    if a>=33 and b>=33 and c>=33 and d>=33 and e>=33:
    if a>=75:
    print("dict hindi")
    if b>=75:
    print("dict english")
    if c>=75:
    print("dict maths")
    if d>=75:
    print("dict science")
    if e>=75:
    print("dict so science")
    if per>=60:
    print("First division")
    elif per>=50:
    print("second division")
    else:
    print("third division")
    if a>=28 or b>=28 or c>=28 or d>=28 or e>=28:
    if a>=28 and a<=33:
    grc=33-a
    p=a+grc
    print("supp in hindi \n grace of number,'grc'\npass with grace hi hindi",p)
    if b>=28 and b<=33:
    grc=33-b
    p=b+grc
    print("supp in hindi \n grace of number,'grc'\npass with grace hi hindi",p)
    if c>=28 and c<=33:
    grc=33-c
    p=c+grc
    print("supp in hindi \n grace of number,'grc'\npass with grace hi hindi",p)
    if d>=28 and d<=33:
    grc=33-d
    p=d+grc
    print("supp in hindi \n grace of number,'grc'\npass with grace hi hindi",p)
    if e>=28 and e<=33:
    grc=33-e
    p=e+grc
    print("supp in hindi \n grace of number,'grc'\npass with grace hi hindi",p)
    if(a<28)or(b<28)or(c<28)or(d<28)or(e<28):
    if a<28:
    print("fail in hindi")
    if b<28:
    print("fail in english")
    if c<28:
    print("fail in maths")
    if d<28:
    print("fail in science")
    if e<28:
    print("fail in socience")
    else:
    print(" ")

    ReplyDelete



  110. m1,m2,m3,m4,m5 = 84,39,37,88,89
    s1,s2,s3,s4,s5 = 'PHY', 'CHEM', 'MATHS', 'ENG','HINDI'
    x=0
    mark=0
    sub=''
    dist=''
    if( (m1>=0 and m1<=100) and (m2>=0 and m2<=100) and (m3>=0 and m3<=100) and (m4>=0 and m4<=100) and (m5>=0 and m5<=100)):
    '''...............................'''

    if m1<33:
    x=x+1
    mark=m1
    sub += s1 + " "
    if m2<33:
    x=x+1
    mark=m2
    sub += s2 + " "
    if m3<33:
    x=x+1
    mark=m3
    sub += s3 + " "
    if m4<33:
    x=x+1
    mark=m4
    sub += s4 + " "
    if m5<33:
    x=x+1
    mark=m5
    sub += s5 + " "

    '''..............................'''

    if m1>=75:
    dist += s1 + " "
    if m3>=75:
    dist += s3 + " "
    if m2>=75:
    dist += s2 + " "
    if m4>=75:
    dist += s4 + " "
    if m5>=75:
    dist += s5 + " "

    if x==0 or (x==1 and mark>=28):
    '''------------'''
    if x==0:
    per = (m1+m2+m3+m4+m5)/5
    else:
    per = (m1+m2+m3+m4+m5+(33-mark))/5

    '''................'''

    if per>33 and per<45:
    print("Pass with Third division "+str(per) + "%")
    elif per<60:
    print("Pass with Second division "+str(per) + "%")
    else:
    print("Pass with First Division "+str(per) + "%")

    '''..................'''
    if x==1:
    print("You are pass by grace and grace mark is "+str(33-mark) + "grace subject is "+sub)
    if dist!="":
    print("Distinction subject name are "+dist)

    elif x==1:
    print("suppl in "+sub)
    else:
    print("failed in "+sub)
    else:
    print("invalid marks")

    ReplyDelete
  111. '''Q) WAP to Calculate Marksheet using five different subjects with the following condition.
    1) all subject marks should be 0 to 100.
    2) if only one subject mark is <33 then the student will be suppl.
    3) if all subject marks are >=33 then percentage and division should be calculated.
    4) if a student is suppl then five bonus marks can be applied to be pass and the result will be "pass by grace".
    5) Display Grace Subject name, distinction subject name,suppl subject name, and failed subject name.
    Note for the Viewers : for indentation i separate with #hashtag's, okkay....."

    m1=int(input("Enter marks : "));
    m2=int(input("Enter marks : "));
    m3=int(input("Enter marks : "));
    m4=int(input("Enter marks : "));
    m5=int(input("Enter marks : "));
    s1,s2,s3,s4,s5 = 'Hindi', 'English', 'Maths', 'Physics','Chemestry';
    x=mark=0; sub=dist='';
    if((m1>=0 and m1<=100) and (m2>=0 and m2<=100) and (m3>=0 and m3<=100) and (m4>=0 and m4<=100) and (m5>=0 and m5<=100)): #1
    if(m1<33 or m1>=75): #2
    if(m1<33): #3
    x=x+1; mark=m1; sub=sub+s1 +" "; #4
    else: #3
    dist= dist+s1 +" "; #4
    if(m2<33 or m2>=75): #2
    if(m2<33): #3
    x=x+1; mark=m2; sub += s2 + " "; #4
    else: #3
    dist= dist+s2 + " "; #4
    if(m3<33 or m3>=75): #2
    if(m3<33): #3
    x=x+1; mark=m3; sub=sub+s3 +" "; #4
    else: #3
    dist= dist+s3 +" "; #4
    if(m4<33 or m4>=75): #2
    if(m4<33): #3
    x=x+1; mark=m4; sub=sub+s4 +" "; #4
    if(m4>=75): #3
    dist= dist+s4 +" "; #4
    if(m5<33 or m5>=75): #2
    if(m5<33): #3
    x=x+1; mark=m5; sub= sub + s5 + " "; #4
    if(m5>=75): #3
    dist= dist+s5 +" "; #4
    if((x==0) or (x==1 and mark>=28)): #2
    if(x==0): #3
    per = (m1+m2+m3+m4+m5)/5; #4
    else: #3
    per = (m1+m2+m3+m4+m5+(33-mark))/5 #4
    if(per>=33 and per<45): #3
    print("Pass with Third division "+str(per) + "%") #4
    elif(per>=45 and per<60): #3
    print("Pass with Second division "+str(per) + "%") #4
    else: #3
    print("Pass with First Division "+str(per) + "%") #4
    if(x==1): #3
    print("You are pass by grace and grace mark is "+str(33-mark) + ", subject is "+sub) #4
    if(not(dist=="")): #3
    print("Distinction subject name are "+dist) #4
    elif(x==1): #2
    print("suppl in "+sub); #3
    else: #2
    print("failed in "+sub); #3
    else: #1
    print("invalid marks"); #2

    ReplyDelete
  112. #12) WAP to check that Username and password both are correct or not where username is your first name and password your lastname? provide separate massage for invalid username, invalid password, invalid username and password??
    #Note for Viewer's >> this program is my way. if you are done according to the question so, i also doing separate in it, with #hashtag.....
    UName=input("Enter UserName : ")
    PASS=input("Enter PassWord : ")
    if(UName=="ShiVashu07"): #according to the question, there is >> if(UName=="Shivam"):
    if(PASS=="ShriVashu07"): #according to the question, there is >> if(PASS=="Shukla"):
    print("Welcome back, ShriVashu!");
    else:
    print("Invalid Password! try again.....");
    else:
    if(PASS=="ShriVashu07"): #according to the question, there is >> if(PASS=="Shukla"):
    print("Invalid Username! try again.....");
    else:
    print("Invalid Username and Password! try again.....");

    ReplyDelete
  113. WAP to increase the Salary of an employee from 500 if the entered salary is less than 10000 otherwise increase by 800

    x=int(input("enter salary"))
    if x<10000:
    x=x+500
    print(x)
    else:
    x=x+800
    print(x)


    ReplyDelete
  114. to check number is positive or negative

    num=int(input("enter number"))
    if num>0:
    print("positive number")
    else:
    num<0
    print("negative number")

    ReplyDelete
  115. # 1 WAP to increase the Salary of an employee from 500 if the entered salary is less than 10000 otherwise increase by 800?

    s=int(input("Enter the curent salary : - "))
    if (s>10000):
    s=s+800
    print("Now your salary is ",s)
    else:
    if (s<10000):
    s=s+500
    print(" Now your salary is ",s)

    ReplyDelete
  116. #2) WAP to Check Leap Year?
    y=int(input("Enter the year ")) # where y is year
    if y%4==0:
    print("Leap year")
    else:
    print(" Not Leap year")

    ReplyDelete
  117. # 3) WAP to check number is positive or negative?
    num=int(input("Enter the number "))
    if num>=+1:
    print("number is positive")
    else:
    print("number is negetive")

    ReplyDelete
  118. sal=int(input("enter a salary"))
    if sal<10000:
    print("salary is "+str(sal+500))
    else:
    print("salary is "+str(sal+800))

    ReplyDelete
  119. year=int(input("enter a year"))
    if year%4==0:
    print (year,"is leap year")
    else:
    print(year,("is not leap year"))

    ReplyDelete
  120. num=int(input("enter a number"))
    if num<0:
    print(num,"is negative number")
    else:
    print(num,"num is positive")

    ReplyDelete
  121. num=int(input("enter a number"))
    if num%3==0:
    print("number is divisible by 3")
    if num%5==0:
    print("number is divisible by 5")
    if num%9==0:
    print("number is divisible by 9")

    ReplyDelete
  122. chr=input("Enter 'y' or 'n' : ")
    if chr=='y':
    print("YES")
    if chr=='n':
    print("NO")

    ReplyDelete
  123. WAP to increase the Salary of an employee from 500 if the entered salary is less than 10000 otherwise increase by 800?

    salary = int(input("enter salary"))

    if salary>=10000 :
    sal=salary+800
    print(sal)

    else :
    salary<10000
    sal=salary+500
    print(sal)

    ReplyDelete
  124. WAP to Check Leap Year?

    year = int(input("enter year"))

    if year%4==0 :
    print("it is a leap year")

    else :
    print ("it not leap year")

    ReplyDelete
  125. WAP to check number is positive or negative?

    num = int(input("enter number"))
    if num>=0:
    print("it is positive number")
    else :
    print("it is negative number"

    ReplyDelete
  126. WAP to display "YES" and "NO" when the user press 'y' and 'n'?

    character=str(input("Enter y or n "))
    if(character=='y'):
    print("yes")
    if(character=='n') :
    print("no")

    ReplyDelete
  127. to calculate greatest using four different number using nested and ladder both

    a = int(input("enter first number"))
    b = int(input("enter second number"))
    c = int(input("enter third number"))
    d = int(input("enter fourth number"))
    if a>b and a>c and a>d:
    print("a is greatest")
    elif b>c and b>d:
    print("b is greatest")
    elif c>d:
    print("b is greatest")
    else:
    print("d is greatest")

    ReplyDelete
  128. to check that entered char is vowel and consonant without using or operator

    character = input("enter char")
    if character=="a":
    print("Vowel")
    else:
    if character=="e" :
    print("Vowel")
    else :
    if character=="i" :
    print("Vowel")
    else :
    if character=="o" :
    print("Vowel")
    else:
    if character=="u" :
    print("Vowel")
    else:
    print("Consonent")

    ReplyDelete
  129. to check that salary is in income tax criteria or not. if in income tax then display income tax slab

    salary= int(input ("enter salary amount"))
    s="not taxable" if salary<=500000 else "taxable amount is" +str (salary-500000)
    print(s)

    ReplyDelete
  130. ap TO CHECK THAT USERNAME AND PASSWORD BOTH ARE CORRECT OR NOT WHERE USERNAME IS YOUR FIRST NAME AND PASSWORD YOUR LASTNAME?

    name=input("Enter User Name ")
    pwd=input("Enter Password ")

    if name=="bharat" and pwd=="bangar" :
    print("Welcome " + "bharat bangar")

    if name!="bharat" and pwd!="bangar" :

    print("Enter correct User name and Password....Please Try Again")

    if name!="bharat" and pwd=="bangar" :
    print("Enter correct User Name....Please Try Again")
    if name=="bharat" and pwd!="bangar":

    print("Enter correct Password....Please Try Again")

    ReplyDelete
  131. num=int(input("enter a number"))
    if num>28 and num<33:
    y=33-num
    print ("your grace marks"+str(y))
    num=num+y
    print("your marks is"+str(num))

    ReplyDelete
  132. num=int(input("enter a number"))
    if num>=-9 and num<=9:
    if num>0:
    print("it is a single digit positive number")
    else:
    print("it is a single digit negative number")
    else:
    if num>=10 and num<=99:
    print ("2 digit positive number")
    else :
    if num<-10 and num>-100:
    print("2 digit negative number")
    else:
    print("wrong number")

    ReplyDelete
  133. a=int(input("enter 1st number"))
    b=int(input("enter 2nd number"))
    c=int(input("enter 3rd number"))
    if a>b:
    if a>c:
    print("a is greatet")
    else:
    print("c is greatest")
    else:
    if b>c:
    print("b is greatest")
    else:
    print("c is gretest")

    ReplyDelete
  134. a=int(input("enter first number"))
    b=int(input("enter second number"))
    c=int(input("enter third number"))
    d=int(input("enter fourth number"))
    if a>b:
    if a>c:
    if a>d:
    print("a is greatest")
    else:
    print("d is greatesr")
    else:
    print("c is greatest")
    else:
    if b>c:
    if b>d:
    print("b is greatest")
    else:
    print("d is greatest")
    else:
    if c>d:
    print ("C is gretest")
    else:
    print("d is greatest")

    ReplyDelete
  135. char=str(input("enter a character"))
    if char=='a':
    print ("vowel")
    else:
    if char=='e':
    print("vowel")
    else:
    if char =='i':
    print("vowel")
    else:
    if char=='o':
    print("vowel")
    else:
    if char=='u':
    print("vowel")
    else:
    print("consonant")

    ReplyDelete
  136. sal=int(input("enter month salary"))
    to=sal*12
    if ((to>400000)and (to<600000)):
    tax1=(to*10)/100
    print(tax1)
    elif ((to>600000) and (to<2000000)):
    tax2=(to*10)/100
    print(tax2)
    else:
    print("not applicable in tax")

    ReplyDelete
  137. sal=int(input("enter month salary"))
    to=sal*12
    if ((to>400000)and (to<600000)):
    tax1=(to*10)/100
    print(tax1)
    elif ((to>600000) and (to<2000000)):
    tax2=(to*10)/100
    print(tax2)
    else:
    print("not applicable in tax")

    ReplyDelete
  138. usr=input("enter user name")
    pas=input("enter password")
    if usr=='Gourav':
    print("user name is correct")
    else:
    print("user name is incorrect")
    if pas=='123':
    print("password is correct")
    else:
    print("invalid password")

    ReplyDelete
  139. #SHREYA SINGH
    #WAP to increase the Salary of an employee from 500 if the entered salary is less than 10000 otherwise increase by 800?

    salary=int(input("Enter Salary: "))
    if salary<10000:
    salary=salary+500
    else:
    salary=salary+800
    print("Updated Salary Is: ",salary)

    ReplyDelete
  140. #WAP to increase the Salary of an employee from 500 if the entered salary is less than 10000 otherwise increase by 800?

    salary=int(input("Enter Salary: "))
    if salary<10000:
    salary=salary+500
    else:
    salary=salary+800
    print("Updated Salary Is: ",salary)

    ReplyDelete

Post a Comment

If you have any doubt in programming or join online classes then you can contact us by comment .

Previous Post Next Post