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
// # Enter your code here. Read input from STDIN. Print output to STDOUT | |
// # Each line of the input file will begin with an operation (S or C) followed by a semi-colon followed by M, C, or V | |
// # The operation will either be S (split) or C (combine) | |
// # M indicates method, C indicates class, and V indicates variable | |
// # In the case of a split operation, the words will be a camel case | |
// # In the case of a combine operation, the words will be a space-delimited list of words starting with lowercase letters that you need to combine into the appropriate camel case String |
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
import random | |
import re | |
# create a class called board to represent the minesweeper game | |
class Board: | |
def __init__(self, dim_size, num_bombs): | |
# keep track | |
self.dim_size = dim_size | |
self.num_bombs = num_bombs | |
# helper functions |
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
def main(): | |
height = get_height() | |
print_hashes(height) | |
def print_hashes(height): | |
# loop through the rows | |
for i in range(height): | |
# number of hashes per row | |
hashes = i + 1; |
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
// Implements a dictionary's functionality | |
#include <ctype.h> | |
#include <stdbool.h> | |
#include <strings.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <stdio.h> | |
#include "dictionary.h" |
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
#include <stdio.h> | |
#include <cs50.h> // to get plain text | |
#include <string.h> // for strlen() | |
#include <ctype.h> // for string operation upper, lower | |
void Do_substitute(); // for further substitute | |
void alpha_arr_val(char pos, string key); | |
// to get the alphabet array value of each plain text element (ex:plaintext = h|alphabet array = 8 {a=0, b=1 .....z=26}) | |
int main(int argc, string argv[]) |