This problem is related to the virtual learning environment application discussed in one theory session and a few practicals. In this problem, you are tasked with creating and updating learner profiles, a particular type of user. As well, given a learner profile, we would like to retrieve the learning materials in the form of topics. Note that the learning materials for a given course will differ from one learner profile to another. For example, for a course "Distributed Systems and Applications", the learning materials for a learner with a weak background in "Programming" compared o another learner profile with a stronger background in programming.
Your task is to:
1. Provide a description in OpenAPI of the API that allows for communication between a client and a service for the functionalities discussed above;
2. Implement a corresponding client and a service.
Given an integer between 0 and 10000, write a program to print the sum of its digits.Input
The first line of input will contain an integer.Output
The first line of output should be the sum of the digits.Explanation
For example, if the given number is 25, your code should print the sum of the digits (2 + 5), which is 7.
Similarly, if the given number is 692, your code should print the sum of the digits (6 + 9 + 2), which is 17.
Similarly, if the given number is 9999, your code should print the sum of the digits (9 + 9 + 9 + 9), which is 36.
Sample Input 1
25
Sample Output 1
7
Sample Input 2
692
Sample Output 2
17
Sample Input 3
9999
Sample Output 3
36
Python 3.9
RESET
Write a program for Horizon Phones, a provider of cellular phone service. Prompt a user for maximum monthly values for talk minutes used, text messages sent, and gigabytes of data used, and then recommend the best plan for the customer's needs. A customer who needs fewer than 500 minutes of talk and no text or data should accept Plan A at $49 per month. A customer who needs fewer than 500 minutes of talk and any text messages should accept Plan B at $55 per month. A customer who needs 500 or more minutes of talk and no data should accept either Plan C for up to 100 text messages at $61 per month or Plan D for 100 text messages or more at $70 per month. A customer who needs any data should accept Plan E for up to 2 gigabytes at $79 or Plan F for 2 gigabytes or more at $87.
# Create displayList
displayList = []
# Loop through the prices in levelsList.
# During each loop:
# - Create a variable called priceLevelLabel consisting of the text 'Price Level: '
followed by the price.
# - Add priceLevelLabel and the price as two separate items to a new list (the sub-List).
# - Append the sub-List to displayList. for price in self.levelsList:
. . .
# Create a variable called previousPriceLabel consisting of the text 'Previous Price: ' followed
# by previousPrice. # Add previousPriceLabel and previousPrice as two separate items to a new list (the sub-List). # Append the sub-List to displayList.
. . .
# replace ellipsis with applicable cod
Add two polynomials
Given two polynomials A and B, write a program that adds the given two polynomials A and B.
Input
The first line contains a single integer M.
Next M lines contain two integers Pi, Ci separated with space, where Pi denotes power and Ci denotes co-efficient of Pi for polynomial A After that next line contains a single integer N. Next N lines contain two integers Pj, Cj separated with space, where Pj denotes power and Cj denotes co-efficient of Pj for polynomial B.
I am not getting proper output