Skip to content

Instantly share code, notes, and snippets.

View Cython-dot's full-sized avatar
🎯
Focusing

Data | Computer Scientist Cython-dot

🎯
Focusing
View GitHub Profile
"""
Write a function called unique_english_letters that takes the string word as a parameter.
The function should return the total number of unique letters in the string.
Uppercase and lowercase letters should be counted as different letters.
We’ve given you a list of every uppercase and lower case letter in the English alphabet.
It will be helpful to include that list in your function.
"""
#include <stdio.h>
int main(void)
{
int age = 15;
(age == 15) ? printf("You're 15 years old. \n") : printf("You're not 15 years old.\n");
return 0;
}
"""
Create a function named same_name() that has two parameters named your_name and my_name.
If our names are identical, return True. Otherwise, return False.
"""
# Write your same_name function here:
def same_name(your_name, my_name):
"""
Create a function called every_three_nums that has one parameter named start.
The function should return a list of every third number between start and 100 (inclusive).
For example, every_three_nums(91) should return the list [91, 94, 97, 100].
If start is greater than 100, the function should return an empty list.
"""
#Write your function here
"""
Create a function named lots_of_math(). This function should have four parameters named a, b, c, and d. The function should print 3 lines and return 1 value.
First, the sum of a and b.
Second, d subtracted from c.
Third, the first number printed, multiplied by the second number printed.
Finally, it should return the third number printed mod a.
@Cython-dot
Cython-dot / small_biz.py
Created January 28, 2020 18:43
Small Business in Python
"""
Carly's Clippers
You are the Data Analyst at Carly’s Clippers, the newest hair salon on the block. Your job is to go through the lists of data that have been collected in the past couple of weeks. You will be calculating some important metrics that Carly can use to plan out the operation of the business for the rest of the month.
You have been provided with three lists:
hairstyles: the names of the cuts offered at Carly’s Clippers
prices: the price of each hairstyle in the hairstyles list
last_week: the number of each hairstyle in hairstyles that was purchased last week
Let’s get started!
"""
PYTHON 3
Coding challenges | loops
"""
"""
CODE CHALLENGE: LOOPS
Divisible by Ten
divisible_by_ten(nums)