Write a program to generate passwords. The program should ask the user for a phase . QUESTION #2 Write a program to input ten book titles and author’s names then save them to a file named book.txt....




Write a program to generate passwords. The program should ask the user for a phase .



QUESTION #2


Write a program to input ten book titles and author’s names then save them to a file named book.txt. For each book, the user will first input the title, then input the first name, then the last name of the author, all on separate lines. In addition to saving the books in the file, please output, using the print method. the information you've gathered from the user.


You should follow this format for your output: Format: TO KILL A MOCKINGBIRD Lee, Harper


All book titles should be in upper case and the author’s name should be capitalized.



QUESTION #3


Write the code to find the average of the values stored in the text file temperatures.txt. All data in the file are float values.
Sample Output
The average temperature is: 58.36
Test Data


*average is pulled from temperatures.txt located in Google Drive* The average temperature is: 48.005



QUESTION #4
Use the file KnockKnock.txt (Down Below!) The format of the file is all odd lines have the answers to Who’s There The even numbers have the answers to _________ who? Question Count the number of lines in the file, then generate a random knock-knock joke from the file.
Sample Run
(* the extra lines are there because each line ends in a \n and students will not know how to cut those off yet *) Knock-Knock Who's there? Rabbit


Rabbit who? Rabbit up carefully it's a present! – Nobel No bell, that's why I knocked!

Boo I didn’t mean to make you cry! It’s just me! Will you let me in? It’s freezing out here!

Barbie Barbie Q Chicken! Figs Figs the doorbell, it’s broken! Kiwi Kiwi go to the store?

Lettuce Let us in, we’re freezing! Olive Olive right next door to you. Turnip Turnip the volume, it’s quiet in here. Ice cream Ice cream if you don’t let me in!

THIS IS A SIMPLE, HIGH SCHOOL COMPUTER SCIENCE COURSE IN
PYTHON. PLEASE DON'T MAKE TOO COMPLICATED, THANK YOU!



May 19, 2022
SOLUTION.PDF

Get Answer To This Question

Submit New Assignment

Copy and Paste Your Assignment Here