University at Albany SUNY Write a Program Computer Programming Task

User Generated

FnhprTbq23

Programming

University at Albany SUNY

Description

2.3 Write a program to prompt the user for hours and rate per hour using input to compute gross pay. Use 35 hours and a rate of 2.75 per hour to test the program (the pay should be 96.25). You should use input to read a string and float() to convert the string to a number. Do not worry about error checking or bad user data

.# This first line is provided for you

hrs = input("2.75+35:)

Desired out put

Pay: 96.25

Unformatted Attachment Preview

Fall 2021 INF 108 Programming for Problem-Solving Module5 Assignment: Loops and Iterations Instructions: Please do not change the numbering of the questions. Using the tools and resources learned so far in this course and this module, write Python programming codes to solve the problems below. You must use either for, while or nested loops in each of your programs to get full points. Make sure your program runs before submitting! It is OK to submit incomplete programs/work to receive partial score. You are expected to use comments in your programs to let us know that you are aware of any problems. Submit your Python codes as .py files! Problems: 1. (40 points) Write a Python code that prompts a user to enter scores for 5 students between 0.0 and 1.0. If any score is out of range, display an error message and prompt for valid entry. If all scores are between 0.0 and 1.0, calculate the average score, and use appropriate descriptive statements to display the five students’ scores, average score and the average letter grade using the following table: Score Grade >= 0.9 A >= 0.8 B >= 0.7 C >= 0.6 D < 0.6 E Submit a Spyder fullscreenshot showing your code and the output. Submit the source code file as well. Name the file “YOURLASTNAME_ WA5.1.py”. 2. (20 points) Provide the exact sequence of integers specified by each of the following range expressions. (a) range(5) (b) range(5, 10) (c) range(5, 20, 4) (d) range(7, -1, -1) 3. (40 points) Write a program that uses a nested loop to print a pattern like a right-angle triangle with asterisks (*) increasingly printed on each row. The pattern should look like this: * ** *** **** ***** ****** ******* Submit a Spyder fullscreenshot showing your code and the output. Submit the source code file as well. Name the file “YOURLASTNAME_ WA5.2.py”. Submit your work as ONE MS Word doc (containing text and screenshots) and TWO Python files on Blackboard. Fall 2021 INF 108 Programming for Problem-Solving Module5 Assignment: Loops and Iterations Instructions: Please do not change the numbering of the questions. Using the tools and resources learned so far in this course and this module, write Python programming codes to solve the problems below. You must use either for, while or nested loops in each of your programs to get full points. Make sure your program runs before submitting! It is OK to submit incomplete programs/work to receive partial score. You are expected to use comments in your programs to let us know that you are aware of any problems. Submit your Python codes as .py files! Problems: 1. (40 points) Write a Python code that prompts a user to enter scores for 5 students between 0.0 and 1.0. If any score is out of range, display an error message and prompt for valid entry. If all scores are between 0.0 and 1.0, calculate the average score, and use appropriate descriptive statements to display the five students’ scores, average score and the average letter grade using the following table: Score Grade >= 0.9 A >= 0.8 B >= 0.7 C >= 0.6 D < 0.6 E Submit a Spyder fullscreenshot showing your code and the output. Submit the source code file as well. Name the file “YOURLASTNAME_ WA5.1.py”. 2. (20 points) Provide the exact sequence of integers specified by each of the following range expressions. (a) range(5) (b) range(5, 10) (c) range(5, 20, 4) (d) range(7, -1, -1) 3. (40 points) Write a program that uses a nested loop to print a pattern like a right-angle triangle with asterisks (*) increasingly printed on each row. The pattern should look like this: * ** *** **** ***** ****** ******* Submit a Spyder fullscreenshot showing your code and the output. Submit the source code file as well. Name the file “YOURLASTNAME_ WA5.2.py”. Submit your work as ONE MS Word doc (containing text and screenshots) and TWO Python files on Blackboard.
Purchase answer to see full attachment
User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.

Explanation & Answer

View attached ex...


Anonymous
I use Studypool every time I need help studying, and it never disappoints.

Studypool
4.7
Indeed
4.5
Sitejabber
4.4

Similar Content

Related Tags