def randomword_tst(): print('**************************************') print('randomword() testing...') word = '' word = mathstropy.randomword() if word != '': result = 'Passed' else: result = 'Failed' print('Description: Generate a random word.') print('Output:', word) print('Result:', result)
# Intro to GameDev - word guessing game - While Loop TEMPLATE import mathstropy random_word = mathstropy.randomword() # random word generator function print("Your job is to guess the secret word.") hint = mathstropy.wordmask(random_word) print(hint) # this shows the masked word, some letters of the word are hidden # initialize the cv # create a while loop # once while loop ends # print the random word and congratulate user
# -*- coding: utf-8 -*- """ Created on Sat Aug 29 23:44:27 2020 @author: JZST6G """ ##import os ## ##path_parent = os.path.dirname(os.getcwd()) ##os.chdir(path_parent) ##print(os.getcwd()) import mathstropy word = mathstropy.randomword() print(mathstropy.wordmask(word))