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
using System; | |
Random random = new Random(); | |
Console.CursorVisible = false; | |
int height = Console.WindowHeight - 1; | |
int width = Console.WindowWidth - 5; | |
Console.WriteLine($"Height: {height}, Width: {width}"); | |
bool shouldExit = false; | |
// Console position of the player |
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
using System; | |
// ourAnimals array will store the following: | |
string animalSpecies = ""; | |
string animalID = ""; | |
string animalAge = ""; | |
string animalPhysicalDescription = ""; | |
string animalPersonalityDescription = ""; | |
string animalNickname = ""; | |
string suggestedDonation = ""; |
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
string pangram = "The quick brown fox jumps over the lazy dog"; | |
string[] words = pangram.Split(" "); | |
string answer = ""; | |
string reverse = ""; | |
char[] charArray; | |
for (int i = 0; i < words.Length; i++) { | |
charArray = words[i].ToCharArray(); | |
Array.Reverse(charArray); | |
reverse = new string(charArray); |
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 time, math | |
# Sample timestamp to test. | |
dTs = 1610033721 | |
def returnTimeSince(unixtimestamp: int) -> str: | |
# String which will contain formatted time. | |
timesince = "" | |
# Get the difference between the argument timestamp and current timestamp. | |
# Note: time.time() returns a float. |