# Math πrate has been completing each and every quest with the help of Sam and you.
# Now he is ready to take up more real time challenges .
# Ready to help?
'''Task 1:  Quest for Multiplication Table'''
print("***** Task 1: *****")
print()
# Math πrate and Sam are on the next level of the quest. 
# This stage feels difficult because at this stage they have been given to write the Multiplication table of 17.
# Sam told Math πrate, it can be easily achieved with coding. 
# They want your help to complete this challenge because you are the only genius who can help them with coding.
# [Hint: number * range = (number)(range)]

for i in range(1,18):
    print(f"17 * {i} = {17*i}")

'''Task 2:  Delivery Charges'''
print("***** Task 2: *****")
print()
# Math πrate next quest is to take care of Building Materials Delivery
# He was asked to  create a program that takes the following input from the user:
# - The total number of sand sack and cement sack 
# -  Weight of each sack [Hint: use for loop to get the weight]
# - Use a variable to which the weight of the sack gets added as entered [Hint: calculate this within the for loop]
# - Calculates the total cost if each sack cost INR 300 [ outside the for loop]
# So let's get started
numS = int(input("How many sacks do you have?"))
weight = 0
for y in range(1,numS+1):
    w = int(input("WHat is the weight of each sack?"))
    weight+=w
print(f"You must pay {300 * numS} INR for all of your sacks wiegh a total of {weight}")
'''Task 3:   Lets go Outdoors'''
print("***** Task 3: *****")
print()
# Math πrate has been given the task of writing a program that takes care of outdoor field trips for kids.
# The program needs to:
# - Take the total number of kids (Number cannot be more than 8)
# - Get the name, and address for each kid
# The program must display the total cost for the field trip where
# - Cost for food for each kid is INR 500
# - Cost for travel for each kid is INR 1000
kids = int(input("Enter the number of kids going on the trip. No more than 8 kids may go on the trip."))
if kids > 8:
    print("No more than 8 kids may go on this trip. Please try again later.")
else:
    final = kids * 1500
print(f"The total cost is {final} INR.")
'''Task 4:   Pattern Match'''
print("***** Task 4: *****")
print()
# Math πrate has been given a for loop and range function to create a pattern like the one given below:
# 1
# 2 2
# 3 3 3
# 4 4 4 4
# 5 5 5 5 5
numb = int(input("Enter a number to help me make my pattern.\n"))
for i in range(1, numb + 1):
    print(f"{i} " * i)
# Can you help him create it?


'''Awesome! You cracked each and every quest. Way to go!!'''

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: