Questions: 5 831

Answers by our Experts: 5 728

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search & Filtering

Define the following functions,

f(x) = 1 / 1 + x2

and g(x) = x − x2

Produce plots of the graphs of each of f ◦ g and g ◦ f. You should choose settings (eg domain, number of samples) to make a smooth plot which displays the key features - try experimenting with different settings to work out what looks good.


Temperature Conversion
You are given the temperature T of an object in one of Celsius, Fahrenheit, and Kelvin scales.
Write a program to print T in all scales viz Celsius, Fahrenheit, and Kelvin.
Formula to convert from Fahrenheit F to Celsius C is C = (F - 32) * 5 / 9.
Formula to convert from Kelvin K to Celsius C is C = K - 273.
Here "C", "F", "K" represent that the temperature scale is in Celsius, Fahrenheit and Kelvin scales respectively.
The input contains the temperature (a number) and the unit of the temperature scale (C, F, K) without any space.
The output contains temperature in Celsius, Fahrenheit and Kelvin scales in each line in the format similar to input and the value of the temperature is rounded to 2 decimal places.

Write a program to print a rectangle pattern of M rows and N columns using the characters as shown below.


+----------+

|     |

|     |

|     |

+----------+


Write a python program which takes a number from the user and prints if it is positive, negative or 0, odd or even and if it is a multiple of 10.

  • Hint: Odd numbers cannot be a multiple of 10

Example 1:

Sample Input:

-70

Sample Output:

Negative even number which is a multiple of 10

Example 2:

Sample Input:


Sample Output:

Input is 0

Example 3:

Sample Input:

11

Sample Output:

Positive odd number which is not a multiple of 10


Write a python program that takes the weight of luggage from the user and prints the total amount the user needs to pay according to the given conditions:

  • The user has to pay Tk.200 if the weight is 10kg or less.
  • The user has to pay Tk.200 and an additional Tk.50 for every 1kg over 10kg.
  • Service charges is 5% of the total weight.
  • Maximum weight of luggage is 30kg.

Sample Input - Sample Output

Luggage Weight: 5 Payment: Tk. 200.25

Luggage Weight: 20 Payment: Tk. 701.0

Luggage Weight: 32 Weight crosses maximum limit


Write a Python code of a program that reads a candidate’s ielts score and prints out the corresponding CEFR level for that band score. The score ranges and corresponding CEFR level are shown in the table below.

(Hint: This problem can be solved in two ways: top-down and bottom-up.)


IELTS Score -CEFR Level

8.5-9 C2

7-8 C1

5.5-6.5 B2

4.5-5 B1

4 A2

0- below 4 A1

  • Note: If the user gives a score that is above 9 or below 0, you should print “Invalid score”.

Example 1:

Sample Input:

IELTS Score: 6

Sample Output:

CEFR Level: B2





Create a program in Python to calculate grade point averages for college students. Grade point averages are calculated by dividing total number of quality points by the total number of earned credit hours. Quality points are grades earned multiplied by the credit hours of a course.  A grade of A is worth 4 points, B is 3 points, C is 2 points, D is 1 point and an F is 0 points. 

Your program should prompt the student to enter their name, total credit hours earned, and total quality points earned.  Calculate the grade point average and display back the student’s name along with their gpa for my example of John Doe. 

Hi John Doe.  Your grade point average is 3.30.   


For this problem, the prefilled code will contain a list of tuples. Write a program to replace the last number of each tuple in the list with the given number (N).

Consider the following Python function.

def mystery(l):
    if l == []:
        return(l)
    else:
        return(mystery(l[1:])+l[:1])

What does mystery([22,34,18,57,92,45]) return?




Diamond Crystal


Given an integer value N, write a program to print a diamond pattern of 2*N rows as shown below.


Input


The first line of input is an integer N.


Explanation


In the given example, the number of rows in the diamond is 2*5 = 10.

So, the output should be


    /\
   /  \
  /    \
 /      \
/        \
\        /
 \      /
  \    /
   \  / 
    \/

Sample Input 1


5


Sample Output 1


    /\
   /  \
  /    \
 /      \
/        \
\        /
 \      /
  \    /
   \  /
    \/

Sample Input 2


3


Sample Output 2


  /\
 /  \
/    \
\    /
 \  /
  \/

Refer to the document in the link below 


https://docs.google.com/document/d/1RBknUJ-BqOf7C-5nMxEFs4JxAUQo4_KSt07SSkS3Jak/edit?usp=sharing


LATEST TUTORIALS
APPROVED BY CLIENTS