You are on page 1of 4

MIS501 – Assignment 1

Student Name
Student Id
#Task 1
name=input("Please enter your name: ")
mob_num=input("Enter your mobile number: ")
year_of_birth=int(input("Enter your birth year: "))
current_city=input("Enter your current city: ")
email=input("Enter your email: ")
Customer_age=2023-year_of_birth
if Customer_age>21:
print("Welcome!", name)
print("Your mobile number is", mob_num)
print("Your year of birth is", year_of_birth)
print("You are currently staying at", current_city)
print("Your email address is", email)
else:
print("Customer is below 21 years of age")

#Task 2
width=int(input("Kindly enter width of the restaurant in meters: "))
length=int(input("Kindly enter length of the restaurant in meters: "))
num_of_people=int((width*length)/1.2)
if num_of_people>60:
print("A Maximum of 60 persons are allowed.")
else:
print("The number of people that can be accommodated in the
restaurant is", num_of_people)

#Task 3
# creating an empty list
current_week = []

# number of elements as input


n1 = int(input("Enter number of person visited in the current week: "))

# iterating till the range


for i in range(0, n1):
ele = int(input())

current_week.append(ele) # adding the element


# creating an empty list
prev_week = []

# number of elements as input


n2 = int(input("Enter number of person visited in the previous week:
"))

# iterating till the range


for i in range(0, n2):
ele1 = int(input())
prev_week.append(ele1) # adding the element

print("Current Week per person average sale =


",sum(current_week)/n1,"AUD")
print("Last Week per person average sale = ",sum(prev_week)/n2,"AUD")

#Task 4
invoice=int(input("Total Invoice amount (In Dollars): "))
tips=int(input("Amount of Tip (In Cents): "))
total_payment=int(input("Total Payment received by Card: "))
service_charge=int(input("Service Charge on Payment made by Card (%):
"))
total_payment_cash=int(input("Total Payment received in Cash (In
Dollars): "))
return_amnt = (total_payment+total_payment_cash)-invoice - (tips/100) -
(total_payment*service_charge/100)
if return_amnt<0:
print("Outstanding amount and need to be paid by customer: ",-
return_amnt)
else:
print("Change to be returned to the customer (In Dollars):
",return_amnt)

#Task 5
Address=input("Enter your full address: " )
Distance=int(input("Enter the distance of your address from the
restaurant: "))
if Distance >12:
print("No Delivery can be done")
elif Distance >10:
print("The delivery charge would be $10")
elif Distance>5:
print("The delivery charge would be $8")
else:
print("The delivery charge would be $5")

#Task 6
base_order_cost = int(input("Enter your base order cost: "))
order_type=int(input("Enter the order type (1 or 2 or 3): "))
if order_type == 1:
print("The total amount to be paid = ", base_order_cost +
base_order_cost*0.08,"AUD")
elif order_type==2:
print("The total amount to be paid = ", base_order_cost,"AUD")
elif order_type==3:
print("The total amount to be paid = ", base_order_cost +
base_order_cost*0.10,"AUD")

#Task 7
conversion_format=int(input("Enter the conversion format (1 or 2): "))
if conversion_format ==1:
centi=int(input("Enter the temperature in Centigrade: "))
print("The temperature in Fahrenheit: ", (centi*9)/5 + 32,"F")
elif conversion_format==2:
far=int(input("Enter the temperature in Fahrenheit: "))
print("The temperature in Centigrade: ", (far -32)*(5/9),"C")
else:
print("Invalid Entry")

#Task 8
position=str(input("Enter the position of the employee (chef, waiter or
deliver): "))
hours_worked=int(input("Enter the number of monthly hours the employee
worked: "))
if position.lower() == "chef":
print("The net monthly income = $", hours_worked*50*(1-0.20))
elif position.lower() == "waiter":
print("The net monthly income = $", hours_worked*40*(1-0.20))
elif position.lower() == "deliver":
print("The net monthly income = $", hours_worked*35*(1-0.20))
else:
print("Invalid Entry")

#Task 9
mobile_number = int(input("Enter your mobile number: "))
password=input("Enter your password: ")
count=0
while(mobile_number>0):
count=count+1
mobile_number=mobile_number//10
if count == 10 and len(password)>=8:
print("Valid credentials")
else:
print("Invalid credentials")

You might also like