I need someone to write a program in Python.

User Generated

Znexb

Programming

Description

The instructions are on the link. 

Program2.pdf 

Unformatted Attachment Preview

CSC 122 – INTRODUCTION TO PROGRAMMING PROG #2 100 POINTS Programming Exercise #2 Magic Dates Due: February 11, 2015 Instructions: The date March 5, 2015, is special because when it is written in the following format, the month times the day equals the year. 3/5/15 Write a program that asks the user to enter a two-digit month, a two-digit day, and a two-digit year. The program should then determine whether the month times the day equals the year. If so, it should display a message saying “The date is magic!” Otherwise, it should display a message saying “The date is not magic.” The program should do the following validation: 1. The month should not be less and 1 or greater than 12. If it is, the program should display an error message saying “Error: Invalid month input!” 2. The day should not be less than 1 or greater than 31. If it is, the program should display an error message saying “Error: Invalid day input!” 3. The year should not be less than 0 or greater and 99. If it is, the program should display an error message saying “Error: Invalid year input!” Programming Style Requirements 1. To write a new Python program in IDLE, you open a new editing window to store your code (also referred to as source code). Click File on the menu bar, then click New File or alternatively you can press Ctrl+N. 2. Standard Output Program Header Information CSC 122-Section # - Program #2 By The standard output program header information is to be included at the top of the program and should be the first lines displayed on the output screen. Winter 2015 1 Due: 2/11/2015 CSC 122 – INTRODUCTION TO PROGRAMMING PROG #2 3. Comments Include a main comment block (2-3 lines is sufficient) after the standard output program header information that describes the purpose of the program. In Python, comments begin with the # character in column 1. Comments can also be put at the end of the line of code. 4. Saving the Program Save the program created in the text editor window as Prog2.py 5. Running the Program While in the text editor window, run the program by pressing the F5 key or by clicking Run on the editor window’s menu bar, then Run Module. If the program has not been saved since the last modification was made, a dialog box will appear. Click OK to save the program. When the program runs you will see its output displayed in IDLE’s Python Shell window. Sample Output: Winter 2015 2 Due: 2/11/2015 CSC 122 – INTRODUCTION TO PROGRAMMING Winter 2015 3 PROG #2 Due: 2/11/2015 CSC 122 – INTRODUCTION TO PROGRAMMING Winter 2015 4 PROG #2 Due: 2/11/2015 CSC 122 – INTRODUCTION TO PROGRAMMING PROG #2 Note: The blue text in the sample output above is the text generated by the program and the black text is the input from the keyboard. When the program is working correctly, submit the Prog2.py file to Blackboard. (DO NOT send the program via email. Only homework submitted via Bb will be graded.) Grade Rubric: *Points Task 5 The program is saved with the proper filename. 5 The program displays the standard program header information. 10 The program includes comments. 15 The program asks the user to enter a 2-digit month, 2-digit day and 2-digit year. 10 The program validates the month and displays an error message if entered invalid. 10 The program validates the day and displays an error message if entered invalid. 10 The program validates the year and displays an error message if entered invalid. 10 The program displays the month, day and year entered as MM/DD/YY. 20 5 100 The program determines whether the month times the day equals the year. If so, it displays a message saying the date is magic. Otherwise, it displays a message saying the date is not magic. The output looks like the sample output above. Total Points *NOTE: NO CREDIT WILL BE GIVEN FOR A PROGRAM THAT DOES NOT RUN. Winter 2015 5 Due: 2/11/2015 CSC 122 – INTRODUCTION TO PROGRAMMING PROG #2 Steps for Uploading the Program to Blackboard 1. Click on the Course Content tab. This will take you to the course assignment that has been posted. 2. Click on the Programming Assignments folder. Program #2 is located in this folder. 3. Click the >> Program #2 link to start the uploading process. 4. Go to the Assignment Materials area to attach the Prog2.py file. Click the Browse for Local File button to locate and attach your file. 5. Once you have attached the Prog2.py file, click the Submit button to submit your program. 6. Program #2 submission has been completed. Winter 2015 6 Due: 2/11/2015
Purchase answer to see full attachment
User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.

Explanation & Answer


Anonymous
Great study resource, helped me a lot.

Studypool
4.7
Trustpilot
4.5
Sitejabber
4.4

Related Tags