0% found this document useful (0 votes)
15 views2 pages

All in One Phython

Uploaded by

ahsantech33
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views2 pages

All in One Phython

Uploaded by

ahsantech33
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

# DECLARATION

# ASSIGNMENT
ITEMCODE = 3248
ITEMNAME = "TAPAL CHAI"
PRICE = 800
SOLD = True
#PRODUCING OUTPUT
print("ITEMCODE " , ITEMCODE)
print("ITEMNAME " , ITEMNAME)
print("PRICE " , PRICE)
print("SOLD " , SOLD)

-----------------------------------------------------------------------------------
--
# IDE-INTEGRATED DEVELOPMENT ENVIRONMENT
name = input("ENTER NAME: ")
address = input("ENTER ADRESS: ")
age = int(input("ENTER AGE: "))
doa = input("ENTER DATE OF ADMISSION (YYYY-MM-DD): ")
studying = input("ARE YOU STUDYING (yes/no): ")
print("======================================")
print("NAME: ", name)
print("ADDRESS ", address)
print("AGE: ", age)
print("DATE OF ADMISSION ", doa)
print("ARE YOU STUDYING: ", studying)
print("======================================")
-----------------------------------------------------------------------------------
---
# DECLAE Number : Integer
Number = int(input("Ente any number: "))
if Number == 0:
print("You entered zero.")
if Number < 0:
print("It's a negative number")
if Number > 0:
print("It's a positive number")
-----------------------------------------------------------------------------------
---
Number=int(input("Enter any number "))
if Number < 0:
print("You entered a negative number")
print("Negative numbers are not accepted")
print("Run your pogram again to enter new number")
-----------------------------------------------------------------------------------
----
Number=int(input("Enter any number "))
if Number < 0:
print("You entered a negative number")
else:

print("You entered either a zero/positive number")


-----------------------------------------------------------------------------------
----
grade = input("Enter Grade: ") #Convert input to uppercase
if grade == "U":
print("Oops! you got a U")
elif grade == "E":
("Better luck next time! You got an E")
elif grade == "D":
("Good Attempt! You got a D")
elif grade == "C":
("Keep working! You got a C")
elif grade == "B":
("Well Done! You got a B")
elif grade == "A":
("Excellent! You got an A")
else:
print("INVALID GRADE")

You might also like