subject

Now, it’s time for you to begin coding your text-based adventure game! Starting at the top, convert each line of your pseudocode from your Coding Log into a line of Python code.
Make sure to use the correct syntax and indentation. If you decide to challenge yourself and use functions, be sure to include the correct function calls.
Your code should include at least two loops—one while loop and one for loop.
Run and test your code in parts as you go. Follow the iterative process of coding and revising. It may be helpful to apply this process to each part of your game (Intro, Part 1, Part 2, and Part 3).
Make the following improvements to your game:
If the user types in a slightly different word than you expect, you don’t want your game to crash! Use lists to gain a better understanding of the input that users give. Refer back to Unit 1 for more information on lists. Here is an example:
if choice in [“set a trap”, “set trap”, “trap”, “make a trap”, “make trap”]
Your list won’t work if the user capitalizes any letter because the Interpreter won’t recognize a match between the same lowercase and uppercase letter. To convert the user input to all lowercase, use the lower function:
if choice. lower() in [“set a trap”, “set trap”, “trap”, “make a trap”, “make trap”]

Go through and make sure all of your inputs are converted to lowercase.
Share the link to your Python code with your teacher in REPL. it by clicking on the share button and copying the link. Also, submit your pseudocode.

ansver
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 21.06.2019 17:20, dylanolmeda9
The thickness of a part is to have an upper specification of 0.925 and a lower specification of 0.870 mm. the average of the process is currently 0.917 with a standard deviation of 0.005. determine the percentage of product above 0.93 mm.
Answers: 3
image
Computers and Technology, 22.06.2019 22:00, mrnotsosmart744
Discuss the ways in which electronic information associated with payments is addressed in terms of security. include encryption, secure sockets layers, and secure electronic transactions in your discussion. are there any other ways that consumers and businesses can keep their payment information secure in an electronic commerce environment? do you feel that your information is safe when conducting electronic business? why or why not?
Answers: 1
image
Computers and Technology, 23.06.2019 15:00, victordhernandez01
Jake really works well with numbers and is skilled with computers but doesn't work well with others. which of the jobs discussed in this unit might be best for jake? why?
Answers: 3
image
Computers and Technology, 23.06.2019 17:00, osirisarellane3792
*! 20 points! *jeff wants to create a website with interactive and dynamic content. which programming language will he use? a. dhtml b. html c. css d. javascript
Answers: 1
You know the right answer?
Now, it’s time for you to begin coding your text-based adventure game! Starting at the top, convert...

Questions in other subjects:

Konu
Business, 15.12.2020 17:00