Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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
# Given a list filled with 0s and 1s, find the maximum number of consecutive 1s in this list. | |
# List of 0s and 1s | |
track_ones = [1,1,0,1,1,1] | |
def find_max(): | |
count_ones = [] | |
only_ones = [] | |
ones = 0 |
This file contains hidden or 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
id | name | price_per_unit | quantity_on_hand | |
---|---|---|---|---|
1001 | prod1 | 500 | 11 | |
1002 | prod2 | 155.5 | 8 | |
1003 | prod3 | 183 | 13 | |
1004 | prod4 | 380.35 | 19 | |
1005 | prod5 | 950 | 0 | |
1006 | prod6 | 420 | 20 |
This file contains hidden or 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
# Account has: Account Number (6 digits), PIN Number (4 digits), balance ($) | |
""" | |
INSTRUCTION: The file: 'atm_account_database.csv' is the bank accounts database. | |
The database contains all the existing Account users, Account Numbers, Account PINs and Current balances | |
Some of the existing accounts are: | |
- User: Eddy, Account Number: 123456, Account PIN: 1234 | |
- User: Manuella, Account Number: 123457, Account PIN: 1235 | |
All transactions are handled by the ATM Machine. | |
""" |
This file contains hidden or 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
# Must import the 'pandas' library. Ref: https://pandas.pydata.org/getpandas.html | |
# panda website tutorial: https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.index.html#pandas.DataFrame.index | |
# This program assumes that you have the file: Countries.csv saved in the same directory | |
import pandas as pan | |
# Load the file data | |
fLoad = pan.read_csv('Countries.csv') | |
# Sort by Columns: Name, GDPPC, Literacy, InfantMortality, Population or NetMigration |
This file contains hidden or 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
# A reservation system which books airline seats. | |
# My Airplane is an Airbus A340-200 with a total of 50 passengers seats | |
# First Class: 8 seats (Round Trip: $634.37 per seat; One Way: $380.96 per seat) | |
# Business Class: 12 seats (Round Trip: $579.25 per seat; One Way: $347.43 per seat) | |
# Economy: 30 seats (Round Trip: $182.99 per seat; One Way: $109.89 per seat) | |
import datetime | |
# Keep Track of Seats availability: | |
seatsTaken_firstClass = [] |
This file contains hidden or 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
1#If a number is divided by 4, then 3 is subtracted, the result is 0. What is the number? {a. 4, b. 3, c. 10, d. 12} | |
1001#d | |
2#Solve X where 3(x + 1) = 5(x - 2) + 7 {a. -2, b. 2, c. 1/2, d. 3} | |
1002#d | |
3#Which of the following is closest to the square root of 10.5? {a. 3, b. 5, c. 4, d. 2} | |
1003#a | |
4#A father gave $500 to his two sons. He gave X dollars to one son. Which of the following expressions correctly shows the amount he gave to the other? {a. 500 + X, b. 500 / X, c. 500 x X, d. 500 - X} | |
1004#d | |
5#Solve X where 5X = 20 {a. 4, b. 5, c. 10, d. 15} | |
1005#a |
This file contains hidden or 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 by Eddy Ruhana (Software Developer) | |
# A Function that accepts a word as a parameter and returns it in Pig Latin. | |
class PigLatin: | |
def __init__(self, a_word): | |
"""Class that will convert words into PigLatin""" | |
self.a_word = a_word | |
def returnPigLatin(self): | |
"""Take a word and convert it in Pig Latin""" |
This file contains hidden or 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
""" | |
Given a non-empty list of integers, every element appears twice except for one. Find that single one. | |
~ Solved by Eddy Ruhana | |
""" | |
intlist = [1, 1, 0, 2, 2, 3, 3, 5, 5, 4, 4] | |
enum_list = enumerate(intlist, 0) | |
duplicate_list = [] |
NewerOlder