Write a function named mybstmirror() that takes a reference to the root node of a binary tree and creates
a new tree (with its own nodes) that is the mirror image of the original tree. For example: if root is a reference to the root of the tree on the left below, then the return value of mybstmirror(root) would
be a reference to the root of the tree on the right below.
Node mybstmirror(Node root)
Write a program that uses loops to print out a design of following using asterisks:
* * * * *
* *
* * * * *
* * * * *
* *
* * * * *
* * * * *
* * * * *
* * * * *
* * * * *
The program should only use the following print statements:
print(“* * * * *”)
print(“* *”)
print(“\n”)
Write a program that prints the value of 120.456789 rounded to the nearest digit, tenth, hundredth, thousandth, and ten-thousandth. [Hint: This should make use of formatted output.]
Given the slope-intercept form equation, y = mx+b. Write a program that asks the user to enter values for the respective variables (m, x, and b). Use those variables to calculate the results of the equation. Then print out the values for m, x, b, and y.
Suppose that (QWERTY) is inserted into an empty bst.
Task:
Draw the diagram of bst after each insert
No need to write the code
Convert the Number
Given a number having ten digits, convert it to a string following the below-mentioned rules.
Rules for conversion:
1.separate the number into a set of four-three-three digits
2.Use the following prefixes for successive digits
a.Single numbers: just read them separately
b.Two consecutive numbers: double
c.Three consecutive numbers: triple
d.Four consecutive numbers: quadruple
Input
The first line of input is a string of ten digits.
Sample Input1
9887666668
Sample Output1
nine double eight seven triple six double six eight
Sample Input2
9090407368
Sample Output2
nine zero nine zero four zero seven three six eight
Write a program that reads an integer and determines and prints whether it is odd or even. [Hint: Use the remainder operator. An even number is a multiple of two. Any multiple of two leaves a remainder of zero when divided by 2.].
can you do this program without using classes
u can use functions instead of classes
Registration System
1. Press 1 to login
2. Press 2 to register students
3. Press 3 to see the list of fee defaulters
4. Press 4 to see the CGPA of student
5. Press 5 to see the pre requisite of a course.
6. Press 6 to exit the system
Registration Window
Enter student ID
The student should not be a fee defaulter if yes then do not register student
The pre requisite of course should be passed. if fail do not register for the course
If the students CGPA is a above 3.0 register all courses.
If the CGPA is above 2.0 register 3 courses.
If CGPA less than 2.0 then register 2 courses with a warning.
Student information Window
The data should be saved in a file.
The student record may be deleted.
The student record may be searched based on the ID provided.
The student record may be updated in case if its phone no or house address changes.
https://revel-ise.pearson.com/courses/6123e8c3e405345b4db8cc88/pages/a01d5f11c73c1edccab32f3f774833239daa8769e Page 11 of 15
Programming Exercises from the Book: Chapter 5 8/23/21, 3:12 PM
Note that this is a graduated rate. The rate for the first $5,000 is at 8%, the next $5,000 is at 10%, and the rest is at 12%. If the sales amount is 25,000, the commission is 5,000 * 8% + 5,000 * 10% + 15,000 * 12% = 2,700. Your goal is to earn $30,000 a year. Write a program that finds the minimum sales you have to generate in order to make $30,000.
Write algorithm using pseudocode and flowchart that uses while loops to perform the
following steps:
i. Prompt the user to input two integers: firstNum and secondNum note that firstNum
must be less than secondNum.
ii. Output all odd numbers between firstNum and secondNum.
iii. Output the sum of all even numbers between firstNum and secondNum.
iv. Output the numbers and their squares between firstNum and secondNum.
v. Output the sum of the square of the odd numbers between firstNum and secondNum.
b. Redo Exercise (a) using for loops.
c. Redo Exercise (a) using do. . .while loops.