by CodeChum Admin
Now this one's a tad bit tricky, but you can definitely do it!
Instructions:
Instructions
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
in python with algorithm
Create a simple library management system following the set of requirements: