<filename>python/100-days-of-code/programs/day_2/main.py<gh_stars>0

### basic datatypes
"""
# string
print("123" + "456")
print("Hello" + "Buddy")

# integers
print(123 + 456)
print(1234567)
print(12_34_567) # underscores will be ignored by the program, this will be treated as normal number

# Floats
print(2.1023)

# Boolean
print(True, False)
"""
### type checking and casting

"""
print(type(12))
print(type("12"))
print(type(12.6))
print(type([]))
print(type({}))
print(type(True))
print("I have " + str(5) +" books.")
print(int("20") + int("20"))
print(str(20) + str(20))
print(type(2/4))
# print("you are " + 22 + " years old." )
"""

### Mathematical operators
### ---- PEMDASLR rule ---
# Parenthesis
# Equal
# Multiplication and Diivision
# Addition and Substraction
# from Left to Right
# ----------------------
'''
print(3+3*3-3/3-3)
print(3+3*(3-3)/3-3)

# exponent
print(2**100)
print(2/3)
print(4/3) # Quotient
# floor division
print(4//3) # Quotient without decimal
# modulus
print(5%3) # reminder
'''

### sum of the digits of a two digit number
'''
two_digit_number = input("Type a two digit number: ")
num = two_digit_number
print(int(num[0]) + int(num[1]))
'''

### BMI Calculator
'''
height = input("enter your height in m: ")
weight = input("enter your weight in kg: ")
bmi = float(weight) / (float(height)**2)
print(int(bmi))

'''

### Number manipulation and F-strings
'''
print(3.148)
print(int(3.648))
print(round(3.648))
print(round(3.648, 2))
name = "Loki"
age = 22
kyc = f"I am {name}, {age} years old ! 😂😂😂😂😂"
print(kyc)
'''

### Life in a Week
'''
age = input("What is your current age?")
total_years = 90
years_left = total_years - int(age)

days_left = years_left * 365
weeks_left = years_left * 52
months_left = years_left * 12

msg = f"You have {days_left} days, {weeks_left} weeks, and {months_left} months left."

print(msg)
'''

### TIP CALCULATOR
'''
print("\n\nWelcome to the tip calcuator.")
total_bill = float(input("What was the total bill? ₹"))
perc_tip = int(input("What percentage tip would you like to give? 10, 12, or 15? "))
people = int(input("How many people to split the bill? "))

total_bill += (total_bill * (perc_tip / 100))
splitted_bill = round(total_bill/people, 2)

print(f"\nEach person should pay: ₹{splitted_bill}")
'''
<filename>python/100-days-of-code/programs/day_2/main.py<gh_stars>0

### basic datatypes
"""
# string
print("123" + "456")
print("Hello" + "Buddy")

# integers
print(123 + 456)
print(1234567)
print(12_34_567) # underscores will be ignored by the program, this will be treated as normal number

# Floats
print(2.1023)

# Boolean
print(True, False)
"""
### type checking and casting

"""
print(type(12))
print(type("12"))
print(type(12.6))
print(type([]))
print(type({}))
print(type(True))
print("I have " + str(5) +" books.")
print(int("20") + int("20"))
print(str(20) + str(20))
print(type(2/4))
# print("you are " + 22 + " years old." )
"""

### Mathematical operators
### ---- PEMDASLR rule ---
# Parenthesis
# Equal
# Multiplication and Diivision
# Addition and Substraction
# from Left to Right
# ----------------------
'''
print(3+3*3-3/3-3)
print(3+3*(3-3)/3-3)

# exponent
print(2**100)
print(2/3)
print(4/3) # Quotient
# floor division
print(4//3) # Quotient without decimal
# modulus
print(5%3) # reminder
'''

### sum of the digits of a two digit number
'''
two_digit_number = input("Type a two digit number: ")
num = two_digit_number
print(int(num[0]) + int(num[1]))
'''

### BMI Calculator
'''
height = input("enter your height in m: ")
weight = input("enter your weight in kg: ")
bmi = float(weight) / (float(height)**2)
print(int(bmi))

'''

### Number manipulation and F-strings
'''
print(3.148)
print(int(3.648))
print(round(3.648))
print(round(3.648, 2))
name = "Loki"
age = 22
kyc = f"I am {name}, {age} years old ! 😂😂😂😂😂"
print(kyc)
'''

### Life in a Week
'''
age = input("What is your current age?")
total_years = 90
years_left = total_years - int(age)

days_left = years_left * 365
weeks_left = years_left * 52
months_left = years_left * 12

msg = f"You have {days_left} days, {weeks_left} weeks, and {months_left} months left."

print(msg)
'''

### TIP CALCULATOR
'''
print("\n\nWelcome to the tip calcuator.")
total_bill = float(input("What was the total bill? ₹"))
perc_tip = int(input("What percentage tip would you like to give? 10, 12, or 15? "))
people = int(input("How many people to split the bill? "))

total_bill += (total_bill * (perc_tip / 100))
splitted_bill = round(total_bill/people, 2)

print(f"\nEach person should pay: ₹{splitted_bill}")
'''
### basic datatypes # string print("123" + "456") print("Hello" + "Buddy")  # integers print(123 + 456) print(1234567) print(12_34_567) # underscores will be ignored by the program, this will be treated as normal number  # Floats print(2.1023)  # Boolean print(True, False) ### type checking and casting print(type(12)) print(type("12")) print(type(12.6)) print(type([])) print(type({})) print(type(True)) print("I have " + str(5) +" books.") print(int("20") + int("20")) print(str(20) + str(20)) print(type(2/4)) # print("you are " + 22 + " years old." ) ### Mathematical operators ### ---- PEMDASLR rule --- # Parenthesis # Equal # Multiplication and Diivision # Addition and Substraction # from Left to Right # ---------------------- print(3+3*3-3/3-3) print(3+3*(3-3)/3-3)  # exponent print(2**100) print(2/3) print(4/3) # Quotient # floor division print(4//3) # Quotient without decimal # modulus print(5%3) # reminder ### sum of the digits of a two digit number two_digit_number = input("Type a two digit number: ") num = two_digit_number print(int(num[0]) + int(num[1])) ### BMI Calculator height = input("enter your height in m: ") weight = input("enter your weight in kg: ") bmi = float(weight) / (float(height)**2) print(int(bmi)) ### Number manipulation and F-strings print(3.148) print(int(3.648)) print(round(3.648)) print(round(3.648, 2)) name = "Loki" age = 22 kyc = f"I am {name}, {age} years old ! 😂😂😂😂😂" print(kyc) ### Life in a Week age = input("What is your current age?") total_years = 90 years_left = total_years - int(age)  days_left = years_left * 365 weeks_left = years_left * 52 months_left = years_left * 12  msg = f"You have {days_left} days, {weeks_left} weeks, and {months_left} months left."  print(msg) ### TIP CALCULATOR print("\n\nWelcome to the tip calcuator.") total_bill = float(input("What was the total bill? ₹")) perc_tip = int(input("What percentage tip would you like to give? 10, 12, or 15? ")) people = int(input("How many people to split the bill? "))  total_bill += (total_bill * (perc_tip / 100)) splitted_bill = round(total_bill/people, 2)  print(f"\nEach person should pay: ₹{splitted_bill}")