#write a program to print a msg from brightchamps
name=input("Enter Your name: ")
print("@"*20,"congratulations","@"*20)
print("\n")
print("It's time to celebrate! \n We're thrilled to tell you that ", name," has successfully completed the Thunkable of their BrightCHAMPS course. ")
print("*"*4,"Hurray!")
# format
x=10
y=5
sum=x+y
print("the sum of {} and {} is equal to {}".format(x,y,sum))
# multiplication table using format
print("welcome to multiplication table chat bot")
print("enter the number for printing the multiplication chat bot")
number=int(input())
for i in range(0,11):
print("{} X {} = {}".format(number,i,(i*number)))
#create variable and get input from user
name=input("Enter Name: ") #to get the input from user (*return a string value )
#math=input("Enter math score: ") #will show error need to convert the input from string to int
math=int(input("Enter math score: "))
science=int(input("Enter science score: "))
english=int(input("Enter english score: "))
max_marks=300
#printing the report card
print(10*"#"," REPORT CARD",10*"#")
print("\n","Student name: ",name)
print(30*"-")
print("math score: ",math)
print("science score: ",science)
print("english score: ",english)
print(30*"-")
total_marks=math+science+english
print("your total marks is ",total_marks," out of ",max_marks)
percent_marks=(total_marks/max_marks)*100
print("your percentage score is ", percent_marks)
#using if
#write a program to find greater number from two numbers
a = int(input("Enter a? "));
b = int(input("Enter b? "));
if a>b:
print("a is largest");
else:
print("b is largest");
# using if condition
#make a program to give access to only who has secret code
secret_code="charlie345"
name=input(" Enter your name")
user_code=input("please enter secret code ")
if (user_code==secret_code):
print("Hello "+name+ "welcome to our secret society")
print("you have access to our VIP programs")
else :
print("you are not allowed to access the program ")
# modify above program to make a calculator using if condition
a=int(input("Enter first number : "))
b=int(input("Enter second number: "))
print(" press 1 for addition \n press 2 for subraction \n press 3 to multiply \n press 4 for division")
choice=int(input("enter your choice "))
if (choice==1):
sum=a+b
print("sum = ",sum)
if (choice==2):
sub=a-b
print("subtraction = ",sub)
if (choice==3):
mul=a*b
print("MUltiplication = ",mul)
if (choice==4):
div=a/b
print("division = ",div)
# modify the same using if elif in next lesson