This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Code for asking for feedback or input from a user | |
feedbackFriend = input("Do you like my idea? (yes/no) : ") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Declaring an integer | |
initialBudget = 1400 | |
# Declaring a decimal or float | |
wagePerDay = 14.5 | |
print('InitialBudget is', initialBudget) | |
print('wagePerDay is', wagePerDay) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# printing single quote | |
print('This is an \'important\' feature') | |
# printing double quote | |
print("This is \"important\", let me note it.") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Declaring tuples | |
geographicalLocation = (12.234, 34.945) | |
print("Geographical Location is", geographicalLocation) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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) |