Q.1 Write a python program that will take in basic information from a student, including student name, degree name, number of credits taken so far, and the total number of credits required in the degree program. The program will then calculate how many credits are needed to graduate. Display should include the student name, the degree name, and credits left to graduate.
Write two print statements in this program. In the first one, use the .format method with pre-specified order of the displayed outputs.
In the second print, using different % operators to display the output. Make sure to display the output in an aligned format (look into a sample of the output below..).
Student name: xyz xyz
Degree name: comp. engineering
Credit taken so far: 13
Total number of credits required: 33
Number of credits needed to graduate: 20
Q.2 Write a python program that will take in the number of call minutes used. Your program will calculate the amount of charge for the first 200 minutes with a rate of $0.25; the remaining minutes with a rate of $0.35. The tax amount is calculated as 13% on top of the total. The customer could have a credit that also has to be considered in the calculation process. Finally, the program displays all these information. Below is a sample run:
Customer account number: 12345
Minutes used: (you provide)
Charge for the first 200 minutes@ 0.25: (you provide)
Charge for the remaining minutes@ 0.35: (you provide)
Taxes: (you provide)
Credits: (you provide)
Total bill: (you provide)
please provide .py program file screenshot and output.
In: Computer Science
Write a program driver that demonstrates that
your additions work. Use the following sets as part of your
demonstration
A {1,3,8}
B {2,3,5,10}
C {4,6}
show
A && B
A - B
A || B
A / B
A && C
A - C
A || C
A / C
In: Computer Science
Write a method that will have a C++ string passed to it. The string will be an email address and the method will return a bool to indicate that the email address is valid.
Email Validation Rules: ( These rules are not official.)
1) No whitespace allowed
2) 1 and only 1 @ symbol
3) 1 and only 1 period allowed after the @ symbol. Periods can exist before the @ sign.
4) 3 and only 3 characters after the period is required.
*****************************
Program will prompt for an email address and report if it is valid or not according to the rules posted above. The program will loop and prompt me to continue.
*****************************
In: Computer Science
There is a single-plank bridge. Only one person can cross the
bridge without any stop. The pedestrian can cross the bridge from
west to east or from east to west. If there is more than 0
pedestrian crossing the bridge from west to east, no pedestrian can
try to cross the bridge from east to west, but more than 1
pedestrian can cross the bridge from west to east, and vice versa.
The pedestrian can cross the bridge immediately if there is no
pedestrian on the bridge. Use Semaphore to solve this
problem.
In: Computer Science
A priority queue can be implemented as a heap because
a. The root can be easily be identified as the topmost priority.
b. The heap is not always sorted so any value can be the top priority.
c. The heap always has a left bottom node that can be the top priority.
d. None of the above.
In: Computer Science
Use JAVAfor this program
Program Description
You work in a local gift shop that is currently running a large sale. You have been asked to create a program to calculate the total of a user’s purchases and determine if they qualify for a discount. Use the following steps to create the program:
Subtotal = Price * Quantity
Subtotal |
Discount |
Under $25 |
5% discount |
$25 but not more than $75. |
10% discount |
Over $75 |
15% discount |
Discount Amount = Subtotal * (Discount/100)
Discounted Cost = Subtotal - Discount Amount
Sample Input and Output (formatting, spacing, and indentation should be as shown below)
What is the price of the item you wish to purchase?
17.99
What is the quantity you wish to purchase? 3
What is the name of the item? T-Shirt
Discount Calculation Utility
Item
Name:
T-Shirt
Price: $17.99
Quantity:
3
Subtotal: $53.97
Discount: $5.40
Discounted Cost: $48.57
In: Computer Science
In: Computer Science
Python code def plot_dataset(file_path): """ Read in a text file where the path and filename is given by the input parameter file_path There are 4 columns in the text dataset that are separated by colons ":". c1:c2:c3:c4 Plot 3 datasets. (x axis vs y axis) c1 vs c2 (Legend label "n=1") c1 vs c3 (Legend label "n=1") c1 vs c4 (Legend label "n=1") Make sure you have proper x and y labels and a title. The x label should be "x", y should be "Fourier Sum" And the title be Fourier Series. Remember, you should have your first.last.yy in parentheses in the title. For full credit you must also include a legend with the dataset labels as shown above. Upload the resulting plot (.png) to scholar for credit. No unit tests here. :param file_path: :return: """
I am kinda confused on this one. the only txt file i think i need to use is called fourier_series.txt but I may not need it at all.
In: Computer Science
Research list optimization techniques regarding reviews online. Describe how these tools work and state the pros and cons of how these can affect consumers and businesses.
In: Computer Science
Two Systems 80 Km apart are communicating through a direct Metallic cable (note: signal speed is 2 x 10^8 m/s). The data is in the form of 60 KB packets with transmission rate 1M bps. Calculate the following:
In: Computer Science
Use JAVA to Design a simple registration system that allows Student to register in a course.
Requirements
In: Computer Science
Write a program that takes an integer as input and returns whether it is a prime number or not in C++. (Using if, loops, or/and bool only)
In: Computer Science
Question no 3: USE PYTHON
a. Generate a discrete uniform distribution of population size 100 between interval (1,10).)
b Consider the sample size of N=10, Simulate the sampling distribution of the sample mean. (repeat 100 times)
c Consider the sample size of N=30, what is the sample mean and sample standard deviation? (repeat 100 times)
In: Computer Science
Please Use the ECLIPSE AND FOLLOW THESE RULES
Apply the naming conventions for variables, methods, classes, and packages:
- variable names start with a lowercase character
- classes start with an uppercase character
- packages use only lowercase characters
methods start with a lowercase character
question1:
Design a Lotto class with one array instance variable to hold three random integer values (from 1 to 9). Include a constructor that randomly populates the array for a lotto object. Also, include a method in the class to return the array.
Use this class to simulate a simple lotto game in which the user chooses a number between 3 and 27. The user runs the lotto up to 5 times and each time the sum of lotto numbers is calculated. If the number chosen by the user matches the sum, the user wins and the game ends. If the number does not match the sum within five rolls, the computer wins.
question2:
Write a Java class that implements a set of three overloaded static methods. The methods should have different set of parameters and perform similar functionalities. Call the methods within main method and display the results.
eclipse...
In: Computer Science
Provide pseudo-code to compute the difference of two sets, S - T, using:
a. sets represented by linked-lists of characters.
b. sets represented by bit strings. (hint - what is "exclusive or?")
In: Computer Science