Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

COSI 10a Introduction to Problem Solving in Python (Spring 2023)

Programming Assignment 5

Program Description

Write a reverse Hangman game in which the user thinks of a word and the computer tries to guess the letters in that word. The user tells the computer how many letters the word contains. Your program must output what the computer guessed on each turn and show the partially completed word. It also must use pseudorandom functions to make guesses (i.e., it should not simply try all the letters in order, nor should it use the user’s input to its advantage), and it should not guess the same letter more than once.

NOTE: Because this program uses pseudorandom numbers, you won’t be able to recreate this exact log. The key requirement is that you reproduce the format of this log.

You may talk to other students about the assignment and consult the slides and online resources for syntax, but all code you submit must be your own. Do not copy code directly from other students or from any online resources. The best way to not get caught plagiarizing is to    not do it in the first place.

Guidelines

Include a header at the top of your file with your name and a description of the program in your own words.

# Name Student

# COSI 10a, Spring 2023

# Programming Assignment 5

#

# Description: …

Your code should be well structured into functions with a call to a main method. Your variables should have descriptive names and your code should be well commented.

You are allowed to use any of the material we have covered in class so far but you should think carefully about choosing structures that are optimal for the problem and which lend themselves to reducing redundancy.

You will likely need to use lists and sets (I would encourage you to revisit the pop() function of sets in particular). You should also review the slides on string formatting, boolean expressions, and while loops.

Submission and Grading

Submit via Latte a zip file named yourfirstname_yourlastnamePA5.zip which contains your program file. To create a zip file on Mac, right click the document/folder and select the        “Compress [document/folder name]” option. On Windows, right click the document/folder and    select the “Send To..” and then “zip/compressed file” options. See the top of this document for   the due date and time.

There are 3 possible grades you may receive for this assignment: fail, pass, and pass+. Any    program that fails to run correctly will receive a Fail. A program that receives a grade of Pass   will run correctly, but may not be the most well documented or structured. A Pass+ assignment runs correctly and is well structured and commented.