Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
expand_more
expand_more
format_list_bulleted
Concept explainers
Question
need help with python.
can modify/ refer from the code below
import numpy as np; from pylab import *;
import scipy.optimize
hdata=[3.24, 2.68, 2.35, 1.87, 2.57,2.77]
tdata=[0.81, 0.74, 0.69, 0.61, 0.72, 0.75];
error_in_t=np.ones(6)*0.1
def t(h,g):
return (2*h/g)**0.5
results=scipy.optimize.curve_fit(t,hdata,tdata,sigma=error_in_t,absolute_sigma=True)
gbest=results[0][0];
var=results[1][0][0];
se=var**0.5
print(gbest)
print(var,se)
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by stepSolved in 2 steps
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- In c++ please help me answer this question I will give you a good rating :) implement the three versions of the addupto20() function: iterative, recursive, and divide-and-conquer approach test these functions with a few inputs from your main() Iterative solution * check if there exsits two numbers from vector data that add up to 20 e.g., if data=[2,5,3,15], the function returns true, as data [0] +data [3]==20 e.g., if data=[3,4,0,8], the function return false precondition: vector data has been initialized postcondition: if there are two numbers from list add up to 20, return true; otherwise, return false */ bool AddupTo20 (const vector‹int> & data){ } Come up with a recursive solution to the problem, following the hints given below: * check if there exsits two numbers from vector data[first...right] add up to 20 e.g., if data=[2,5,3,15], first=0, last=3, the function returns true, as data [0] +data [3]==20 e.g., if data=[2,5,3,15], first=2, last=3, the function returns…arrow_forwardConsider the following context-free grammar for statements: 1) E > E+T 2) E →T 3) T > I*F 4) T →F 5) F → (E) 6) F → id which can be analyzed with the LR Parsing Table given as following. Action Goto id + * () $ ETF State s5 s4 |12 3 1 s6 асс 2 r2 s7 r2 r2 3 r4 r4 r4 r4 4 $5 $4 8 2 3 5 r6 r6 r6 r6 6. s5 $4 9 3 7 s5 $4 10 s6 s11 9 rl s7 rl rl 10 r3 r3 r3 r3 11 r5 r5 r5 r5 Show a complete parse, including the parse stack contents, input string, and action for the string id*(id + id), using the grammar and parse table given. 8.arrow_forwardData Structures and Algorithms in C/C++ a) Implement the addLargeNumbers function with the following prototype: void addLargeNumbers(const char *pNum1, const char *pNum2); This function should output the result of adding the two numbers passed in as strings. Here is an example call to this function with the expected output: /* Sample call to addLargeNumbers */ addLargeNumbers("592", "3784"); /* Expected output */ 4376 b) Implement a test program that demonstrates adding at least three pairs of large numbers (numbers larger than can be represented by a long). c) (1 point) Make sure your source code is well-commented, consistently formatted, uses no magic numbers/values, follows programming best-practices, and is ANSI-compliant.arrow_forward
- Code: #!/usr/bin/env python2.7 import sys def verify(submission): processed = [ ] if len(submission) % 2 != 0: return False for i in range(0, len(submission) / 2): processed.append(int(submission[i * 2] + submission[(i * 2) + 1], 16)) ekc = [ 0x53, 75, 0x59, 0x2D, 0110, 0x45, 88, 81, 0x2D, 0x39, 0x35, 0x36, 0x30 ] if len(processed) != len(ekc): return False for i in range(len(processed)): if ekc[i] != processed[i]: return False return True if len(sys.argv) != 1: print "Usage: python bytes.pyc" exit(1) submission = raw_input("What is the password? ") if verify(submission): print "That is correct" exit(0)else: print "That is incorrect" exit(2) Question: What is the password that will successfully pass the verify function?arrow_forwardModify the below program in c++ to give the correct output :- void array (int a[]) { cout <« sizeof (a) ; } Also write the driver functionarrow_forwardm = int(temp[1]) IndexError: list index out of range line 3, in <module> m = int(temp[10])IndexError: list index out of range when i ran this test case input: 3 jun3 Jin1 Li2 Kitty2 Josh3 Bob1 Dave2 Jose1 David3 Rob3 Anne3 Ann2 Kevin2 Lara1 ALI3 Xin expected output: Li Dave David ALI Kitty Josh Kevin Lara jun Bob Anne Ann Xinarrow_forward
- For the following C++ code find and write the recurrence relation. You need to model the runtime of function "Func" in terms of n. (only the recurrence relation in terms of n, No output of the code or final runtime analysis is required) s= array L[] start index e= array L[] end index void Func(int L[], int s, int e) { if (s < e) { i=s-1; for (int j = s; j <= e - 1; j++) { if (A[j] <= x) { i++; swap (&L[i], &L[j]); } } swap (&L[i + 1], &L[e]); int k = i+1; Func(L, s, k - 1); Func(L, k + 1, e); } } Please explain how you get the relation Thank you!arrow_forwardKindly fix the code:arrow_forwardin c++ using only binary searcharrow_forward
arrow_back_ios
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education