Questions
Q.1 Write a python program that will take in basic information from a student, including student...

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...

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...

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...

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...

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...

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:

  1. Ask the user the price of the item they wish to purchase.
  2. Ask the user the quantity they wish to purchase.
  3. Ask the user to enter the name of the item they wish to purchase.
  4. Calculate the subtotal of the purchase. The subtotal of the purchase is calculated by the following equation:

Subtotal = Price * Quantity

  1. Calculate the discount amount using the equation and table below:

Subtotal

Discount

Under $25

5% discount

$25 but not more than $75.

10% discount

Over $75

15% discount

Discount Amount = Subtotal * (Discount/100)

  1. Calculate the discounted cost of the purchase. The discounted cost of the purchase is calculated by the following equation:

Discounted Cost = Subtotal - Discount Amount

  1. Create a String object in memory to hold the text: “Discount Calculation Utility”.
  2. Display the text at the top of the output (See Sample Input and Output)
  3. Display the item name, price, quantity, subtotal, discount, and total.
  4. Format the output of the program exactly as shown in the sample output (including indentation, spacing, and a number of decimal places).

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

Create a new ASP.NET using MVC. Set the application to SSL Enabled Implement an external login...

  1. Create a new ASP.NET using MVC.
  2. Set the application to SSL Enabled
  3. Implement an external login provider Facebook.

In: Computer Science

Python code def plot_dataset(file_path): """ Read in a text file where the path and filename is...

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...

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...

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:

  1. Data transmission time per packet.
  2. Propagation delay.
  3. bit duration.
  4. Bit length.
  5. Number of bits in the cable between the sender and receiver.

In: Computer Science

Use JAVA to Design a simple registration system that allows Student to register in a course....

Use JAVA to Design a simple registration system that allows Student to register in a course.

Requirements

  • using 2 classes: class Student & class Course.
  • Implement the scenarios in class Test’s main method.
  • Each student has a name and an id variable.
  • Each object of class Student is initialized using values of name and id passed to constructor.
  • Class Student has get methods for its instance variables.(getters and setters)
  • Each Course has a name, and a variable numberOfStudent representing the number of registered students.
  • A course can have a maximum number of 10 students registered in it.
  • Class Course store the registered students in students which is an array of type Student. When a student register in a course, he is added to the array. Each object of class Course is initialized using the title(name).
  • Class Course has the following methods:
    • method getStudents(): return the array of registered students;
    • method boolean isFull(): return true if the course is full,
    • get method for the name and numberOfStudent field;
    • method registerStudent (Student student): if the course is not full, register a student in course.

In: Computer Science

Write a program that takes an integer as input and returns whether it is a prime...

  1. 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...

  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,...

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...

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