Questions
Select at least three of the low-incidence disabilities addressed and discuss how hearing this information from...

Select at least three of the low-incidence disabilities addressed and discuss how hearing this information from a primary source will affect the way you interact with students in your classroom. Be specific and thorough.

In: Psychology

What current struggles about gender bias in the legal profession might law students engage in and...

What current struggles about gender bias in the legal profession might law students engage in and attempt to organize today? If you wanted to start, how might you do so?

In: Psychology

A local restaurant giving a 10% discount to college students is an example of: first degree...

A local restaurant giving a 10% discount to college students is an example of:

first degree price discrimination

second degree price discrimination

third degree price discrimination

two-part pricing

In: Economics

Need two paragraphs or more explaining this question. How would you ensure the greatest amount of...


Need two paragraphs or more explaining this question.

How would you ensure the greatest amount of success in literacy development by 9th grade for all students, including English Language Learners?

In: Psychology

I need to send my students I am doing distant classes a test How do I...

I need to send my students I am doing distant classes a test How do I do this and have them answer it without the ability for the to keep it or print it out

In: Operations Management

How do you generate questions for your students that address a variety of levels and capabilities...

How do you generate questions for your students that address a variety of levels and capabilities of mathematical thinking in a whole class situation? Provide two examples of such questions for a stated grade level.

In: Psychology

I was given an assignment to write three sections of Code. 1. Look up password 2....

I was given an assignment to write three sections of Code.

1. Look up password

2. Decrypt a password.

3. What website is this password for?

Here's the base code:

import csv
import sys

#The password list - We start with it populated for testing purposes
passwords = [["yahoo","XqffoZeo"],["google","CoIushujSetu"]]


#The password file name to store the passwords to
passwordFileName = "samplePasswordFile"

#The encryption key for the caesar cypher
encryptionKey=16

#Caesar Cypher Encryption
def passwordEncrypt (unencryptedMessage, key):

    #We will start with an empty string as our encryptedMessage
    encryptedMessage = ''

    #For each symbol in the unencryptedMessage we will add an encrypted symbol into the encryptedMessage
    for symbol in unencryptedMessage:
        if symbol.isalpha():
            num = ord(symbol)
            num += key

            if symbol.isupper():
                if num > ord('Z'):
                    num -= 26
                elif num < ord('A'):
                    num += 26
            elif symbol.islower():
                if num > ord('z'):
                    num -= 26
                elif num < ord('a'):
                    num += 26

            encryptedMessage += chr(num)
        else:
            encryptedMessage += symbol

    return encryptedMessage

def loadPasswordFile(fileName):

    with open(fileName, newline='') as csvfile:
        passwordreader = csv.reader(csvfile)
        passwordList = list(passwordreader)

    return passwordList

def savePasswordFile(passwordList, fileName):

    with open(fileName, 'w+', newline='') as csvfile:
        passwordwriter = csv.writer(csvfile)
        passwordwriter.writerows(passwordList)



while True:
    print("What would you like to do:")
    print(" 1. Open password file")
    print(" 2. Lookup a password")
    print(" 3. Add a password")
    print(" 4. Save password file")
    print(" 5. Print the encrypted password list (for testing)")
    print(" 6. Quit program")
    print("Please enter a number (1-4)")
    choice = input()

    if(choice == '1'): #Load the password list from a file
        passwords = loadPasswordFile(passwordFileName)

    if(choice == '2'): #Lookup at password
        print("Which website do you want to lookup the password for?")
        for keyvalue in passwords:
            print(keyvalue[0])
        passwordToLookup = input()

        ####### YOUR CODE HERE ######
        #You will need to find the password that matches the website
        #You will then need to decrypt the password

        #
        #1. Create a loop that goes through each item in the password list
        #  You can consult the reading on lists in Week 5 for ways to loop through a list
        #
        #2. Check if the name is found.  To index a list of lists you use 2 square backet sets
        #   So passwords[0][1] would mean for the first item in the list get it's 2nd item (remember, lists start at 0)
        #   So this would be 'XqffoZeo' in the password list given what is predefined at the top of the page.
        #   If you created a loop using the syntax described in step 1, then i is your 'iterator' in the list so you
        #   will want to use i in your first set of brackets.
        #
        #3. If the name is found then decrypt it.  Decrypting is that exact reverse operation from encrypting.  Take a look at the
        # caesar cypher lecture as a reference.  You do not need to write your own decryption function, you can reuse passwordEncrypt
        #
        #  Write the above one step at a time.  By this I mean, write step 1...  but in your loop print out every item in the list
        #  for testing purposes.  Then write step 2, and print out the password but not decrypted.  Then write step 3.  This way
        #  you can test easily along the way.
        #


        ####### YOUR CODE HERE ######


    if(choice == '3'):
        print("What website is this password for?")
        website = input()
        print("What is the password?")
        unencryptedPassword = input()

        ####### YOUR CODE HERE ######
        #You will need to encrypt the password and store it in the list of passwords

        #The encryption function is already written for you
        #Step 1: You can say encryptedPassword = passwordEncrypt(unencryptedPassword,encryptionKey)]
        #the encryptionKey variable is defined already as 16, don't change this
        #Step 2: create a list of size 2, first item the website name and the second item the password.
        #Step 3: append the list from Step 2 to the password list


        ####### YOUR CODE HERE ######

    if(choice == '4'): #Save the passwords to a file
            savePasswordFile(passwords,passwordFileName)


    if(choice == '5'): #print out the password list
        for keyvalue in passwords:
            print(', '.join(keyvalue))

    if(choice == '6'):  #quit our program
        sys.exit()

    print()
    print()

In: Computer Science

***For some practice on this assignment, you could visit your textbook’s online site and do one...

***For some practice on this assignment, you could visit your textbook’s online site and do one of the Chapter 13 exercises (this is from an earlier edition of the textbook, so the Chapter numbers do not align)!

Understanding pricing theory is all fine and good. But you also have to be able to "crank the numbers". IMPORTANT NOTE: for the following case, assume that any change in costs, once made, continues from that point and then throughout the rest of the problem unless otherwise noted.

Calculate the breakeven point for a private, upscale K-8 (Kindergarten through 8th grade) academy with the cost structure listed below. Assume that tuition (i.e., the price) is $5,500 per student. Note: be sure to round up to the nearest whole number -- we generally don't have 2/3rds of a student!

***Important hint #1: be sure to round up to the nearest whole number -- we generally don't have 2/3rds of a student!

***Important hint #2: make sure you carefully think through which of the costs listed below will fall into Fixed Costs and which will fall into Variable Costs. You may want to re-read the Lecture to refresh your memory on this one.

administrator salaries $550,000
faculty salaries $950,000
coaches salaries $60,000
medical,...benefits $650,000
insurance $100,000
mortgage/debt $150,000
materials cost for each student $500
Breakeven point (number of enrolled students needed) for this Academy, given this cost structure is: ____________students. (Be sure to show an outline of your calculations.)
Now assume that because enrollment has tapered off, your Board of Trustees has approved a $200,000 marketing budget to develop promotional materials and to hire a part-time recruiter. (Remember to include this cost from now on.) (Again, show an outline of your calculations.)

Your new B/E point is _________ students.
In other words, to cover this increase in promotion, you’ll need another ______ students in order to breakeven.
Faculty salaries have been frozen for the past 4 years. They now indicate that they will strike if they are not given an immediate 3% pay increase. You believe that this should also be extended to the coaching staff, to head-off potential problems in that area. (Again, remember to include this cost from now on.) (Also again, show an outline of your calculations)

Rounding up to the nearest whole number, your new B/E point is _________ students.
Enrollment turns out to be 539 students. Therefore your academy has made profits of $__________.
To help defray the new marketing costs, you decide to raise your tuition from $5,500 to $6,000. Rounding up to the nearest whole number, your new B/E point is ______ students. (Show an outline of your calculations).
Please discuss the following: what would you say if the academy chose to use an odd pricing strategy, pricing tuition at $5,999? This question isn’t asking you to do any math, just to comment on the pros and cons of choosing a price point of $5,999 vs. $6,000 for the tuition.
Information for questions 8-10:

Your enrollment of 539 students (from part "5" above) drops 1 percentage point more than your tuition was raised (e.g., if tuition is raised 5%, enrollment drops 6%). Regrettably, school tuition appears to be far more elastic than expected.

Based on the information given to you in part “6” above, tuition was raised _____%.
That means that your enrollment has declined _____%.
Rounding up to the nearest whole number, enrollment is now ________ students.

In: Accounting

this is my linkedlist and to insert a new element in it , however i want...

this is my linkedlist and to insert a new element in it , however i want it to be user entered linkedlist

#include <bits/stdc++.h>

using namespace std;

  

// A linked list Node

struct Node {

    int data;

    struct Node* next;

};

  

// Size of linked list

int size = 0;

  

// function to create and return a Node

Node* getNode(int data)

{

    // allocating space

    Node* newNode = new Node();

  

    // inserting the required data

    newNode->data = data;

    newNode->next = NULL;

    return newNode;

}

  

// function to insert a Node at required position

void insertPos(Node** current, int pos, int data)

{

    // This condition to check whether the

    // position given is valid or not.

    if (pos < 1 || pos > size + 1)

        cout << "Invalid position!" << endl;

    else {

  

        // Keep looping until the pos is zero

        while (pos--) {

  

            if (pos == 0) {

  

                // adding Node at required position

                Node* temp = getNode(data);

  

                // Making the new Node to point to

                // the old Node at the same position

                temp->next = *current;

  

                // Changing the pointer of the Node previous

                // to the old Node to point to the new Node

                *current = temp;

            }

            else

              // Assign double pointer variable to point to the

              // pointer pointing to the address of next Node

              current = &(*current)->next;

        }

        size++;

    }

}

  

// This function prints contents

// of the linked list

void printList(struct Node* head)

{

    while (head != NULL) {

        cout << " " << head->data;

        head = head->next;

    }

    cout << endl;

}

  

// Driver Code

int main()

{

    // Creating the list 3->5->8->10

    Node* head = NULL;

    head = getNode(3);

    head->next = getNode(5);

    head->next->next = getNode(8);

    head->next->next->next = getNode(10);

  

    size = 4;

  

    cout << "Linked list before insertion: ";

    printList(head);

  

    int data = 12, pos = 3;

    insertPos(&head, pos, data);

    cout << "Linked list after insertion of 12 at position 3: ";

    printList(head);

  

    // front of the linked list

    data = 1, pos = 1;

    insertPos(&head, pos, data);

    cout << "Linked list after insertion of 1 at position 1: ";

    printList(head);

  

    // insetion at end of the linked list

    data = 15, pos = 7;

    insertPos(&head, pos, data);

    cout << "Linked list after insertion of 15 at position 7: ";

    printList(head);

  

    return 0;

}

In: Computer Science

JAVA Start with the SelectionSort class in the zip file attached to this item. Keep the...

JAVA

Start with the SelectionSort class in the zip file attached to this item. Keep the name SelectionSort, and add a main method to it.

  • Modify the selectionSort method to have two counters, one for the number of comparisons, and one for the number of data swaps. Each time two data elements are compared (regardless of whether the items are in the correct order—we're interested in that a comparison is being done at all), increment the comparison counter. Each time two data items are actually swapped, increment the data swap counter.
  • At the end of the selectionSort method, print the size of the sorted array, and the counters. (Be sure to identify which counter is which in your print message
  • In your main method,
    • Declare a final int, NUM_ELEMENTS. Initially set NUM_ELEMENTS to 10 to debug your program.
    • Declare and create three double arrays of NUM_ELEMENTS length, lo2Hi, hi2Lo, random.
    • Initialize the first array, lo2Hi, with values 1.0, 2.0, …, NUM_ELEMENTS
    • Initialize the second array, hi2Lo with values NUM_ELEMENTS, 24.0,…, 1.0
    • Initialize the third array, random, with random double values between 0.0 and less than 1.0
    • call the selectionSort method using each array. (Note: you might want to print the array elements themselves for debugging purposes when NUM_ELEMENTS is small, but you’ll not want to print them with larger values for NUM_ELEMENTS.)
  • Run your program three times with different values for NUM_ELEMENTS: 1000, 2000 and 4000.

In your submission write some text describing the relationship between the number of comparisons of the various values of NUM_ELEMENTS. For example, what do we find if we divide the number of comparisons for 2000 elements by the number of comparisons for 1000 elements? What do we find if we divide the number of comparisons for 4000 elements by the number of comparisons for 2000 elements?

SELECTION SORT FILE MUST USE THIS IN PROGRAM!!! PLEASE

public class SelectionSort {
/** The method for sorting the numbers */
public static void selectionSort(double[] list) {
for (int i = 0; i < list.length - 1; i++) {
// Find the minimum in the list[i..list.length-1]
double currentMin = list[i];
int currentMinIndex = i;

for (int j = i + 1; j < list.length; j++) {
if (currentMin > list[j]) {
currentMin = list[j];
currentMinIndex = j;
}
}

// Swap list[i] with list[currentMinIndex] if necessary;
if (currentMinIndex != i) {
list[currentMinIndex] = list[i];
list[i] = currentMin;
}
}
}
}

In: Computer Science