Page 1 of 1

Lab 9 Remember: You will need to include any file referenced by your program (other python files, sound or graphic files

Posted: Sun Jul 03, 2022 11:23 am
by answerhappygod
Lab 9 Remember You Will Need To Include Any File Referenced By Your Program Other Python Files Sound Or Graphic Files 1
Lab 9 Remember You Will Need To Include Any File Referenced By Your Program Other Python Files Sound Or Graphic Files 1 (51.86 KiB) Viewed 17 times
Lab 9 Remember: You will need to include any file referenced by your program (other python files, sound or graphic files, etc. INSIDE the same folder with your programs. 1. Given the list fruit_list, use IDLE's editor to write a script that iterates through the list and prints each item on a separate line and save it as fruit.py: fruit_list=["apple", "banana", "cherry", "gooseberry", "kumquat", "orange", "pineapple"] 2. Starting with the defined fruit_list in the following code block, use IDLE's editor to write a program named updateFruit.py and update the script to perform the following tasks: • If the fruit is not in fruit_list, display an appropriate message to the user and prompt them to try again. • The script should repeat itself until the user enters a stop word at the prompt. fruit_list = ["apple", "banana", "cherry", "gooseberry", "kumquat", "orange", "pineapple"] 3. Using IDLE's editor, write a Python program named separate.py that asks the user for a string and displays the characters of the string to the user, with each character on a new line. For example, if the input is Hello, the output should be: H • Prompt the user to enter the name of a fruit. • If the fruit is in fruit_list, display an appropriate message to tell the user its index value in the list. 0110