Comscience113.docx

Knowing how to write, compile and execute code is a skill you’ll need throughout your professional career. In this course, you’ve learned how to create software programs using standard coding structures and processes such as variables, constants, operators, decision logic, arrays, iteration constructs, and functions. For this assignment, you will write an application using the Python programming language. Write a program that uses the random module to play Guess the Number game. The program should consist of three functions. The first will display the Title and program specifications. The second plays the game. The main function calls those functions as it controls the playing of the game. The Python program should be developed in three steps and each step builds off the code from the previous step, which is listed below. Note: be sure to leave comments in your code that explain the intention of your functions.

Prompt

1. Create a Python project in IDLE and begin the Project Program by developing a Python Function called display title() to display the title and programming specifications for the project.

2. Expand the Project Program and create a function called play game() that uses the randint() function that gets the number that the player has to guess. It then returns a random number between 1 and 10. Use a while statement so the user can guess the number until the guess is correct. If the users guess is lower than the random number then display the message ‘Too low’. If the user guess is higher than the random number then display the message ‘Too high’. If the user guess matches the random number display the message, ‘You guessed it ‘. Then, a return statement returns to the statement in the main() function that is after the call to the play game() function.

3. Expand the Project Program and create main() function to the function call statements. Call the display title() function. Then define a variable that will hold the value of yes. Create a loop that will check the variable, while the variable equals yes then call the play game function. Then allow the user to input if they want to play again. If yes, play again, if no end the program.

Related Lessons

You can use the following lessons in the course in order to help you work through this assignment:

·

·

·

Grading Rubric

Your projects will be graded based on the following rubric:

Category

Unacceptable (0-2)

Needs Improvement (3-6)

Good (7-8)

Excellent (9-10)

Points

Programming Logic(x3)

The program produces incorrect results and/or does not compile at all and fails to meet majority of specifications

The program compiles; some minimal I/O or logic errors and meets most specifications

The program compiles and has no I/O or logic errors and meets all specifications

The program compiles and has no I/O or logic errors and exceeds specifications

30

Standards (x3)

Program is poorly written

Several inappropriate design choices (i.e. poor variable names, improper indentation)

Few inappropriate design choices (i.e. poor variable names, improper indentation)

Program is stylistically well designed

30

Code Efficiency(x2)

The code is huge and appears to be patched together

The code is brute force an unnecessarily long

The code is fairly efficient without sacrificing readability and understanding.

The code is extremely efficient without sacrificing readability and understanding.

20

Documentation (x2)

No documentation exists

The documentation is vague and/or does not give a brief overview of what the code is accomplishing and how

The documentation is terse but nonetheless gives a brief overview of what the code is accomplishing and how.

The documentation is well written and clearly explains what the code is accomplishing and how.

20

Before You Submit

When you complete your assignment, we suggest taking some time to check for any errors or to add any finishing touches. We also suggest that you use online plagiarism checkers such as  PlagScan or  DupliChecker to make sure that your assignment is not too similar to any existing materials. Plagiarized submissions will NOT be graded.

How to Submit Your Assignment

When you are ready to submit your assignment,  please fill out the submission form and attach your assignment as a Python file (.py). You should receive your assignment grade within one week.

Do NOT submit your assignment as a PDF. The PDF format will remove the spacing/indentation from your program’s code, which will make us able to grade it properly.

GET HELP WITH YOUR HOMEWORK PAPERS @ 25% OFF

For faster services, inquiry about  new assignments submission or  follow ups on your assignments please text us/call us on +1 (251) 265-5102

Write My Paper Button

WeCreativez WhatsApp Support
We are here to answer your questions. Ask us anything!
👋 Hi, how can I help?
Scroll to Top