Skip to content

Instantly share code, notes, and snippets.

View ppeuchin's full-sized avatar
💗
Focusing

Deandra ppeuchin

💗
Focusing
View GitHub Profile

MS Office activation

Steps

  1. Download and install Office 365

  2. Remove current trial license

  3. Open command prompt as admin

  4. Navigate to the Office folder

@ppeuchin
ppeuchin / average_of_rows.py
Created November 7, 2021 21:49
Sololearn: Data Science - Average of rows code project
import numpy as np
n, p = [int(x) for x in input().split()]
i = 0
list_arr = []
# appends empty lists(rows) for the 2d array to list_arr
# and then appends the values from each line of input into the individual lists in the list
given_year = 2044
if (given_year % 4 == 0) and (given_year % 100 != 0):
print("It is a leap year")
elif (given_year % 100 == 0) and (given_year % 400 == 0):
print("It is a leap year")
else:
print("It is not a leap year")
@ppeuchin
ppeuchin / factorials.py
Created September 19, 2021 14:18
A program that returns the factorial of a number
# using recursion
def factorial(x):
if x == 1:
return 1
else:
return x * factorial(x - 1)
@ppeuchin
ppeuchin / palindrome.py
Created September 3, 2021 16:20
A program that reads a string from the user and uses a loop to determines whether or not it is a palindrome.
# A string is a palindrome if it is identical forward and backward.
palindrome = input("Enter a string: ")
reversed_text = ""
for i in range(-1, -(len(palindrome) + 1), -1):
reversed_text = reversed_text + palindrome[i]
if palindrome == reversed_text:
print(palindrome, "is a palindrome")
@ppeuchin
ppeuchin / until_0.py
Last active September 3, 2021 16:21
A program that reads integers from the user until the user enters 0 and stores them in a list.
# The program then displays all the values except 0 from the smallest to the largest, with each integer appearing on different lines.
nums_list = []
while True:
num = int(input("Enter an integer: ")
if num == 0:
break
else:
nums_list.append(num)
@ppeuchin
ppeuchin / ranking_board.py
Created September 3, 2021 16:01
Ranking Board
'''SoloLearn: You are given a DataFrame that includes the names and ranks of people.
You need to take a rank as input and output the corresponding name column from the DataFrame as a Series.
'''
'''Note that the rank is an integer, so you need to convert the user input to an integer.'''
import pandas as pd
data = {
'name': ['James', 'Billy', 'Bob', 'Amy', 'Tom', 'Harry'],
'rank': [4, 1, 3, 5, 2, 6]
@ppeuchin
ppeuchin / anagrams.py
Last active September 3, 2021 16:23
A program that reads two strings from the user and determines whether or not they are anagrams.
# Two words are anagrams if they contain all of the same letters, but in a different order.
txt1 = input("Enter a string: ")
txt2 = input("Enter another string: ")
counts = 0
for i in txt2:
if i in txt1:
counts += 1
else:

Keybase proof

I hereby claim:

  • I am scylladev on github.
  • I am scylladev (https://keybase.io/scylladev) on keybase.
  • I have a public key ASCCRbnuOIWoCRXBwVr3b58zJtAp4MUu8pnfijZw4eZuHwo

To claim this, I am signing this object: