1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
diamong [38]
4 years ago
8

After creating the table, how would you add a new record to the table

Computers and Technology
1 answer:
lubasha [3.4K]4 years ago
8 0
Assuming you have a SQL database, you would use the SQL INSERT statement.
You might be interested in
A(n) ________ is the portion of virus code that is unique to a particular computer virus. A) virus signature B) encryptio
tino4ka555 [31]

Answer:

A) virus signature

Explanation:

Antivirus databases contain what are called signatures, a virus signature is a continuous sequence of bytes that is common for a certain malware sample.

--

Encryption is a way of scrambling data so that only authorized parties can understand the information.

7 0
2 years ago
Papa Mario of Mario's Pizzeria has baked a huge pizza and cut it into n slices, but he is clumsy and the pizza wasn't evenly sli
rosijanka [135]

Suppose there are n student: 1, 2, 3, ..., i, ..., n.

Now, let's say each want slice size to be: t1, t2, ..., ti, ..., tn.

Let's pizza slices be : s1, s2, ..., si, ..., sn.

Now, it can be said that a student ' i ' will accept a slice of pizza ' si ' only if the size of slice is more then ' ti '.

Logic to distribute: what can be done is we can sort the demand i.e ti of students and also sort the size of pizza slices si. Now, Papa Mario can distribute the sorted slices to students sorted demand(smallest to heighest) one by one as they appear in sorted lists. Now, it will only be possible to distribute the slices to make everyone happy, if and only if in sorted lists of both s and t for each index k, it holds the condition: tk <= sk.

Let me explain you with example:

Lets says size of whole pizza is 100.

Now number of students n = 4.

Let there demands be : 20, 35, 15, 10.

This means 1st student atleast require the slice size of 20 and so on.

Case 1: Papa Mario divides the pizza into slices of size: 25, 20, 20, 35.

=> Now, we sort both lists.

Thus t => 10, 15, 20, 35

and s => 20, 20, 25, 35

Now, as we can see that for all index  tk <= sk, hence pizza can be distrubeted so that everyone can be happy.

Case 2: Papa Mario divides the pizza into slices of size: 30, 20, 20, 30.

=> Now, we sort both lists.

Thus t => 10, 15, 20, 35

and s => 20, 20, 30, 30

Now, as we can see that, for last student with demand of 35, the pizza slice alotted is of size 30, thus he is unhappy, and pizza cannot be distributed so that everyone becomes happy.

Now, after the approach, let's discuss question.

(a) Greedy algorithm paradigm is most appropriate for this problem, as what we are doing is greedily distributing small slices to those students which have least demands first then tackling bigger demands of students, by remaining bigger slices.

(b) As we are mainly sorting thel ist of sizes of pizza slices and student demands, thus we need to use an efficient algorithm to sort the lists. Such an efficient algorithm can be QuickSort() or MergeSort().

(c) Asymptotic running time of our algorithm would be O(n*logn).

3 0
3 years ago
What is the base for a hexadecimal number system?
miskamm [114]
The base for a hexadecimal number system is 16
5 0
3 years ago
The major objective of this lab is to practice class and object-oriented programming (OOP), and separate files: 1. We will reuse
vovangra [49]

Answer:

Implementation of resistor.cpp

#include "resistor.h"

Ohms::Ohm()

{

// default constructor

voltage=0;

}

Ohms::Ohm( double x) // parameterised constructor

{

voltage = x; // voltage x set to the supply voltage in the private data field called voltage

}

Ohms:: setVoltage(double a)

{

voltage = a;// to set supply voltage in private data field called voltage

}

Ohms::setOneResistance( String s, double p)

{

cin>>p; //enter the resistance value

if(p<=0) // if resistance is less than or equals to 0

return false

else // if re

cin.getline(s);

}

Ohms::getVoltage()

{

return voltage; //return voltage of ckt

}

Ohms::getCurrent()

{

return current; //return current of ckt

}

Ohms:: getNode()

{

return resistors; //return resistors of ckt

}

Ohms::sumResist()

{

double tot_resist = accumulate(resistors.begin(),resistors.end(),0); //std::accumulate function for calculating sum //of vectors and following are the starting and ending points

return tot_resist;

}

Ohms::calcCurrent()

{

if(current <=0) // if current is less than or equal to 0

return false;

else   // if current is greater than 0

return true;

}

Ohms:: calcVoltageAcross()

{

if(voltage<=0) // if voltage is less than or equal to 0

return false;

else //if voltage greater than 0

return true;

}

Explanation:

in the case of main.cpp its simple just make a class object and remember to include resistors.cpp with it for which the second last picture describes the process precisely. (Hint: Use theunit test case functions in the main.cpp).

As you can see node is a structure consisting of member variables, followed by a class Ohms representing a DC circuit.

By looking at these pictures, it is needed to implement the main.cpp and resistor.cpp files. The user defined header file resistor.h already consists of all contents of Class Ohm, struct node. You don't need to modify it in anyway in such case.

8 0
3 years ago
Write a Python program that can convert a Fahrenheit temperature to Celsius, or vice versa. The program should use two custom fu
Klio2033 [76]

A Python program that can convert a Fahrenheit temperature to Celsius, or vice versa. The program should use two custom functions, f_to_c and c_to_f, to perform the conversions.

Explanation:

  • Functions should be defined in a custom module named temps. Custom function c_to_f should be a void function defined to take a Celsius temperature as a parameter.
  • It should calculate and print the equivalent Fahrenheit temperature accurate to three decimal places.
  • Custom function f_to_c should be a value-returning function defined to take a Fahrenheit temperature as a parameter.
  • This function should calculate the equivalent Celsius temperature and return it.

The code is given below :

def c_to_f(tempCelsius):

  tempFahrenheit = ((9/5)*tempCelsius) + 32;

  print("\n %.3f Celsius is %.3f Fahrenheit \n" %(tempCelsius, tempFahrenheit));

def f_to_c(tempFahrenheit):

  tempCelsius = (tempFahrenheit - 32) * (5/9);

  return tempCelsius;

(Import modules)

import temps;  

def main():

  temperature = float(input("\n Enter a temperature: "));

  scale = input("\n Was that input Fahrenheit or Celsius c/f? ");

  if scale.lower() == 'c':

      temps.c_to_f(temperature);

  else:

 tempCel = temps.f_to_c(temperature);

      print("\n %.1f Fahrenheit equals %.3f Celsius \n" %(temperature, tempCel));

main();

4 0
3 years ago
Other questions:
  • The letters G,S and C are all examples of what Microsoft Word feature?
    12·1 answer
  • An employee has contacted the IT Support call center where you work. They are complaining that they are unable to access any web
    14·1 answer
  • When Russ opened a website on his browser, he saw an error that the site was not compatible with the browser version he was runn
    12·1 answer
  • Assignment 2 edhesive
    8·2 answers
  • Which activity represents a violation of the licensing agreement?
    13·2 answers
  • What is the largest computer file size, megabyte , gigabyte, terabyte
    15·2 answers
  • Laura is using a rent to own store to purchase a computer valued at $1,000. She is paying $25 per week for 104 weeks(2 years). W
    13·1 answer
  • The government now requires physicians to store patient information in databases that are accessible in multiple locations by mu
    8·1 answer
  • Put Your Zom Here If You In Zom
    6·2 answers
  • I just need question 2 answered. Someone please help I’m on a test!
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!