Posts

Check out my following posts

Is it true that homeless and superstars are the same?

Image
     We can observe 2 frames in a single picture depicting 2 different meaning with slightly change in both the pictures. In the left hand side picture, there is a person with the bad clothing way and a word 'Homeless' written on him. On the right hand side picture, there is a person with the same clothing style but with 2 black suits men and a word 'Superstar' is written on him.    I have 2 perspectives for this picture. Let's discuss them as follows.     My first perspective is that i t tells us how there is very slight difference in both the individuals. first talking about their behaviors that a homeless person is a poor not by his own but that's what his life gave to him. Adding to this, he cannot enjoy many privileges like a middle-class family or a superstar. That can be the reason of being uneducated due to money-problems, not-supportive family background & a society, bad surrounding affecting their health and many more. But in the case of superstar,
 import pickle # Please make below file 'REPORT_CARD.dat' manually file = 'REPORT_CARD.dat' PT1 = {} Half_Yearly = {} PT2 = {} Finals = {} strm = '' grade = '' # All the basic details of student --> name, admno. dob, gender, stream def FormerDetails():             global strm     nme = input("Enter student name: ")     Adm = int(input("Enter adm no.: "))     dob = input("Enter dob: ")     gen = input("Enter gender: ")     strm = input("Enter stream(Hindi(H)/CS(C) ~ Maths(M)/Bio(B): ")     d = {}     all = [nme, Adm, dob, gen, strm]     headers = ['Name', 'AdmNo.', "DOB", "Gender", "Stream"]     for i in range(len(headers)):         d[headers[i]] = all[i]     with open(file, 'ab') as bf:         pickle.dump(d, bf) # Taking input from user of marks of a particular exam according to the exam(pt1, pt2, etc) passed to func.  def MarksInput(examname, exam

Displaying Total sales amount, discount amount and net sales amount by using if~elif statements

 # Displaying Total sales amount,discount amount and net sales amount qan=int(input("Enter total quantity: "))            rate=int(input("Enter the rate: ")) tot=qan*rate                    #Using if-elif statements if tot<=10000:     dis=tot*(5/100)     net=tot-dis     print(f"Total units:{qan}")     print(f"Rate:{rate}Rs")     print(f"Total sales amount:{tot}Rs")     print(f"Your discount:{dis}Rs")     print(f"Net sales amount:{net}Rs") elif tot<=50000:     dis=tot*(10/100)     net=tot-dis     print(f"Total units: ",qan)     print(f"Rate:{rate}Rs")     print(f"Total sales amount:{tot}Rs")     print(f"Your discount:{dis}Rs")     print(f"Net sales amount:{net}Rs") elif tot<=100000:     dis=tot*(15/100)     net=tot-dis     print(f"Total units:{qan}")     print(f"Rate:{rate}Rs")     print(f"Total sales amount:{tot}Rs")     print(f&

Program on Gender changing and some Pattern guessing questions using lists and if/else in Python.

 User_name=input('Enter your name,User:')                                                                       #Welcoming Statement print("Welcome dear "+User_name+"\n\n1.Please guess the following patterns and check their answers below.") Question_1=['_','25','125','625']       #Question1                                                        #Question1 print(Question_1) ans1=input("Enter your answer: ") Question_1.remove("_") Question_1.insert(0,ans1) print(Question_1)                    #Answer of Question1 entered by User if Question_1==['5','25','125','625'] :  #If/else statement on User's answer     print("It's true.") else:     print("Your answer is False.") print("Correct answer is: ['5','25','125','625']")     #Correct Answer printed print(input("Press Enter\n")) Question_2=['7',

Program on a shopping website using Dictionary.

name=input("Enter your name: ") print("Welcome "+name+" to our shopping website, Salecart") print("Please input the name of groceries below that you want to order.") groceries={"Sugar":"Uttam sugar & Madhur Sugar",        "Oil":"Fortune oil, Dhara Kachi Ghani oil & Freedom refined oil",        "Dryfruits":"Farmely Premium",        "Wheat":"Desi Choice & Ashirvaad Atta"} print(groceries.keys())  a=(input("Enter grocery name that you are looking for from above list:\n")) if (a=="Sugar"):     print("Uttam sugar:1kg\n\t Rs 60\n\t Cheap\n\n"           "Madhur sugar:1kg\n\t Rs50\n\t Cheap\n\n") elif (a=="Oil"):     print("Fortune oil: \nMustard oil\n 1L\n Rs200\n Moderate\n"          "Dhara Kachi Ghani oil: \nMustard oil\n 1L\n Rs200\n Moderate\n"          "Freedom Refined oil: \nSunflowe