Questions: 5 831

Answers by our Experts: 5 728

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search & Filtering

Write a python program that reads a sentence


Programming

Write a program that calculates and prints

the take-home pay for a commissioned sales

employee. Allow the user to enter values for the

name of the employee and the sales amount

for the week. Employees receive 7% of the

total sales. Federal tax rate is 18%. Retirement

contribution is 15%. Social Security tax rate is 9%.

Use appropriate constants. Write input, display,

and calculation methods. Your final output should

display all calculated values, including the total

deductions and all defined constants.



Write a program to computer the are of a circle,(A=ñr2,ñ=3.14

Write a program that determine the magic word (if the input number is 143,it displays I LOVE YOU else I HATE YOU).



Write a function in this file called nine_lines that uses the function three_lines (provided below) to print a total of nine lines.



The function three_lines and new_line are defined below so that you can see nested function calls. Also, to make counting “blank” lines visually easier, the print command inside new_line will print a dot at the beginning of the line:








def new_line():








print('.')








def three_lines():








new_line()








new_line()








new_line()



You must execute your script and paste the output produced into a document that you will submit along with your Python script.



It is very helpful if you print a placeholder between the printing of 9 lines and the printing of 25 lines. It will make your output easier to read for your peer assessors. A placeholder can be output such as “Printing nine lines” or “Calling clearScreen(







Ask the user for a random number and assign the value to a variable named starting. Then using a for loop and write a program that asks the user for input of 5 numbers. Each of these numbers must be added to the initial value of the variable starting. The output must be the initial and final value of the variable starting. Please name the program and provide at least one code comment.


What is the datatype of the length, width, area and perimeter above?

Hint: Use Python's type(var_1) to find out.

Divide any of the variables above by any number (except 0 !), assign it to variable. What is the datatype of the resulting variable?

What did you find out? 


The length of rectangle is given as 10, its width is given as 20. Calculate its area and perimeter.

Hint

  1. Assign variables to the length and width of the rectangle
  2. Assign another variable to the calculated area and perimeter
  3. Include your answer in a sentence using Python's f-string literal or Python's .format().

So your output should look like this: "The rectangle whose length is 10 and width 20 has the area 200 and perimeter 60."

Print a sentence joining the fruit and ripeness variable. Print any sentence that uses this variables (fruit and ripeness)

For example: "That lemon is rotten" or The avocado is ready to eat

Implement this exercise using the .format() method


Print a sentence joining the fruit and ripeness variable. Print any sentence that uses this variables (fruit and ripeness)

For example: "That lemon is rotten" and I can not eat it

Implement this exercise using the Python's F-string literal

LATEST TUTORIALS
APPROVED BY CLIENTS