Question

Using Python coding language: Propose a situation that requires selection in order to solve, such as:...

Using Python coding language:

Propose a situation that requires selection in order to solve, such as:

  1. Print whether a number is between 10 and 50
  2. Print whether a number is a multiple of 17 or not
  3. Print the letter grade a student gets based on the total score (0-100)

Homework Answers

Answer #1
n = int(input("Enter total score: "))
if(n>=10 and n<=50):
    print(n,"is between 10 and 50")
else:
    print(n, "is NOT between 10 and 50")
if(n%17==0):
    print(n,"is a multiple of 17")
else:
    print(n, "is NOT a multiple of 17")
if(n>=0 and n<=100):
    letter = 'A'
    if n < 60:
        letter = 'F'
    elif n < 70:
        letter = 'D'
    elif n < 80:
        letter = 'C'
    elif n < 90:
        letter = 'B'
    print("Letter grade =",letter)
else:
    print("Invalid total score")

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
Using python, write the program below. Program Specifications: You are to write the source code and...
Using python, write the program below. Program Specifications: You are to write the source code and design tool for the following specification: A student enters an assignment score (as a floating-point value). The assignment score must be between 0 and 100. The program will enforce the domain of an assignment score. Once the score has been validated, the program will display the score followed by the appropriate letter grade (assume a 10-point grading scale). The score will be displayed as...
Need someone to fix my code: #include<iostream> using namespace std; struct student { double firstQuizz; double...
Need someone to fix my code: #include<iostream> using namespace std; struct student { double firstQuizz; double secondQuizz; double midTerm; double finalTerm; string name; }; int main() { int n; cout<<"enter the number of students"<<endl; cin>>n; struct student students[n]; int i; struct student istudent; for(i=0;i<n;i++) {    cout<<"Student name?"; cin >> istudent.name; cout<<"enter marks in first quizz , second quizz , mid term , final term of student "<<i+1<<endl; cin>>students[i].firstQuizz>>students[i].secondQuizz>>students[i].midTerm>>students[i].finalTerm; } for(i=0;i<n;i++) { double marks=0; double score=students[i].firstQuizz+students[i].secondQuizz+students[i].midTerm+students[i].finalTerm; marks=(students[i].firstQuizz*0.25)+(students[i].secondQuizz*0.25)+(students[i].midTerm*0.25)+(students[i].finalTerm*0.50); double totalArrgegateMarks =...
Please do it in Python Write the simplest program that will demonstrate iteration vs recursion using...
Please do it in Python Write the simplest program that will demonstrate iteration vs recursion using the following guidelines - Write two primary helper functions - one iterative (IsArrayPrimeIter) and one recursive (IsArrayPrimeRecur) - each of which Take the array and its size as input params and return a bool. Print out a message "Entering <function_name>" as the first statement of each function. Perform the code to test whether every element of the array is a Prime number. Print out...
Coding in Python Add radio button options for filing status to the tax calculator program of...
Coding in Python Add radio button options for filing status to the tax calculator program of Project 1. The user selects one of these options to determine the tax rate. The Single option’s rate is 20%. The Married option is 15%. The Divorced option is 10%. The default option is Single. Be sure to use the field names provided in the comments in your starter code. ================== Project 1 code: # Initialize the constants TAX_RATE = 0.20 STANDARD_DEDUCTION = 10000.0...
Use Python to Complete the following on a single text file and submit your code and...
Use Python to Complete the following on a single text file and submit your code and your output as separate documents. For each problem create the necessary list objects and write code to perform the following examples: Sum all the items in a list. Multiply all the items in a list. Get the largest number from a list. Get the smallest number from a list. Remove duplicates from a list. Check a list is empty or not. Clone or copy...
Question 4 Write an issue register for the university admission process and the issue described in...
Question 4 Write an issue register for the university admission process and the issue described in Question 2 (i.e. is that students have to wait too long to know the outcome of their application, especially for successful outcomes). Question 2 Consider the university admission process described in Question 1. One of the issues faced by the university is that students have to wait too long to know the outcome of the application (especially for successful outcomes). It often happens that...
1.Establishing the virtual Management: As known, managing virtual staff requires a different method or approach than...
1.Establishing the virtual Management: As known, managing virtual staff requires a different method or approach than managing local staff. Due to that reason, Golden Scent has developed a strategic plan to successfully manage its virtual staff in the USA. Identify the suitable manager. to make sure our work will proceed as we planned, Golden Scent willrecruit a virtual manager with the essential skills and knowledge required to manage virtual employees. Find the skilled people to work with. Since not everyone...
Juanita is deciding whether to buy a skirt that she wants, as well as where to...
Juanita is deciding whether to buy a skirt that she wants, as well as where to buy it. Three stores carry the same skirt, but it is more convenient for Juanita to get to some stores than others. For example, she can go to her local store, located 15 minutes away from where she works, and pay a marked-up price of $129 for the skirt: Store Travel Time Each Way Price of a Skirt (Minutes) (Dollars per skirt) Local Department...
for the scenario below: 1) Apply the qualitative analysis by identifying at least 3 issues in...
for the scenario below: 1) Apply the qualitative analysis by identifying at least 3 issues in the above process. Analyse these issues by using a. Adding-value and Waste Analysis b. Issue register, If you find that there are more than three issues, you can focus on the three issues that have the highest impact. 2). Calculate the cycle time efficiency of the as-is process. You can assume a working week of 40 hours. In case there is missing information, you...
Review the Robatelli's Pizzeria Case Study. Develop another internal controls system, but this time, in the...
Review the Robatelli's Pizzeria Case Study. Develop another internal controls system, but this time, in the purchases and fixed assets business areas. Prepare a 12- to 16-slide presentation describing the purchases and fixed assets business areas. Be sure to incorporate speaker notes as well as appropriate visuals, graphics, fonts, etc. Include any associated risk in these areas. Describe specific internal controls that include authorization of transactions, segregation of duties, adequate records and documentation, security of assets, and independent checks and...