# The Zen of Python
import this
# Comments
# This is a python tutorial and a single line comment
''' This is a multiline comment
pretty awesome!!
Let me introduce you to jennifer!'''
# Simple imports
import math
import random
# importing specific functions from modules
# imports just the factorial function from math
from math import factorial
# imports all the functions from math
from math import *
# Giving aliases
# The Module name is alaised
import math as m
# The function name is alaised
from math import factorial as fact
# Calling imported functions
# If you import the module you have to call the functions from the module
import math
print (math.factorial(12))
# If you import the functions you can call the function as if it is in your program
from random import randrange as rg
print (rg(23, 1000))
# Variables
msg = "Python!" # String
v2 = 'Python!' # Also String works same
v1 = 2 # Numbers
v3 = 3.564 # Floats / Doubles
v4 = True # Boolean (True / False)
# print()
# automatically adds a newline
print (msg)
print (v2)
print (v1)
print (v3)
print (v4)
print ("Hello Python!")
# Note: Both " and ' can be used to make strings. And this flexibility allows for the following:
msg2 = 'Jennifer said, "I love Python!"'
msg3 = "After that Jennifer's Python Interpreter said it back to her!"
msg4 = 'Of Course she used the command `print("I love Jennifer")`'
print (msg2)
print (msg3)
print (msg4)
# input()
msg = input()
# input() with message
msg = input ("Provide some input: ")
print (msg)
# Check for specific input without storing it
if input("Enter something: ") == "something":
print ("Something something")
else: print ("Not Something")
# Python takes every input as a string
# So, if required you can convert to the required type
msg = input("Enter a number: ")
print (type(msg))
msg = int(input ("Enter a number again, if not a number this will throw an error: "))
print (type(msg))
# Basic Arithmetic operations
# Add
print (3 + 2)
print (3.4565 + 56.232)
print ('------------')
# Subtract
print (3 - 4)
print (34.56 - 3.78)
print ('------------')
# Multiply
print (4 * 3)
print (7.56 * 34)
print ('------------')
# Division
print (5 / 2)
print (5.0 / 2)
print (5 / 2.0)
print (25.0 / 5)
print ('------------')
# Exponents
print (4 ** 4)
print (5.67 ** 3)
print ('------------')
# Modulo
print (10%3)
print (10%11)