SlideShare a Scribd company logo
PROGRAM TO CALCULATE
DISCOUNT OR DISCOUNT %.
mp=int(input("enter the marked price:"))
sp=int(input("enter the sold price:"))
Discount%=mp-sp
print("discount of the object is:", discount)
Discount%=(discount/mp)*100
print("discount% of the object is:", round(discount%,2))
EXECUTION
PROGRAM TO CHECK PROFIT OR LOSS.
cp=int(input("enter the cost price:"))
sp=int(input("enter the sale price:"))
if(sp>cp):
print("you get profit")
elif(cp>sp):
print("you get loss")
else:
print("no profit, no loss")
EXECUTION

More Related Content

PPTX
Array menu
DOCX
New microsoft word document
PPT
StackArray stack3
DOCX
program in c
PDF
Torchbearersnotebook.blogspot.com program to create a list in python and valu...
PPTX
DS- Stack ADT
PPTX
Stack using Array
Array menu
New microsoft word document
StackArray stack3
program in c
Torchbearersnotebook.blogspot.com program to create a list in python and valu...
DS- Stack ADT
Stack using Array

What's hot (19)

DOCX
Cuarto Punto Parte A
TXT
Luhn sh
PDF
A Beginner's Guide to MS Excel
PPTX
Vs c# lecture10
DOCX
PDF
C언어 스터디 강의자료 - 1차시
PDF
2 3. standard io
DOCX
Designing the application
DOCX
Data structure output 1
PDF
Clean code in unit testing
PPTX
Stack using Linked List
DOCX
01 list using array
DOC
Operating Systems lab Programs - Fourth Semester - Engineering
PDF
COMP2021 Final Project - LightHTML
PPTX
Computer Programming Code Sample
PDF
Programming in lua Basic
Cuarto Punto Parte A
Luhn sh
A Beginner's Guide to MS Excel
Vs c# lecture10
C언어 스터디 강의자료 - 1차시
2 3. standard io
Designing the application
Data structure output 1
Clean code in unit testing
Stack using Linked List
01 list using array
Operating Systems lab Programs - Fourth Semester - Engineering
COMP2021 Final Project - LightHTML
Computer Programming Code Sample
Programming in lua Basic
Ad

More from nuripatidar (9)

PPTX
Python program
PPTX
Python operators
PPTX
Python lists
PPTX
Tuple.py
PPTX
Indian history
PPTX
Python Programme list
PPTX
Chemistry
PPTX
Python statements
PPTX
Python data type
Python program
Python operators
Python lists
Tuple.py
Indian history
Python Programme list
Chemistry
Python statements
Python data type
Ad

Recently uploaded (20)

PPTX
Pharmacology of Heart Failure /Pharmacotherapy of CHF
PDF
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
PDF
O7-L3 Supply Chain Operations - ICLT Program
PPTX
Institutional Correction lecture only . . .
PDF
Anesthesia in Laparoscopic Surgery in India
PDF
2.FourierTransform-ShortQuestionswithAnswers.pdf
PDF
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
PDF
O5-L3 Freight Transport Ops (International) V1.pdf
PPTX
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
PDF
Complications of Minimal Access Surgery at WLH
PDF
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
PDF
Module 4: Burden of Disease Tutorial Slides S2 2025
PDF
FourierSeries-QuestionsWithAnswers(Part-A).pdf
PPTX
PPH.pptx obstetrics and gynecology in nursing
PPTX
human mycosis Human fungal infections are called human mycosis..pptx
PDF
Origin of periodic table-Mendeleev’s Periodic-Modern Periodic table
PPTX
BOWEL ELIMINATION FACTORS AFFECTING AND TYPES
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PDF
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
Pharmacology of Heart Failure /Pharmacotherapy of CHF
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
O7-L3 Supply Chain Operations - ICLT Program
Institutional Correction lecture only . . .
Anesthesia in Laparoscopic Surgery in India
2.FourierTransform-ShortQuestionswithAnswers.pdf
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
O5-L3 Freight Transport Ops (International) V1.pdf
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
Complications of Minimal Access Surgery at WLH
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
Module 4: Burden of Disease Tutorial Slides S2 2025
FourierSeries-QuestionsWithAnswers(Part-A).pdf
PPH.pptx obstetrics and gynecology in nursing
human mycosis Human fungal infections are called human mycosis..pptx
Origin of periodic table-Mendeleev’s Periodic-Modern Periodic table
BOWEL ELIMINATION FACTORS AFFECTING AND TYPES
STATICS OF THE RIGID BODIES Hibbelers.pdf
3rd Neelam Sanjeevareddy Memorial Lecture.pdf

Python basic Program

  • 1. PROGRAM TO CALCULATE DISCOUNT OR DISCOUNT %. mp=int(input("enter the marked price:")) sp=int(input("enter the sold price:")) Discount%=mp-sp print("discount of the object is:", discount) Discount%=(discount/mp)*100 print("discount% of the object is:", round(discount%,2))
  • 3. PROGRAM TO CHECK PROFIT OR LOSS. cp=int(input("enter the cost price:")) sp=int(input("enter the sale price:")) if(sp>cp): print("you get profit") elif(cp>sp): print("you get loss") else: print("no profit, no loss")