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

6. Integer Pairing

by CodeChum Admin

Now this one's a tad bit tricky, but you can definitely do it!


Instructions:

  1. Input five integers in one line, with each integer separated by a space.
  2. Add the 1st and 2nd integers together, store the sum inside a variable.
  3. Add the 3rd and 4th integers together, store the sum inside a variable.
  4. Multiply the two sums with each other and raise the product to the power of the 5th integer
  5. Print out the result.

Instructions

  1. Input five integers in one line, with each integer separated by a space.
  2. Add the 1st and 2nd integers together, store the sum inside a variable.
  3. Add the 3rd and 4th integers together, store the sum inside a variable.
  4. Multiply the two sums with each other and raise the product to the power of the 5th integer
  5. Print out the result.

Input

A line containing five integers separated by a space.


1·2·3·4·5

Output

A line containing an integer.


4084101

Write a program that asks the user for an integer greater than 0 and then use a for-loop to


calculate the factorial of that positive integer.


Modify your program so that the output looks like the following:


Example: 5! = 5 x 4 x 3 x 2 x 1 = 120


Create a for-loop that loops from 0 up to and including 20. On each iteration, output a '*' (an asterisk) if the value of the counter variable is divisible by 2, a '@' if divisible by 3, and a '$' if divisible by 4. In all other cases, output a '!'. Each symbol should be printed on a different line.


Write a program that asks the user for an integer greater than 0 and then use a for-loop to


calculate the factorial of that positive integer.


Modify your program so that the output looks like the following:


Example: 5! = 5 x 4 x 3 x 2 x 1 = 120


Create a for-loop that loops from 0 up to and including 20. On each iteration, output a '*' (an asterisk) if the value of the counter variable is divisible by 2, a '@' if divisible by 3, and a '$' if divisible by 4. In all other cases, output a '!'. Each symbol should be printed on a different line.


Create a library management system with full source code.

The work formula measures the multiplication of magnitude of displacement (d), the component of the

orce (F), and the angle (8) between d and F. It can be obtained from the following expression:

                   W = F x d x cos(0).

  Write a program which prompts the user to enter d, F, and 0. Then, calculates W and displays

  the computed value for W on the screen. (Notice: You should include all steps and respect the

  Python syntax in order to obtain full mark).

  • Which Python built-in functions did you use to write this program?

  • Which modules in Python did you import? Which functions from the imported modules are

  applied in your program?


implement a simple symbolic equation solver. The equation must be stored in a binary tree.Each operand or operator should be stored as a tuple of the form (TYPE, VALUE).Complete the bodies of the insert, and evaluate methods. Include your solution in the sections mentioned as "Include your code here". Please do NOT change any of the code outside of these two methods.


class Node:


  def __init__(self, data):

    self.left = None

    self.right = None

    self.data = data


  def get_output(self)

    value = self.evaluate()

    if value > 999:

      print('OVERFLOW')

    elif value < 0:

      print('UNDERFLOW')

    else:

      print(value)

  # Your task is to implement the following methods. #

  def insert(self, data, bracketed):

   #Include your code here

    return self


  def evaluate(self):

    #Include your code here

    pass



Implementation of Hash Table with collision resolution techniques

in python with algorithm


Create a simple library management system following the set of requirements:


  1. Any library member should be able to search books by their title, author, subject category as well by the publication date.
  2. Each book will have a unique identification number and other details including a rack number which will help to physically locate the book.
  3. There could be more than one copy of a book, and library members should be able to check-out and reserve any copy. We will call each copy of a book, a book item.
  4. The system should be able to retrieve information like who took a particular book or what are the books checked-out by a specific library member.
  5. There should be a maximum limit (5) on how many books a member can check-out.
  6. There should be a maximum limit (10) on how many days a member can keep a book.
  7. The system should be able to collect fines for books returned after the due date.
  8. Members should be able to reserve books that are not currently available.
LATEST TUTORIALS
APPROVED BY CLIENTS