Write a program that displays the total income for 3 weeks of pay. Have the user input each week’s salary. Display the total income. IN PYTHON please explain each step with comments
Algorithm
PseudoCode
Sourcecode
Dear Student ,
As per the requirement submitted above , kindly find the below solution.
Here a new python program with name "Main.py" is created, which contains following code.
Main.py :
#Python program to display the total income for 3 weeks of
pay
#declaring variable to store week number
weekno=1
#declaring variable to store total pay
totalPay=0
for i in range(3):
#asking user to enter pay
pay=int(input("Enter "+str(weekno)+" week’s salary : "))
#adding salary in totalPay
totalPay=totalPay+pay
#increment weekno
weekno=weekno+1
#display total income for 3 weeks
print("Total Income for 3 weeks : ",totalPay)
Screen for Indentation :
======================================================
Output : Compile and Run above program to get the screen as shown below
Screen 1 :Screen asking each weeks salary
Screen 2 :Screen showing total pay for three weeks
NOTE : PLEASE FEEL FREE TO PROVIDE FEEDBACK ABOUT THE SOLUTION.
Write a program that displays the total income for 3 weeks of pay. Have the user...
Write a Python program that reads from the user 4 item prices then displays the total and average price. The program should also display the taxes ( using the TAX_RATE=8.75) and the total after tax.
Total Sales Design a program that asks the user to enter a store’s sales for each day of the week. The amounts should be stored in an array. Use a loop to calculate the total sales for the week and display the result. Need: variable lists, IPO Chart, pseudocode, Flowchart, and working Python code. 2. Lottery Number Generator Design a program that generates a 7-digit lottery number. The program should have an Integer array with 7 elements. Write a loop...
(PYTHON) Write a program that displays the following menu:. , Write Algorithm for Code Geometry Calculator 1. Calculate the Area of a Circle 2. Calculate the Area of a Rectangle 3. Calculate the Area of a Triangle 4. Quit Enter your choice (1 - 4): If the user enters 1, the program should ask for the radius of the circle and then display its area. If the user enters 2, the program should ask for the length and width of...
Design the logic for a program that allows a user to enter 10 numbers, then displays all of the numbers, the sum and average of the numbers. (Use array and loop.) the pseudocode in python please
Python: Write a program that lets the user enter a string and displays the letter that appears most frequently in the string, ignore spaces, punctuation, and Upper vs Lower case. Create a list to hold letters based on the length of the user input Convert all letters to the same case Use a loop to check for each letter in the alphabet Have a variable to hold the largest number of times a letter appears, and replace the value when...
write a python program that allows the user to enter two integer values, and displays the results when each of the following arithmetic operators are applied
PYTHON: write a program that lets the user enter a sting and displays te character that appears most frequently in the string. A space can be the most frequent in the string, but do not include it for the count. (Please make it as simple as possible, I just started learning python)
Write the PYTHON code that displays the following numbers: The program should have a header that displays "Number Doubled Tripled" above the start of the numbers. If putting all numbers on the same line, then they will need to be separated so you can see he individual number.(https://www.programiz.com/python-programming/methods/built-in/print) The program should display Every whole number from 1 through 35. The program should display that number doubled. The program should also display that number tripled. Make a working version of this...
In Java - Write a program that prompts the user to enter two integers and displays their sum. If the input is incorrect, prompt the user again. This means that you will have a try-catch inside a loop.
Part I Short Answer (50 points) 1. Write a pseudocode declaration for a String array initialized with the following strings: “Einstein”, “Newton”, “Copernicus”, and “Kepler”. 2. Assume names in an Integer array with 20 elements. Write a pseudocode algorithm a For Loop that displays each element of the array. 3. Assume the arrays numberArray1 and numberArray2 each have 100 elements. Write a pseudocode algorithm that copies the values in numberArray1 to numberArray2 . 4. Write a pseudocode algorithm for a...