Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

- Hard code the consonants - In Python - Dont use dictionaries 1. Read data from klingon-english.txt 2. Ask the user to choose a Klingon

- Hard code the consonants
- In Python
- Dont use dictionaries
image text in transcribed
image text in transcribed
image text in transcribed
1. Read data from klingon-english.txt 2. Ask the user to choose a Klingon consonant they want to practice with. Ask again if the user's answer is not a valid Klingon consonant, until the user enters a valid consonant. 3. Find a Klingon word that starts with the chosen consonant (the text file contains only one word that starts with any given consonant, so you don't need to use the random library) 4. Ask the user to translate the chosen word into Klingon 5. Print correct if the user's answer is correct 6. Print Sorry, you're wrong! if the user's answer is wrong You will add in this version: 7. If the answer is incorrect, show a hint: the first and last characters of the correct Klingon word. When showing a hint, replace all other characters with a star () 8. If the answer is still incorrect, show the same hint once again. You will refactor in this version: 9. Print the correct answer is ... if all three user's answers are wrong You must read data from the provided text file, that is absolutely essential in this lab assignment. You can not hardcode the words. Here are Klingon consonants: b, ch, D, gh, H, j, I, m,n,p,q,Q,r,S,t,v,w,y batlh|honor cha'pujqut|dilithium crystal De'wI'|computer ghIgh|necklace HablI' |data transceiving device jabbI'ID|data transmission lasvargh|factory mIgh|be evil noch sensor pong|name qawHaq|memory banks Qagh|error, mistake rIgh|be lame Sagh|be serious tayqeq civilization voDleH |emperor wa'les |tomorrow yuQHom planetoid 'avwI'|guard

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Management System MCQs Multiple Choice Questions And Answers

Authors: Arshad Iqbal

1st Edition

1073328554, 978-1073328550

Students also viewed these Databases questions