Skip to content

Instantly share code, notes, and snippets.

View sanjaysheel's full-sized avatar
🏠
love open-source and working from home and contributing to the opensource world

Sanjaysheel sanjaysheel

🏠
love open-source and working from home and contributing to the opensource world
View GitHub Profile
body {
background-color: #92a8d1;
}
h6 {
color: navy;
margin-left: 20px;
}
@sanjaysheel
sanjaysheel / House Sales_in_King_Count_USA.ipynb
Created December 24, 2019 05:40
Created on Cognitive Class Labs
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@sanjaysheel
sanjaysheel / course_2_assessment_5.py
Created December 19, 2019 14:49
Created on Cognitive Class Labs
# Create a tuple called olympics with four elements: “Beijing”, “London”, “Rio”, “Tokyo”
olympics=('Beijing','London','Rio','Tokyo')
@sanjaysheel
sanjaysheel / course_2_assessment_4.py
Created December 19, 2019 13:24
Created on Cognitive Class Labs
# Write a function called int_return that takes an integer as input and returns the same integer.
def int_return(ib):
return ib
print(int_return(5))
@sanjaysheel
sanjaysheel / course_2_assessment_3.py
Created December 19, 2019 06:50
Created on Cognitive Class Labs
#Create a dictionary called low_d that keeps track of all the characters in the string p and notes how many times each character was seen. Make sure that there are no repeats of characters as keys, such that “T” and “t” are both seen as a “t” for example.
p = "Summer is a great time to go outside. You have to be careful of the sun though because of the heat."
@sanjaysheel
sanjaysheel / iris.csv
Created December 18, 2019 14:24
Created on Cognitive Class Labs
5.1 3.5 1.4 0.2 Iris-setosa
4.9 3.0 1.4 0.2 Iris-setosa
4.7 3.2 1.3 0.2 Iris-setosa
4.6 3.1 1.5 0.2 Iris-setosa
5.0 3.6 1.4 0.2 Iris-setosa
5.4 3.9 1.7 0.4 Iris-setosa
4.6 3.4 1.4 0.3 Iris-setosa
5.0 3.4 1.5 0.2 Iris-setosa
4.4 2.9 1.4 0.2 Iris-setosa
4.9 3.1 1.5 0.1 Iris-setosa
@sanjaysheel
sanjaysheel / course_2_assessment_2.py
Created December 18, 2019 13:48
Created on Cognitive Class Labs
# At the halfway point during the Rio Olympics, the United States had 70 medals, Great Britain had 38 medals, China had 45 medals, Russia had 30 medals, and Germany had 17 medals. Create a dictionary assigned to the variable medal_count with the country names as the keys and the number of medals the country had as each key’s value.
v={'United States':70,'Great Britain':38,'China':45,'Russia':30,'Germany':17}
medal_count=v
print(medal_count)
@sanjaysheel
sanjaysheel / second_course.py
Created December 18, 2019 05:11
Created on Cognitive Class Labs
# The textfile, travel_plans.txt, contains the summer travel plans for someone with some commentary. Find the total number of characters in the file and save to the variable num.
with open('travel_plans.txt','a+') as op:
num=0
for i in op.read():
num+=1
@sanjaysheel
sanjaysheel / ques_python.py
Last active May 25, 2021 07:25
Created on Cognitive Class Labs
# rainfall_mi is a string that contains the average number of inches of rainfall in Michigan for every month (in inches) with every month separated by a comma. Write code to compute the number of months that have more than 3 inches of rainfall. Store the result in the variable num_rainy_months. In other words, count the number of items with values > 3.0.
# Hard-coded answers will receive no credit.
rainfall_mi = "1.65, 1.46, 2.05, 3.03, 3.35, 3.46, 2.83, 3.23, 3.5, 2.52, 2.8, 1.85"
b=rainfall_mi.split(',')
rainfall_mi=0
count=0
@sanjaysheel
sanjaysheel / exploratory-data-analysis.ipynb
Created December 15, 2019 10:38
Created on Cognitive Class Labs
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.