Question: Having trouble here importing modules into the program, any help is very much appreciated! What number am I thinking of ? Modularization Each sub program

Having trouble here importing modules into the program, any help is very much appreciated!
What number am I thinking of?
Modularization
Each sub program should exist in its own module called by the main program, bonus_project.py
Main Program and Main Menu
Create a main menu that will execute each sub program or quit. Use input validation for the user selection. For example:
Example Output:
Main Menu
What number am I thinking of?
Knock-Knock
Card Dealer
Spreadsheet Statistics
Exit
Please enter a selection (1-5) :
Subprograms
All sub programs should return to the main menu after completing their tasks. And they should exist in their own python module.
Create a random number between 0 and 100. Then prompt the user to enter a number between 0 and 100. If the number isn't the random number, it should tell the user to try again. If it is the number, then it should congratulate the user and ask the user if they would like to play again. If not, return to the main menu.
Knock-Knock
Copy the following global constant.Choose a random knock-knock from the list and use it to run the joke with the user. Use input validation to ensure the user answers correctly, if they don't then start over with the first knock-knock prompt. After the user completes the joke, ask if they would like to hear another. If not, then return to the main menu.
Card Dealer
Prompt the user for the number of cards to randomly deal. Then print the cards represented by tuples of suits and numeric ranks represented like so:
Example Run:
How many cards should I deal? 3
You have a 2 of hearts, a 3 of spades, and a Jack of diamonds.
Use the following function to generate an unshuffied deck of cards represented as a list of tuples of strings and numbers for the suit and rank respectively.Notice that the rank of the card is represented by a number, but we want to print a string in the output. For example, 11 is a jack, 12 is a queen, and 13 is a king. You will want to shufile the entire deck or choose card indices at random. If you choose random carc indices, you will need to track the chosen cards so that cards are not repeated. In other words, take care that the random indices into the unshuffled deck are all unique.
Spreadsheet Statistics
CSV files are a simple way to represent spreadsheets. You can export one from your favorite spreadsheet program or you can create one by hand. Here's an example of one for an inventory spreadsheet for a grocery store.
Item, Amount, Price,
Cookies, 10,5.2
Crackers, 20,6.0
Ham Sandwich, 3,5.0
Canned Tuna, 30,4.50
Canned Soup, 20,3.20
Create your own or copy the example and save as a .csv file.
Ask the user to enter a file name of the csv file to load. If the file isn't found, then use input validation to ask the user again. Print sum and average statistics for the numeric columns. Ignore columns that aren't numeric like Item in our example. Ask the user if they would like to do another file. If not, then return to the main menu.
Example Output:
Enter a Csv file: groceries.csv
The sum of the Amount column is 83.
The average of the Amount column is 16.6.
The sum of the Price column is 23.9.
The average of the Price column is 4.80.
Would you like statistics for another file? (y/n) n
Having trouble here importing modules into the

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!