Posts

Showing posts from May, 2023

Python | All in One Program By. Shivansh Sir

Image
  PYTHON   PROGRAMMING PYTHON | MISCELLANEOUS PROGRAM Program 1. Write a Python function to find the maximum of three numbers. Source Code def max_of_two( x, y ):     if x > y:         return x     return y def max_of_three( x, y, z ):     return max_of_two( x, max_of_two( y, z ) ) print(max_of_three(3, 6, -5)) Output 6 Program  2. Input age and check eligibility for voting # input age age = int(input("Enter Age : ")) # condition to check voting eligibility if age>=18:         status="Eligible" else:     status="Not Eligible" print("You are ",status," for Vote.") Output Enter Age = 15 You are  Not Eligible  for Vote. Program 3.  Write a Python program to find the number of notes (Samples of notes: 10, 20, 50, 100, 200, 500) against an amount. Source Code def no_notes(a):   Q = [500, 200, 100, 50, 20, 10]   x = 0   for i in range(6):     q = Q[i] ...