Using an algorithmic design strategy discussed in this lesson, complete the following:…
- User
Using an algorithmic design strategy discussed in this lesson, complete the following: Read through the scenarios Create a plan for designing the algorithm Use VS Code to code your algorithms.
- You are working on a program to process student grades. Create a function called "calculate_grade" that takes a list of test scores as a parameter and returns the average grade. Additionally, create a function called "assign_letter_grade" that takes the average grade as a parameter and returns the corresponding letter grade (e.g., "A" for average grade 90-100, "B" for average grade 80-89, etc.). Write a program that prompts the user to enter a list of test scores, calls the "calculate_grade" function to calculate the average grade, and then calls the "assign_letter_grade" function to display the corresponding letter grade.
- You are building a program to convert temperatures between Celsius and Fahrenheit. Create two functions: "celsius_to_fahrenheit" and "fahrenheit_to_celsius" that each take a temperature value as a parameter and return the converted temperature. Write a program that prompts the user to enter a temperature and a conversion type (Celsius to Fahrenheit or Fahrenheit to Celsius) and then calls the appropriate function to perform the conversion.
- You are working on a program to analyze student attendance data. Create a function called "calculate_attendance_rate" that takes parameters for the total number of classes and the number of classes attended by a student. The function should return the attendance rate as a percentage. Additionally, create a function called "check_attendance_status" that takes the attendance rate as a parameter and returns "Good" if the attendance rate is 80% or above, or "Poor" if it is below 80%. Write a program that prompts the user to enter the total number of classes and the number of classes attended by a student, calls the "calculate_attendance_rate" function to calculate the attendance rate, and then calls the "check_attendance_status" function to display the attendance status.
- You are tasked with creating a program to calculate the total cost of items in a shopping cart. Create a function called "calculate_total_cost" that takes a list of item prices as a parameter and returns the total cost. Additionally, create a function called "apply_discount" that takes the total cost and a discount percentage as parameters and returns the discounted total cost. Write a program that allows the user to input item prices, calls the "calculate_total_cost" function to calculate the total cost, and then calls the "apply_discount" function to display the discounted total cost.
- Assistant
- User
make this py code and in a sign
- Assistant