Skip to main content

Featured Post

What’s new in C# 14

  🎙️ INTRO (0:00 – 0:40) Namaste Doston! 👋 Main hoon [Your Name] aur aaj ke video mein hum baat karne wale hain C# 14.0 ke Top 10 Most Important Features ke baare mein. Ye update .NET 10 ke saath aaya hai aur C# ko aur zyada modern, clean aur developer-friendly banata hai. Main har feature ko simple example ke saath samjhaunga taaki aapko coding mein easily use kar paayein. So let’s start — C# 14 ke naye power-packed features! 🚀 🧩 1️⃣ Field-backed Properties (0:40 – 1:00) Pehla feature hai — Field-backed Properties Ab aapko manually private field likhne ki zarurat nahi. C# 14 mein ek naya contextual keyword aaya hai — field public string Name { get ; set => field = value ?? throw new ArgumentNullException( nameof ( value )); } Yahaan field compiler-generated backing field ko represent karta hai. Validation ya logic likhna ab super easy ho gaya hai! 🧩 2️⃣ Extension Members (1:00 – 1:25) Dusra feature — Extension Members Pehle hum si...

Python Program List


 
WAP to convert temperature from c to f? c/5 = (f-32)/9
Solution:-

c=int(input("enter temprature in celsius"))  # "25"  to 25
f=(9*c+160)/5
print(f)

WAP to calculate the sum of date of birth in a single digit?  (10061988)

Solution:-
dob = int(input("enter date of birth in ddmmyyyy")) #10061998
y1 = dob%10  #8   % return rem and // floor div
dob=dob//10  #1006199
y2 = dob%10   #9
dob=dob//10  ##100619
y3=dob%10     #9
dob=dob//10  ##10061
y4=dob%10     #1
dob = dob//10  #1006
y5 = dob%10    #6

dob = dob//10  #100
y6 = dob%10   #0
dob = dob//10  #10
y7 = dob%10   #0
y8 = dob//10   #1

s=  y1+y2+y3+y4+y5+y6+y7+y8
print(s)

s1 = s%10
s2=  s//10

print(s1+s2)


WAP to calculate the salary of an employee where basic, ta, da, comm, pf,noofleave will be entered by the users?

Solution:-

basic = int(input("Enter basic"))
ta=int(input("Enter ta in percentage")) #in per
da=int(input("Enter da in percentage"))
comm=int(input("Enter commision"))
pf=int(input("Enter pf"))
noofleave =float(input("Enter no of leave"))

totalsal = basic+(basic*(ta/100))+(basic*(da/100))+(basic*(comm/100))-(basic*(pf/100))
lsal= (totalsal)/30*noofleave
ctotalsal= totalsal-lsal
print("Total Salary is ",totalsal)
print("Total Leave Deduction is ",lsal)
print("Total PF Deduction is ",(basic*(pf/100)))
print(ctotalsal)


WAP to calculate square and cube of any assigned number?

num=2
sq = num*num
cb = num*num*num
print("Square is ",sq)
print("Cube is ",cb)


WAP to calculate the addition of complex numbers?

2+3i
4+5i
,,,,,,,,,,
6+8i


Solution:-

num1 = 2+3j
num2 = 4+5j
num3 = num1+num2
print(num3)


,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,

WAP to calculate the area of triangle and circle in the same program?

pi=3.14
radius = float(input("enter radius")) #3.5
area = pi*radius*radius
#print("area of cirlce is ",area)
print("area of cirlce is %.2f" % area)
b=int(input("enter base"))
h=int(input("enter height"))
area = (b*h)/2
print("area of triangle is ",area)


WAP to enter complete income in the year and display income tax slab and total taxable amount?

income = float(input("enter monthly income"))
yincome = 12*income
if yincome >= 250000 and yincome<=500000:
 tax=yincome*(5/100)
elif yincome<=1000000:
    tax=yincome*(20/100)
else:
    tax=yincome*(30/100)


print("monthly income is",income," Yearly income is  ",yincome," Tax is ",tax)


WAP to reverse the five-digit number where first and last digit will be the same?

num = int(input("enter any five digit number")) #12345
print(num)
a = num%10   #5
num=num//10  #1234
b = num%10   #4
num=num//10  #123
c = num%10   #3
num=num//10  #12
d = num%10   #2
e = num//10  #1
num1 = e*10000+b*1000+c*100+d*10+a*1
print(num1)

2)  WAP to calculate electricity bill where unit price, total consumption, the extra load will be entered by the users?

unitprice = float(input("enter unit price"))
consumption=float(input("enter total consumption"))
loadamount=0
if consumption>1000:
    loadamount=float(input("enter load amount"))
bill = unitprice*consumption+loadamount
print("bill is ",bill,"load amount is",loadamount)

 WAP to calculate Simple Interest where rate and time will be constant and the principal will be an integer?

const = (8.23,20)
p = int(input("enter amount"))
si = (p*const[0]*const[1])/100
print(si)

WAP to calculate Compound Interest?

p = float(input("enter amount"))
r = float(input("enter rate"))
t = float(input("enter time"))
n = float(input("enter number of time for interest applied"))
r1=r/100
A = p*((1+(r1/n))**(n*t))
print("Total Compound interest is "+str(A))  # to convert float to string


WAP to Check Greatest Number using Ternary Operator?


num1 = int(input("enter first number "))
num2 = int(input("enter second number"))
num3 = int(input("enter third number"))
print("num1 is greater") if num1>num2 and num1>num3 else print("num2 is greater") if num2>num3 else print("num3 is greater")


WAP to check that entered number is positive or negative suing ternary operator?

num=int(input("Enter number to take input from user's"))
print("number is positive") if num>=0 else print  ("number is negative")

WAP to check that candidate is eligible for  vote or not?

WAP to check leap year?

year=2000
print("leap year") if year%4==0 and year%100!=0 else print("not leap year")
WAP to check that salary is in come tax slab or not?
salary =45000
print("income tax slab") if salary>= 20834 else print("not in income tax slab")

WAP to check vowel, consonant?


WAP to check that number is one digit or two-digit?

print("one digit")  if (num>=0 and num<10) else print("two digit") if num<100 else print("above two digit")


Nested If--Else Example:-

mark = int(input("enter mark"))
if mark>=28 and mark<33:
    gmark = 33-mark
    mark=mark+gmark
    print("grace marks is ",gmark )
else:
    if mark>=33:
     print("Without grace ,Mark is "+str(mark))
    else:
     print("Out of grace criteria and failed,marks is "+str(mark))



Example of Ladder If-else for grace mark example:-

mark = int(input("enter mark"))
if mark>=28 and mark<33:
    gmark = 33-mark
    mark=mark+gmark
    print("grace marks is ",gmark, mark)
elif mark>=33:
     print("Without grace ,Mark is "+str(mark))
else:
     print("Out of grace criteria and failed,marks is "+str(mark))

WAP to convert binary to decimal and decimal to binary:-

WAP to print all char of keyboard?

i=32
while i<=126:
    print(chr(i))  #ascii to char
    i=i+1

WAP to print -5 to -1 and -1 to -5 using single while Loop?

i=1
while i<=10:
    if i<=5:
        print(i-6)
    else:
        print(5-i)
    i=i+1


WAP to display prime in the Fibonacci series?

first,second=-1,1

for i in range(1,9):
 count=0
 result = first + second
 for j in range(1,result+1):
     if result%j==0:
         count=count+1
     

 if count==2:
  print(result)

 first=second

 second=result


Q)  WAP to display only prime element in Set?

Q)  WAP to display factorial of set elements?


Q)  WAP to find max and second max element in set?


Q)  WAP to input any number and that number will be in the first position then the user will get first prize if second then the user will be the second winner, if third then the user will be third winner otherwise failure.


Q)  WAP to convert set to list and list to set?


q)  WAP to find max key and max value in the dictionary?
emp = {"empid":1001,"zlmn":"xyz","job":"manager","salary":45000}
#print(emp["empid"])
max=''
d =''
for key in emp:
    if max<key[0]:
        max=key[0]
        d=key

print(d) 


Q)  WAP to reverse dictionary elements?

emp = {"empid":1001,"empname":"xyz","job":"manager","salary":45000}
print(emp["empid"])
for key in emp:
    print(key,emp[key])


x=[]
y=[]

for key in emp:
    x.append(key)
    y.append(emp[key])


for i in range(len(x)-1,-1,-1):
    print(x[i],y[i])






Comments

Popular posts from this blog

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 languages. Type of Conditional Statement:- 1) Simple if:- We can write a single if statement also in python, it will execute when the condition is true. for example, One real-world problem is here?? we want to display the salary of employees when the salary will be above 10000 otherwise not displayed. Syntax:- if(condition):    statements The solution to the above problem sal = int(input("Enter salary")) if sal>10000:     print("Salary is "+str(sal)) 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 th...

DSA in C# | Data Structure and Algorithm using C#

  DSA in C# |  Data Structure and Algorithm using C#: Lecture 1: Introduction to Data Structures and Algorithms (1 Hour) 1.1 What are Data Structures? Data Structures are ways to store and organize data so it can be used efficiently. Think of data structures as containers that hold data in a specific format. Types of Data Structures: Primitive Data Structures : These are basic structures built into the language. Example: int , float , char , bool in C#. Example : csharp int age = 25;  // 'age' stores an integer value. bool isStudent = true;  // 'isStudent' stores a boolean value. Non-Primitive Data Structures : These are more complex and are built using primitive types. They are divided into: Linear : Arrays, Lists, Queues, Stacks (data is arranged in a sequence). Non-Linear : Trees, Graphs (data is connected in more complex ways). Example : // Array is a simple linear data structure int[] number...

Top 50 Most Asked MERN Stack Interview Questions and Answers for 2025

 Top 50 Most Asked MERN Stack Interview Questions and Answers for 2025 Now a days most of the IT Company asked NODE JS Question mostly in interview. I am creating this article to provide help to all MERN Stack developer , who is in doubt that which type of question can be asked in MERN Stack  then they can learn from this article. I am Shiva Gautam,  I have 15 Years of experience in Multiple IT Technology, I am Founder of Shiva Concept Solution Best Programming Institute with 100% Job placement guarantee. for more information visit  Shiva Concept Solution 1. What is the MERN Stack? Answer : MERN Stack is a full-stack JavaScript framework using MongoDB (database), Express.js (backend framework), React (frontend library), and Node.js (server runtime). It’s popular for building fast, scalable web apps with one language—JavaScript. 2. What is MongoDB, and why use it in MERN? Answer : MongoDB is a NoSQL database that stores data in flexible, JSON-like documents. It...