Skip to content

Instantly share code, notes, and snippets.

View shabbirbhimani's full-sized avatar
💭
:)

Shabbir Bhimani shabbirbhimani

💭
:)
View GitHub Profile
@shabbirbhimani
shabbirbhimani / python-tutorials.py
Last active March 30, 2018 09:41
Input function for the feedback
# Code for asking for feedback or input from a user
feedbackFriend = input("Do you like my idea? (yes/no) : ")
@shabbirbhimani
shabbirbhimani / python-variables.py
Last active March 30, 2018 09:40
Declaring variables
# Creating the name of start up
# there is no declaration what will be value or type
companyName = "The New Verve"
initalBudget = 15000
perDayWage = 12.34
# Let's start with a ritual of programming by printing "Hello World!"
print("Hello World")
# you can also print the values if you want by using print function
# print has the following syntax
# print("statement or information", variableName)
print("company Name is", companyName)
print("Initial Budget is", initalBudget)
print("Per day Wage is", perDayWage)
# Declaring an integer
initialBudget = 1400
# Declaring a decimal or float
wagePerDay = 14.5
print('InitialBudget is', initialBudget)
print('wagePerDay is', wagePerDay)
# declaring String variables using single quote (')
companyName = 'New Company Private Limited'
# declaring String variables using double quote (")
tutorialName = "Variable and data types"
# declaring String variables using triple quote (''')
companyAddress = ''' 342-345, first floor,
Building number 5,
Road 7, North Carolina,
@shabbirbhimani
shabbirbhimani / gist:4397a95211c88006271ce2f9e0f7c1a2
Created March 29, 2018 06:09
4.3 Using Quotes and Double quotes inside strings
# printing single quote
print('This is an \'important\' feature')
# printing double quote
print("This is \"important\", let me note it.")
# Declaring Lists of office items as strings
officeItems = ['pens', 'sticky notes', 'white board']
# declaring prime no till 10
primeNumber = [2,3,5,7]
print('Office item list is', officeItems)
print('Prime number upto 10 list is', primeNumber)
# Declaring tuples
geographicalLocation = (12.234, 34.945)
print("Geographical Location is", geographicalLocation)
# Declaring Dictionary with name as key and occupation as value
companyBook = { "Daniel": "Owner", "Stacy": "Receptionist", "Smith": "Manager", "Dev":"IT"}
print("My company Book is", companyBook)
@shabbirbhimani
shabbirbhimani / gist:52551b055e5398d46969f529354fb8e8
Created March 29, 2018 06:11
4.7 Importance of declaring variables
# Declaring a variable and assigning value to it
variable = 12
variable = 23.45
variable = "garbage value"
variable = [1,2,3]
print("value of variable is", variable)