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
; On-Screen ANSI Keyboard version 3 (original discussion at https://redd.it/kxh9rb) | |
; This customizable, non-interactive keyboard only flashes what you type. It may be used to: | |
; Memorize the ANSI keyboard format without looking down | |
; Record your keystrokes (like in a game or something) | |
; Check key functionality on a damaged keyboard | |
; Revel in or lament over your typing speed | |
; Version 3: | |
; /u/anonymous1184 used invisible characters (to differentiate Numpad numbers from their counterparts) and |
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 | |
secret_number = random.randint(1, 100) | |
print("Hello! What is your name?") | |
name = input() | |
print("Hi, " + str(name) + ". I'm thinking of a number between 1 to 100. I'll give you 7 chances to find it.") | |
chances = 7 | |
while True: |
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
while 1: | |
number_of_vowels = 0 | |
print('Enter a name to get a vowel count. Type "done" once' + " you're finished.") | |
name = input() | |
if name == "done": | |
break | |
for vowel in name: | |
if vowel == 'a' or vowel == 'e' or vowel == 'i' or vowel == 'o' or vowel == 'u': | |
number_of_vowels += 1 | |
print('Number of vowels in "' + name + '": ' + str(number_of_vowels)) |
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
minimum, maximum, guess_count = 0, 100, 0 | |
print("Please think of a number between 0 and 100!") | |
while True: | |
number = int((minimum + maximum) / 2) | |
user_input = input("Is your secret number " + str(number) + "?\nEnter 'h' to indicate the guess is too high.\n\ | |
Enter 'l' to indicate the guess is too low.\nEnter 'c' to indicate I guessed correctly.\nEnter 'm' if you made a mistake.") | |
guess_count += 1 | |
if user_input == "c": | |
break |
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
fully_correct_guess = False | |
acceptable_letters = string.ascii_letters | |
print("Welcome to Hangman!") | |
while True: | |
word = input("What word do you want the other player to guess? ") | |
# make word capital and figure out how to hide the inputted word from the console | |
if acceptable_letters not in word: # This isn't being used right lol. | |
print("You can only use the standard 26 letters of the English alphabet. Try again.") | |
else: |