Questions
When an object is falling because of gravity, the following formula can be used to determine...

When an object is falling because of gravity, the following formula can be used to determine the distance the object falls in a specific time period:
d=1/2 gt^2
The variables in the formula are as follows:
d is the distance in meters,
g is 9.8,
t is the amount of time, in seconds, that the object has been falling.
Design a function named calcFallingDistance that accepts an object’s falling time (in seconds) as an argument. The function should return the distance, in meters, that the object has fallen during that time interval.
Design a program that calls the function in a loop that passes the values 1 through 10 as arguments and displays the return value.


In: Computer Science

Do a software evaluation of "MICROSOFT POWERPOINT" using the following criteria: General Requirements and Design Functional...

Do a software evaluation of "MICROSOFT POWERPOINT" using the following criteria:

  1. General Requirements and Design
  2. Functional and Interface Specifications
  3. Conventions
  4. Requirement Traceability
  5. Structures and Interfaces
  6. Logic
  7. Performance
  8. Error Handling and Recovery
  9. Testability and Extensibility
  10. Coupling and Cohesion

In: Computer Science

What do you see as the primary differences between a Web DEVELOPER and a Web DESIGNER?...

What do you see as the primary differences between a Web DEVELOPER and a Web DESIGNER? What are some factors that a Developer must consider over a Designer, or vice versa? Why, specifically, is it important for each to have an understanding of what the other does?

In: Computer Science

Convert this strategy into an algorithm and write it below. remember to provide an algorithm header,...

Convert this strategy into an algorithm and write it below. remember to provide an algorithm header, number the algorithm steps and to use pseudocode conventions.

         Scan the input array A, counting the number of negative, zero and positive numbers. Let these counts be x, y and z respectively.

         Create a new array B of the same size and set a local variable neg to 1, zero to x+1, and pos to x+y+1.

         Scan the input array from left to right, and if the current number being looked at is negative, copy it to B[neg] and increment neg, if it is a zero, copy it to B[zero] and increment zero, and if it is positive, copy it to B[pos] and increment pos.

         Output array B.

In: Computer Science

In the C++ programming language write a program capable of playing Tic-Tac-Toe against the user. Your...

In the C++ programming language write a program capable of playing Tic-Tac-Toe against the user. Your program should use OOP concepts in its design. You can use ASCII art to generate and display the 3x3 playing board. The program should randomly decide who goes first computer or user. Your program should know and inform the user if an illegal move was made (cell already occupied). The program should also announce if one of the players wins or if a draw is achieved. While it is desirable for your program to play a strong game, this is not an Artificial Intelligence course so if your program does not play at a world champion level you will not be penalized for it

In: Computer Science

Need to modify the below code to return the time in minutes instead of seconds. (Using...

Need to modify the below code to return the time in minutes instead of seconds.

(Using Python 2.7.6 )

def numberPossiblePasswords(numDigits, numPossiblePerDigit):
    numPasswords = numPossiblePerDigit**numDigits
    return numPasswords


def maxSecondsToCrack(numPossiblePasswords, secPerAttempt):
    time = numPossiblePasswords*secPerAttempt
    return time


nd = int(input("How many digits long is the passcode? "))      
nc = int(input("How many possible characters are there per digit? "))


secondsPerAttempt = .08


npp = numberPossiblePasswords(nd, nc)


totalSeconds = maxSecondsToCrack(npp, secondsPerAttempt)


print("It will take you " + str(totalSeconds) + " seconds maximum to crack the password.")

In: Computer Science

Python Question I have created a dictionary shown below: import pandas as pd records_dict = {'FirstName':...

Python Question

I have created a dictionary shown below:

import pandas as pd

records_dict = {'FirstName': [
'Jim', 'John', 'Helen'],
'LastName': [
'Robertson', 'Adams', 'Cooper'],
'Zipcode': [
'21801', '22321-1143', 'edskd-2134'],
'Phone': [
'555-555-5555', '4444444444', '323232']
}

I have stored this dictionary in a data frame, like shown below:

records = pd.DataFrame(records_dict)

print(records)

I am able to print the records just fine. My issue is, I want to eliminate, or put a blank space in, the values of the zipcode and phone number keys that do not match the correct format, using regular expressions.

How would I write the syntax for this?   

In: Computer Science

This is a Entry to Java question. Please show me the PseudoCode or Commits first so...

This is a Entry to Java question. Please show me the PseudoCode or Commits first so I can learn to analyze everything a a little bit better.

Simple Calculator (10 points) (General) Calculators represent the most basic, general-purpose of computing machines. Your task is to reduce your highly capable computer down into a simple calculator. You will have to parse a given mathematical expression, and display its result. Your calculator must support addition (+), subtraction (-), multiplication (*), division (/), modulus(%), and exponentiation (**).

Facts

● Mathematical expressions in the form of: num1 operator num2

● Exponentiation should be in the form base ** exponent ○ Example: 3 ** 2 = 9

Input First line is the number of test cases. Each line thereafter is an integer-based mathematical expression in the form defined in the above facts.

Output For each test case, display the result of the mathematical expression terminated with a new line character

Sample Input

4

3+7

5-1

4**2

19/5

Sample Output

10

4

16

3

The main techniques that should be used are selection statements and repetition statements.

In: Computer Science

Code1: #include int main(){     int res1, res2, res;       printf("\nEnter Value of Each Resistance...

Code1:

#include
int main(){
    int res1, res2, res;
  
   printf("\nEnter Value of Each Resistance 1: ");
   scanf("%d", &res1);
   printf("\nEnter Value of Each Resistance 2: ");
   scanf("%d", &res2);
   res = res1+res2;
   printf("\nEquivalent Series Resistance : %d Kohm\n", res);

   return (0);
}

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

Code2:

#include
int main(){
    int res1, res2, res;
  
   printf("\nEnter Value of Each Resistance 1: ");
   scanf("%d", &res1);
   printf("\nEnter Value of Each Resistance 2: ");
   scanf("%d", &res2);
   res = (res1*res2)/(res1+res2);
   printf("\nEquivalent Parellel Resistance : %d Kohm\n", res);

   return (0);
}

Take the two programs and combine them into a single program(using c not c++) that uses an if and else statement to calculate R total either in series or parallel based on the users preference (ask the users which way they want the resistance calculated).

In: Computer Science

(C++) Write a function that takes as an input parameter an integer that will represent the...

(C++) Write a function that takes as an input parameter an integer that will represent the length of the array and a second integer that represents the range of numbers the random number should generate (in other words, if the number is 50, the random number generator should generate numbers between 0 and 49 including 49. The function then sorts the list by traversing the list, locating the smallest number, and printing out that smallest number, then replacing that number in the array with the second parameter +1 (so in our above example, it would be 51. ) Continue to do this until every number in the original array is printed out in order

In: Computer Science

Using Bash script, 1. Print the multiplication table upto 10 rows. Ask the user to enter...

Using Bash script,

1. Print the multiplication table upto 10 rows. Ask the user to enter a number. say user enters 10, your output should be :

[srivatss@athena shell]> ./mult.sh
I will be printing the multiplication table
Please enter a number
10
1 x 10 = 10
2 x 10 = 20
3 x 10 = 30
4 x 10 = 40
5 x 10 = 50

6 x 10 = 60
7 x 10 = 70
8 x 10 = 80
9 x 10 = 90
10 x 10 = 100

[ 5 points ]

2. Create a Simple Calculator [ 20 points , 5 points for each operator]

Ask the user for the first operand, second operand and the operator. You output the result to the user based on the operator. Here is the sample output

[srivatss@athena shell]> ./calc.sh
Welcome to my Simple calculator
Please enter the first operand
2
Please enter the second operand
3
Please enter the operator
+
2 + 3 = 5


[srivatss@athena shell]> ./calc.sh
Welcome to my calculator
Please enter the first operand
4
Please enter the second operand
2
Please enter the operator
-
4 - 2 = 2
[srivatss@athena shell]> ./calc.sh
Welcome to my calculator
Please enter the first operand
4
Please enter the second operand
5
Please enter the operator
*
4 * 5 = 20
[srivatss@athena shell]> ./calc.sh
Welcome to my calculator
Please enter the first operand
6
Please enter the second operand
3
Please enter the operator
/
6 / 3 = 2

3. Using RANDOM function and touch command , create a file with prefix =BatchJob followed by the random number.  

For instance, I ran my script, it created a file with random number 10598.  

[srivatss@athena shell]> ./cmds.sh
BatchJob10598

[ 5 points ]

In: Computer Science

The goal is to design a program that prints out "unlock" when a 3 knock pattern...

The goal is to design a program that prints out "unlock" when a 3 knock pattern is knocked on a sensor. this program will be ran on an arduino with a pizeo sensor.

In: Computer Science

Capture as much as possible from information categorized as Level 1 (L1), with a minimum of...

Capture as much as possible from information categorized as Level 1 (L1), with a minimum of 5 items that are not related to their network or domains

organization used: UTRGV.edu

In: Computer Science

(10) public double smallerRoot() throws Exception Depending on the equation ax^2 + bx + c =...

 (10) public double smallerRoot() throws Exception
   Depending on the equation ax^2 + bx + c = 0: 
      if no roots, throw exception
      if single root, return it
      if two roots, return  the smaller root
      if infinite root, return -Double.MAX_VALUE

  (11)  public double largerRoot() throws Exception
      if no roots, throw exception
      if single root, return it
      if two roots, return  the larger root
      if infinite root, return Double.MAX_VALUE
  
  (12) equals method
      This should OVERRIDE equals method from Object class
  
      return true if two expressions have same a, same b and same c

  (13) clone 
       return a copy of the calling object
   

  (14) use javadoc style comments for the class, and the methods
  
       At minimum, include the author,  parameters and return types for each method. 
       
  (15) use javadoc to generate document for your class
  
  (16) test your class:
       you can write your own main to test your code;
    
        but you have to pass the test in QuadraticExpressionTest.java 

  (17) submit  
     a. QuadraticExpression.java
     b. QuadraticExpression.html
      on blackboard.

In: Computer Science

Sonia uses noon website to buy various items. if the total cost of the ordered items,...

Sonia uses noon website to buy various items. if the total cost of the ordered items, at one time is 1000 AED or more then the shipping is free: otherwise the shipping will cost 10 AED/ item. write a C++ program that prompts Sonia to enter the number of items ordered and the price of each one of them. the program will then output the total billing amount, your program must use a for loop.

In: Computer Science