In: Biology
Write a class to accept a sentence from the user and prints a new word in a terminal formed out of the third letter of each word. For example, the input line “Mangoes are delivered after midnight” would produce “neltd”.
Program Style : Basic Java Programming
In: Computer Science
In python Using the example code from the HangMan program in our textbook, create a Word Guessing Game of your choice. Design a guessing game of your own creation. Choose a theme and build your words around that theme. Keep it simple.
Note: I would highly recommend closely reviewing the HangMan code and program from Chapter 10 before starting work on this project. You can run the program via my REPL (Links to an external site.).
Using python Similar to our Number Guessing game, be sure to allow the player the option to keep playing and keep score. You can design the game however you see fit but it must meet these requirements:
General Requirements
Word lists
Output in python test and paste code
Guesses in python code show
Think the program through
Break this down into smaller sized concepts first. Walk through the program functions step by step. Here is some of my thought processes to get you started. Thank you for helping me
import wordlist
# Get a random word from the word list
def get_word():
word = wordlist.get_random_word()
return word.upper()
# Add spaces between letters
def add_spaces(word):
word_with_spaces = " ".join(word)
return word_with_spaces
# Draw the display
def draw_screen(num_wrong, num_guesses, guessed_letters,
displayed_word):
print("-" * 79)
print("Word:", add_spaces(displayed_word),
" Guesses:", num_guesses,
" Wrong:", num_wrong,
" Tried:", add_spaces(guessed_letters))
# Get next letter from user
def get_letter(guessed_letters):
while True:
guess = input("Enter a letter: ").strip().upper()
# Make sure the user enters a letter and only one letter
if guess == "" or len(guess) > 1:
print("Invalid entry. " +
"Please enter one and only one letter.")
continue
# Don't let the user try the same letter more than once
elif guess in guessed_letters:
print("You already tried that letter.")
continue
else:
return guess
# The input/process/draw technique is common in game
programming
def play_game():
word = get_word()
word_length = len(word)
remaining_letters = word_length
displayed_word = "_" * word_length
num_wrong = 0
num_guesses = 0
guessed_letters = ""
draw_screen(num_wrong, num_guesses, guessed_letters, displayed_word)
while num_wrong < 10 and remaining_letters > 0:
guess = get_letter(guessed_letters)
guessed_letters += guess
pos = word.find(guess, 0)
if pos != -1:
displayed_word = ""
remaining_letters = word_length
for char in word:
if char in guessed_letters:
displayed_word += char
remaining_letters -= 1
else:
displayed_word += "_"
else:
num_wrong += 1
num_guesses += 1
draw_screen(num_wrong, num_guesses, guessed_letters, displayed_word)
print("-" * 79)
if remaining_letters == 0:
print("Congratulations! You got it in",
num_guesses, "guesses.")
else:
print("Sorry, you lost.")
print("The word was:", word)
def main():
print("Play the H A N G M A N game")
while True:
play_game()
print()
again = input("Do you want to play again (y/n)?: ").lower()
if again != "y":
break
if __name__ == "__main__":
main()
In: Computer Science
In a 500 word journal entry, describe the strategies used to prioritize organizational and community needs and resources for public health programs/initiatives.In a 500 word journal entry, describe the strategies used to prioritize organizational and community needs and resources for public health programs/initiatives.
In: Nursing
You will typically write a 500-word answer (+/- 50 words)
Explain three main features of economic transition? As an example consider the current challenges facing Russia in terms of economic growth.
Please take care of the word limit and answers should not be plagiarized
THANKYOU
In: Economics
1. Trace the history of a word (its etymology) like we did with calculate earlier in the chapter. Discuss how the meaning of the word (the symbol) has changed as it has gotten further from its original meaning. Two interesting words to trace are hazard and phony.
In: Psychology
5. Of the 9-letter passwords formed by rearranging the letters AAAABBCCC (4 A’s, 2 B’s, and 3 C’s), I select one at random. Determine the following probabilities.
(a) Prob (my word is a palindrome and has no two C’s next to each other). 4 points
(b) Prob (my word has two C’s next to each other and the other C not next to them).
(c) Prob (my word has the three C’s next to each other and the B’s apart from each other).
Leave your probabilities with factorials in them.
In: Advanced Math
5. Of the 9-letter passwords formed by rearranging the letters AAAABBCCC (4 A’s, 2 B’s, and 3 C’s), I select one at random. Determine the following probabilities.
(a) Prob (my word is a palindrome and has no two C’s next to each other).
(b) Prob (my word has two C’s next to each other and the other C not next to them).
(c) Prob (my word has the three C’s next to each other and the B’s apart from each other). Leave your probabilities with factorials in them.
In: Advanced Math
3. An experiment consists of randomly rearranging the 10 letters
of the word
QUARANTINE
into a sequence of 10 letters, where all possible orders of these
10 letters are equally likely. Find the probability of each of the
following events:
(1) 2 the first three letters include no A’s;
(2) 3 the first three letters or the last three letters (or both)
include no A’s;
(3) 2 the fourth letter is the first A;
(4) 3 the first letter and the last letter are the same;
(5) 2 the word ‘QUARANTINE’ is obtained;
(6)3 the sequence contains the word ‘RAN’
In: Statistics and Probability
13. A digital computer has a memory unit with 32 bits per word. The instruction set consists of 260 different operations. All instructions have an operation code part (opcode) and an address part (allowing for only one address). Each instruction is stored in one word of memory.
a) How many bits are needed for the opcode?
b) How many bits are left for the address part of the instruction?
c) What is the maximum allowable size for memory?
d) What is the largest unsigned binary number that can be accommodated in one word of memory?
In: Computer Science