Professional Documents
Culture Documents
Batch 92 Day 8 - 9 Dec 2023
Batch 92 Day 8 - 9 Dec 2023
print("Hello")
print("How are you?")
avg = 38
if avg >=40:
print("Congratulations on clearing class X examination")
print("Whats your plan?")
print("Good Day!")
if avg >=40:
print("Congratulations on your success")
print("Whats your plan ahead?")
else:
print("Sorry, please try next time. Good luck")
'''
90% : A+
80 : A-
70: B+
60: B-
50: C+
40: C-
40: Failed / F
avg > 95 - president medal
'''
"""
"""
avg = 94
if avg>=90:
print("Grade: A+")
if avg >= 95:
print("You win President Medal")
elif avg>=80:
print("Grade: A-")
elif avg>=70:
print("Grade: B+")
elif avg>=60:
print("Grade: B-")
elif avg>=50:
print("Grade: C+")
elif avg>=40:
print("Grade: C-")
else:
print("Grade: F")
#######
num = int(input("Enter a number: "))
#check if the value entered by the users is positive or negative
if num>0:
print(f"{num} is positive number")
if num % 2 == 0:
print(f"{num} is an even number")
else:
print(f"{num} is an odd number")
elif num==0:
print(f"{num} is neither positive nor negative number")
else:
print(f"{num} is negative number")
'''
Calculate on-road price of a vehicle:
P: 5% of Basic Cost + 1% of Weight + 1 % of Insurance
B: 10% of Basic Cost + 3% of Weight + 2 % of Insurance
Input type, weight and basic price
'''
type= input("Enter the type of the vehice (P: Private / B: Business): ")
if type=="P" or type=="B":
basic = int(input("Enter the cost of the vehicle: "))
weight = int(input("Enter the weight of the vehicle in kg: "))
b_pct, w_pct, ins_pct = 0, 0, 0
if type=="P":
b_pct, w_pct, ins_pct = 5, 1, 1
else:
b_pct, w_pct, ins_pct = 10, 3, 2
vehicle_tax = basic*b_pct/100
weight_tax = weight*w_pct/100
insurance = basic*ins_pct/100
on_road_cost = vehicle_tax+weight_tax+insurance+basic
print(f"You need to pay Weight Tax of {weight_tax}, Vehicle Tax of {vehicle_tax} and"
f"Insurance of {insurance} which makes the total on-road cost as {on_road_cost}")
else:
print("You have entered wrong vehicle type and we cant proceed further")
Basic Programming Approach:
https://www.scribd.com/document/669777655/Pseudocode-Book