FROM: ORACLE 9i Give the SQL statements that determine the following: 1. Which customers lives in New Jersey? SELECT * customer FROM customers WHERE state = 'NJ' 2.Which orders were shipped after April 1, 2003 SELECT * FROM orders WHERE shipdate to_date('01/04/2003', DD/MM/YYYY') 3. Which books are not in Fitness Category? SELECT * FROM books WHERE category != < 'Fitness' 4.Which customers live in either Georgia or New Jersey? Put the results in ascending order by last name. SELECT * FROM customers WHERE states IN ('GA or 'NJ') ORDER BY "LName" asce 5. Which orders were place before April 2, …

Member Avatar
Member Avatar
+0 forum 3

i have tried to answer this question like this (show your attempt) and i did it like this because (show your reasons why you think it is the correct approach) and the results that it gave are like this (show the results that your query produces) and i cannot understand why i am getting the wrong results. [CODE]USING:ORACLE 9i For each of the following tasks, determine (a) the SQL statement needed to perform the stated task using the traditional approach and (b) the SQL statement needed to perform the stated task the JOIN keyword. A list that displays the title …

Member Avatar
Member Avatar
+0 forum 1

##USING:ORACLE 9i For each of the following tasks, determine (a) the SQL statement needed to perform the stated task using the traditional approach and (b) the SQL statement needed to perform the stated task the JOIN keyword. A list that displays the title of each book & the name and phone number of the person at the publisher's office whom you would need to contact to record each book. SELECT title, name, customer FROM books NATURAL JOIN publisher WHERE books.pubid = publisher.pubid AND c.books = record Determine which orders have not yet shipped & the name of the customer that …

Member Avatar
+0 forum 0

USING:ORACLE 9i For each of the following tasks, determine (a) the SQL statement needed to perform the stated task using the traditional approach and (b) the SQL statement needed to perform the stated task the JOIN keyword. A list that displays the title of each book & the name and phone number of the person at the publisher's office whom you would need to contact to record each book. SELECT title, name, customer FROM books JOIN publisher WHERE books.pubid = publisher.pubid AND c.books = record Determine which orders have not yet shipped & the name of the customer that placed …

Member Avatar
+0 forum 0

THIS WINDCHILL TABLE PROGRAM IS RUNNING, BUT THE NUMBERS IS STILL NOT LINING UP STRAIGHT..WHY, CAN YOU PLEASE HELP ME..THANKS HERE IS THE PROGRAM BEFORE I RUN IT.. [CODE]def windchill( vel, temp): wc = 35.74 + .6215*temp - 35.75*(vel**.16) + .4275*temp*(vel**.16) return wc def main(): print (" __ __ __ Temperature \n") print ("Speed \n") print (" 1 -20 70 10 0 10 20 30 40 50 60 ") for x in range(5, 55, 5): print x for y in range (60, -30, -10): chill = windchill(x,y) print str(int(chill)) + " ", main() [/CODE] AND HERE IS THE RESULTS AFTER …

Member Avatar
Member Avatar
+0 forum 3

# sum.py # tpm # A program that accepts an indeterminate (any number) of integers entered by # the user, calculates and their sum, using loop [CODE]from math import * def calc_sum(): n = input("Enter any number: ") sum = 0.0 for i in range(n): x = input("Enter a number >> ") sum = sum + x print "\nThe sum of the numbers is", sum / n main()[/CODE] :sad: :mad: :confused: :o :( :cry: :evil:

Member Avatar
Member Avatar
+0 forum 2

# class.py # tpm # A program to calculate the volume and surface area of a sphere from its # radius given as input. [CODE]from math import * class Sphere: def _init_(self, radius): self.radius = radius def getRadius(self): return self.radius def surfaceArea(self): self.area = 4.0 * pi * self.radius ** 2 return self.area def volume(self): self.volume = 4.0 / 3.0 * pi * self.radius ** 3 return self.volume def main(): r = input('Enter the radius of the sphere ') s = Sphere(r) print 'The surface area of the sphere is: ', s.surfaceArea() print 'The volume of the sphere is: ', …

Member Avatar
Member Avatar
+0 forum 2

THE WINDCHILL TABLE IS RUNNING, BUT THE NUMBER IS NOT LINNING UP STRAIGHT. CAN YOU PLEASE HELP ME, THANKS [CODE]def windchill( vel, temp): wc = 35.74 + .6215*temp - 35.75*(vel**.16) + .4275*temp*(vel**.16) return wc def main(): print (" __ __ __ Temperature \n") print ("Speed \n") print (" 1 -20 70 10 0 10 20 30 40 50 60 ") for x in range(5, 55, 5): print x for y in range (-20, 70, 10): chill = windchill(x,y) print str(int(chill)) + " ", main()[/CODE] :mad: :evil: :cry: :o

Member Avatar
Member Avatar
+0 forum 1

[code] # windchill.py # tpm # A program that prints a nicely formatted table of windchill values. from math import * def windchill(t, v): c = 35.74 + (0.6215 * t) - (35.75 * v ** .16) + (.4275 * t * v ** .16) return c def main(): print "MPH:", for k in range (-20, 70, 10): print "%3d" %k, print print "_" * 44 for velocity in range (5, 55, 5): print "%3d" %velocity, for temp in range (-20, 70, 10): chill = windchill(temp, velocity) print "%3d" %round(chill), print main() [/code] :o

Member Avatar
Member Avatar
+0 forum 4

def windchill(temp, vel): wc = 35.74 + .6215*temp - (35.75*vel**.16 + .4275*temp*vel**.16) return wc def main(): print (" __ __ __Temp /n") print (" Speed /n") print ("-20 70 10 0 10 20 30 40 50 60 ") for x in range (5,55,5): print x for y in range (-20,70,10): chill =windchill(x,y) print chill + " " main() :mad: :cry: :o

Member Avatar
Member Avatar
+0 forum 1

I WRITTEN THIS PROGRAMM IN 2 WAYS(RE-WROTE IT OVER AND OVER), AND ITS STILL NOT RUNNING CORRECTLY. IS THERE OTHER WAYS THAT IS PROGRAM CAN BE WRITTEN. I AM SO FRUSTRATED, PLEASE HELP ME. THANK YOU. 1st way: # windchill.py # tpm # A program that prints a nicely formatted table of windchill values. from math import * def windchill(t, v): c = 35.74 + .6215 * t - 35.75 * (v ** .16) + .4275 * t * (v ** .16) return c def main(): print "MPH:", for k in range (-20, 70, 10): print "%3d" %k, print print …

Member Avatar
+0 forum 0

[CODE]# tpm.py # Take two inputs, age and years of citizenship, and returns eligibility for # senator and representative. from graphics import * def main(): win = GraphWin('Eligibility' , 400,400) win.setCoords(0.0,0.0, 4.0, 4.0) Text(Point(1, 3.0), 'Age').draw(win) Text(Point(1, 2.0), 'Years Citizen').draw(win) agebox = Entry(Point(2, 3.0), 10) agebox.draw(win) citizenshipbox = Entry(Point(2, 2.0), 10) citizenshipbox.draw(win) output = Text(Point(2.0, 1.0), 'Eligibility') output.draw(win) win.getMouse() age = eval(agebox.getText()) citizenship = eval(citizenshipbox.getText()) if 30 > age >= 25: if citizenship >= 7: output.setText('Eligible for US representative') else: output.setText('Ineligible for US representative') elif age >= 30: if citizenship >= 9: output.setText('Eligible for US senator and US representative') elif …

Member Avatar
Member Avatar
+0 forum 2

# tpm.py # A program that accepts the total amount of purchase, calculates the # appropriate discount, and displays the discount and the purchase after # discount. from math import * def main(): cost = get_cost() discount = get_discount() % = calc_percent(discount) final cost = get_final_cost cost_percent = cost_discount(cost, discount) show_result(cost_discount_final_cost) def get_cost(): return float(raw_input("Enter the cost before discount: ")) def get_discount(): return float(raw_input("Enter your discount is: ")) def calc_percent(discount) % = 0.10 on the entire purchase if it exceeds $1,000.00 % = 0.05 on the entire purchase if it exceeds $500.00, but not $1,000.00 print "No discount on puchases …

Member Avatar
Member Avatar
+0 forum 4

Did I do this right and can you please help me. This program uses a GUI to input a user's first and last name, and construct and display a UserID. Although the program 'runs', there are several problems with it. Fix each of these problems in turn: 1) The text and corresponding entry box for 'Last Name' does not align with those for 'First Name'. Correct this. 2) Provide the code to draw a Rectangle around the 'button' text object, so that it looks like a button. 3) The program as written always produces the same UserID, 'frodo'. Change this …

Member Avatar
Member Avatar
+0 forum 2

# tpm.py Computes the cost per square inch of pizza given cost of the pizza, # and diameter. from math import * def main(): cost_per_square_inch(area_of_pizza()) def area_of_pizza(): diameter = input("Enter the diameter of the pizza: ") radius = 1.0/2.0 * diameter a = pi * radius * radius return a def cost_per_square_inch(area): cost_of_pizza = input("Enter the cost of the pizza: ") cost = cost_of_pizza/area print "The cost per square inch of pizza is $%0.2f"%(cost) return main() :?: :o

Member Avatar
Member Avatar
+0 forum 2

I need help please to write this program. Numerologists claim to be able to determine a person's character traits based on the "numeric value" of a name. The value of a name is determined by summing up the vaules of the letters of the name where 'a' is 1, 'b' is 2, 'c' 3 etc., up to 'z' being 26. For example, the name "Zelle" would have the value 26+5+12+12+5=60. Write a program that calculates the numeric value of a single name provided as input. I am using my name Tamika. Then, I have to expand my solution to the …

Member Avatar
Member Avatar
+0 forum 16

:?: [CODE]#The number of lines, and the number of words. import string def main(): data = raw_input("Enter the path and name of your ") infile = file(data, 'r') data_file = infile.read() number_of_characters = len(data_file) print "The number of characters in your text is", number_of_characters list_of_words = string.split(data_file) number_of_words = len(list_of_words) print "The number of words in your text is", number_of_words infile.close() secondfile = file(data, 'r') line_of_text = secondfile.readlines() print line_of_text number_of_lines = len(lines_of_text) print "The number of lines in your text is" , number_of_lines infile.close() main()[/CODE]

Member Avatar
Member Avatar
+0 forum 2

[CODE]import sys def main(): usage = 'Usage: %s [options] <file name>\n' % sys.argv[0] options = 'Options:\n' options = options + ' -c, --chars print the character counts\n' options = options + ' -l, --lines print the newline counts\n' options = options + ' -w, --words print the word counts\n' usage = usage + options countChars = 0 countWords = 0 countLines = 0 main() and import sys def main(): filename = "test.txt" try: file = open(filename) except IOError, why: print 'Unable to open file.\n', why sys.exit(-1) charCount = lineCount = wordCount = 0 for line in file.xreadlines(): lineCount += 1 …

Member Avatar
+0 forum 0

import sys :o def main(): usage = 'Usage: %s [options] <file name>\n' % sys.argv[0] options = 'Options:\n' options = options + ' -c, --chars print the character counts\n' options = options + ' -l, --lines print the newline counts\n' options = options + ' -w, --words print the word counts\n' usage = usage + options countChars = 0 countWords = 0 countLines = 0 main()

Member Avatar
+0 forum 0

Word Count. A Common Utility On Unix/linux Systems Is A Small Program Called "wc." This Program Analyzes A File To Determine The Number Of Lines, Words, And Characters Contained Therein. Write A Version Of Wc. The Program Should Accept A File Name As Input And Than Print Three Numbers Showing The Count Of Lines, Words, And Characters In The File. I use Gettysburg address. [CODE]#The number of lines, and the number of words. import string def main(): data = raw_input("Enter the path and name of your ") infile = file(data, 'r') data_file = infile.read() number_of_characters = len(data_file) print "The number …

Member Avatar
+0 forum 0

AM I DOING THIS RIGHT, PLEASE HELP ME, SO ME MORE EXAMPLES ON HOW TO RIGHT IT :o C:\home\COP1000\a\3>python wc.py futval.py test.txt wc.py 22 103 699 futval.py 2 4 22 test.txt 52 223 1683 wc.py 76 330 2404 total

Member Avatar
Member Avatar
+0 forum 8

The End.