Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

PYTHON CODE Insert the Program Comments. Insert line comments for each line of code explaining what that line of code is doing. Instructions: Write the

PYTHON CODE

Insert the Program Comments.

Insert line comments for each line of code explaining what that line of code is doing.

Instructions: Write the code, comments and thoroughly test the FishStore Program:

Define the function: fishStore()

The function should take 2 string parameters: myfish and myprice

fishStore() returns a string in sentence format (you choose how to format it)

Get User Input for fishEntry and priceEntry to use as arguments in calling the function: fishStore()

You may need another variable within your function that you will return to the function call.

Print the return value of the function: fishStore().

Example output:

Fish type is Guppy and costs $1.00.

My favorite fish is flounder and it costs $2.00.

Thoroughly test your code, check comments and then submit according to teacher instructions. You should be able to write no more than 6 or 7 lines of code.

Simple Addition

1. Write your program comments.

2. Write a function that returns a value based on simple addition. The function should receive 2 arguments (based on the user input).

3. Get user input for 2 numbers (create a variable for each) and pass those variables to your function.

4. Your function should add the 2 numbers together and return the value.

5. Display the value in sentence form. Sample output: The answer is: 8 + 8 = 16. You should be able to write no more than 6 or 7 lines of code

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Learning PostgreSQL

Authors: Salahaldin Juba, Achim Vannahme, Andrey Volkov

1st Edition

178398919X, 9781783989195

More Books

Students also viewed these Databases questions