Questions
Prompt the user for their name, get and store the user input. Prompt the user for...

Prompt the user for their name, get and store the user input.

Prompt the user for their age, get and store the user input. We will assume that the user will enter a positive integer and will do no error checking for valid input.

Determine and store a movie ticket price based on the user's age. If their age is 12 or under, the ticket price is $5. If their age is between 13 and 64, inclusive, the ticket price is $10. If their age is 65 or greater, the ticket price is $8.

When all the user input has been gathered, print out a meaningful label such as 'Name: ' followed by the entire user name on one line. On the next line, print out a meaningful label such as 'Age: ' followed by the user's age. On the next line, print out a meaningful label such as 'Ticket Price: ' followed by the ticket price your program calculated. Your output should look something like this:

Name: Mickey M Mouse

Age: 19

Ticket Price: $10

Python 3

In: Computer Science

pseudo-code, please If a word has a tag O, it means that the word has nothing...

pseudo-code, please

If a word has a tag O, it means that the word has nothing to do with the named entity (it is not a part of a named entity such as a location, person name, organization, and etc.)

If a word has a tag starting with B, it means that the word is the beginning of a named entity. For instance, the tag B-per means that the associated word is the beginning of a person's name. On the other hand, if a word has a tag starting with I, it means the word is inside a named entity. Hence, the tag I-per means that the associated word is inside a person's name.

Thousands O

of O

demonstrators O

have O

marched O

through O

London B-geo

Take the following lines in the file for example.

President B-per

Mahmoud I-per

Ahmadinejad I-per

said O

We know the words “President, Mahmoud, and Ahmadinejad” cover a named entity of the type person name.

Could you write pseudo code to pull the names out of a file that are stated in the example

In: Computer Science

Create a new Python 3 Jupyter Notebook. At the top, be sure to name your notebook...

Create a new Python 3 Jupyter Notebook.

At the top, be sure to name your notebook as "*assignment 2.08 - Your Name Here.ipynb*" (obviously, replace the "Your Name Here" part with your actual name).

Create a single python cell to program the following specifications.

Use what you've learned on this page to:
1. Find the index of "lmno" in the English alphabet using an appropriate instruction and store it in a variable. (hint: you'll need to define a string that contains the letters of the alphabet in their proper order)
1. Find the length of "lmno" using an appropriate instruction and store it in a different variable.
1. Use those two variables to determine the index for the end of "lmno" within the alphabet and store that in a third variable. (hint: use math)
1. Use the two variables that are defined as indexes to get the corresponding slice of the alphabet and print it out using a format string.

You may use any other variables you determine are necessary or helpful. Also, be sure to use comments as needed to explain what is taking place.

In: Computer Science

Task 2.5: Write a script that will ask the user for to input a file name...

Task 2.5: Write a script that will ask the user for to input a file name and then create the file and echo to the screen that the file name inputted had been created

1. Open a new file script creafile.sh using vi editor

# vi creafile.sh

2. Type the following lines

#!/bin/bash

echo ‘enter a file name: ‘

read FILENAME

touch $FILENAME

echo “$FILENAME has been created”

3. Add the execute permission

4. Run the script #./creafile.sh

5. Enter the file name you want to create

6. Check whether file is created

-------------------------------------------------------------------------------------------------

Task 3.4 Challenge Exercises

a.Write Script to see current date, time, username, and current directory.

b.Take the script from Task 2.5 and write it so it does not create a file if no input is received.

c. In this exercise, you will create a script based on case statement.

d. Write a Shell using for loop to print three strings.

e. Write a bash Script to reverse a given positive integer.

In: Computer Science

Writing Classes I Write a Java program containing two classes: Dog and a driver class Kennel....


Writing Classes I
Write a Java program containing two classes: Dog and a driver class Kennel.


A dog consists of the following information:
• An integer age.
• A string name. If the given name contains non-alphabetic characters, initialize to Wolfy.
• A string bark representing the vocalization the dog makes when they ‘speak’.
• A boolean representing hair length; true indicates short hair.
• A float weight representing the dog’s weight (in pounds).
• An enumeration representing the type of tail (LONG, SHORT, NONE).


A dog consists of the following methods.
• A default constructor.
• A constructor that takes a name as argument.
• A method private boolean validName(String) that returns true / false whether the given name contains non-alphabetic characters.
• humanAge that computes and returns the age of the dog in “human years.”
• speak returns the dog’s bark.


Each constructor should initialize all attributes to reasonable initial values.


The main method in the Kennel class should create several dogs with each constructor and output
their instance data using toString.

In: Computer Science

Create a python program that: Creates a sales receipt, displays the receipt entries and totals, and...

Create a python program that:

  • Creates a sales receipt, displays the receipt entries and totals, and saves the receipt entries to a file
    • Prompt the user to enter the
      • Item Name
      • Item Quantity
      • Item Price
    • Display the item name, the quantity, and item price, and the extended price (Item Quantity multiplied by Item Price) after the entry is made
    • Save the item name, quantity, item price, and extended price to a file
      • When you create the file, prompt the user for the name they want to give the file
      • Separate the items saved with commas
      • Each entry should be on a separate line in the text file
    • Ask the user if they have more items to enter
  • Once the user has finished entering items
    • Close the file with the items entered
    • Display the sales total
    • If the sales total is more than $100
      • Calculate and display a 10% discount
    • Calculate and display the sales tax using 8% as the sales tax rate
      • The sales tax should be calculated on the sales total after the discount
    • Display the total for the sales receipt

In: Computer Science

You have information about recent sales that you want to use for testing the database. 1....

You have information about recent sales that you want to use for testing the database. 1. Create the tables for the data provided. The tables should include the primary and foreign keys. Provide the SQL statements. 2. Insert the data into the tables. Provide the SQL statements. 3. Show the contents of each table. Provide the SQL statements.

Customer Table Customer ID, Last Name, First Name, Street Address, City, State, Zip Code, Current Balance, Credit Limit, Sales Rep. ID Sales Representatives Table Sales Rep ID, Last Name, First Name, Street Address, City, State, Zip, Region, Region Description, Total Commission, Commission Rate Orders Table Order ID, Order Date, Customer, Shipping Date, Order Lines Order ID, Part ID, Number Ordered, Quoted Price Part Table Part ID, Part Description, Units on Hand, Class, Warehouse Number, Unit Price

Please show all work

In: Computer Science

JAVASCRIPT: - Please create an object (grade) with 10 names and 10 grades. - Create a...

JAVASCRIPT: -
Please create an object (grade) with 10 names and 10 grades.
- Create a method (inputGrade) that can put a name and a grade to the grade object.
- Create another method (showAlltheGrades) to show all the grade in that object.
- Create the third method (MaxGrade) that can display the maximum grade and the student name.
- Using “prompt” and inputGrade method input 10 student names and their grades.
- Display all the grades and names by using showAlltheGrades method.
NOTE: Make sure to use the push() method when adding elements to the arrays. Please post the code and a screenshot of the output. Thanks!

[Reference JavaScript code]
<html>
<body>
<script>
// Declare a class
class Student {
// initialize an object
constructor(grade, name) {
this.grade=grade;
this.name=name; }
//Declare a method
detail() {
document.writeln(this.grade + " " +this.name)
}//detail
}//class
var student1=new Student(1234, "John Brown");
var student2=new Student(2222, "Mary Smith");
student1.detail();//call a method
student2.detail();
</script>
</body>
</html>

In: Computer Science

Create a website for an online movie rental store, using HTML (and any other client technologies)...

Create a website for an online movie rental store, using HTML (and any other client technologies) and PHP. The website should include:

- A front/home page containing a list of movies available for rent (list at least 10 movies).

o Each movie should have a listed rental price.

o Additional information provided:

§ name of actors in the movie (list at least 2)

- The home page should link to a form for renting a movie

o Selecting and submitting a movie for rent will lead to a page displaying

§ the name of the movie rented,

§ the amount charged (calculated with 5% tax),

§ the date and time rented, and § the date and time the movie is due for return (in 5 days).

- A form linked through the home page for selecting a movie and submitting a user review.

o Input fields should include

§ The name of the movie

§ Username

§ Rating in 5 stars

§ User review

o Output after submitting a review should show the name of the movie and all submitted information.

In: Computer Science

Consider the following relational schema (the primary keys are underlined and foreign keys are italic) ITEM(ItemName,...

Consider the following relational schema (the primary keys are underlined and foreign keys are italic)

ITEM(ItemName, ItemType, ItemColour)
DEPARTMENT(Deptname, DeptFloor, DeptPhone, Manager) EMPLOYEE(EmpNo, EmpFname, EmpSalary, DeptName, SupervisedBy) SUPPLIER(SupNo, SupName)
SALE(SaleNo, SaleQty, ItemName, DeptName)
DELIVERY(DeliNo, DeliQty, ItemName, DeptName, SupNo)
Write the SQL statements for the following queries:

C1. Find the names of items sold on first and second floors.
[1 mark]

C2. For each department, list the department name and average salary of the employees where the average salary of the employees is great than $28,000.
[1 mark]

C3. List the name and salary of the managers with no more than 10 employees.
[2 marks]

C4. List the names of the employees who earn more than any employee in the Deliver department. [2 marks]

C5. For each department that sells items of type E, list the department name and the number of the employees. [2 marks]

C6. Find the supplier name who supplies the least items.

In: Computer Science