Ace - AI Tutor
Ask Our Educators
Textbooks
My Library
Flashcards
Scribe - AI Notes
Notes & Exams
Download App
నందమూరి తారక రామారావు అభిమాని

నందమూరి తారక రామారావు అ.

Divider

Viewed Questions

(Process scores in a text file) Suppose that a text file contains an unspecified number of scores. Write a program that reads the scores from the file and displays their total and average. Scores are separated by blanks. Your program should prompt the user to enter a filename. Here is a sample run:
Enter a filename: scores.txt There are 70 scores The total is 800 The average is 33.33

(Process scores in a text file) Suppose that a text file contains an unspecified number of scores. Write a program that reads the scores from the file and displays their total and average. Scores are separated by blanks. Your program should prompt the user to enter a filename. Here is a sample run: Enter a filename: scores.txt There are 70 scores The total is 800 The average is 33.33

Introduction to Programming Using Python

(Display three different messages) Write a program that displays Wel come to Python, Wel come to Computer Science, and Programming is fun.

(Display three different messages) Write a program that displays Wel come to Python, Wel come to Computer Science, and Programming is fun.

Introduction to Programming Using Python

(Convert Celsius to Fahrenheit) Write a program that reads a Celsius degree from the console and converts it to Fahrenheit and displays the result. The formula for the conversion is as follows:
fahrenheit $=(9 / 5) *$ celsius +32
Here is a sample run of the program:
Enter a degree in Celsius: 43 43 Celsius is 109.4 Fahrenheit

(Convert Celsius to Fahrenheit) Write a program that reads a Celsius degree from the console and converts it to Fahrenheit and displays the result. The formula for the conversion is as follows: fahrenheit $=(9 / 5) *$ celsius +32 Here is a sample run of the program: Enter a degree in Celsius: 43 43 Celsius is 109.4 Fahrenheit

Introduction to Programming Using Python

(Check SSN) Write a program that prompts the user to enter a Social Security number in the format didd-dd-dddd, where $d$ is a digit. The program displays Val id SSN for a correct Social Security number or Inval id SSN otherwise.

(Check SSN) Write a program that prompts the user to enter a Social Security number in the format didd-dd-dddd, where $d$ is a digit. The program displays Val id SSN for a correct Social Security number or Inval id SSN otherwise.

Introduction to Programming Using Python

Questions asked

INSTANT ANSWER

Learning outcome of the Assignment: Recursion Problem 1:(5 points) a) How does tail recursion differ from non-tail recursion? Explain. b) What is the purpose of using helper functions in recursion programming? Explain. Problem 2: (10 points) a) Write a test program that prompts the user to enter a binary string and displays its decimal equivalent using recursion. Implement a helper function for binary to decimal conversion. def binaryToDecimal (binaryString) : def binaryToDecimalHelper(binarystring, low, high): Sample Run Enter a binary number: 1010111101 1010111101 is decimal 701 b) Is the recursive function from part(a) a tail-recursive function? Provide a justification for your answer. c) Provide a sequence of diagrams illustrating the recursive calls made by the function. Annotate each diagram with the relevant array, target element at each recursive step.| Problem 3: (5 points) Write a recursive function to print all the permutations of a string using the recursive helper function. For example, for the string abc, the permutation is: abc acb bac bca cab cba def displayPermuation(s): def displayPermuationHelper(s1, s2): Code: (Copy and Paste Source Code here. Format your code using the font: Courier New and font size: 10pts) Test: (Attach test cases and test results in snippets)

View Answer
divider
INSTANT ANSWER

personal expense tracker using python and Django

View Answer
divider
INSTANT ANSWER

1) Name three actions you can perform using SQL. 2) What does the DDL allow us to do? What does access control do? 3) Using SQL, create a table called Employees with 2 attributes: an integer SSN and a varchar NAME. 4) What are the foreign keys in the enr table? 5) List five data types used in SQL. 6) What is a base table? 7) What is the format of the SQL command that removes a table from the database? 8) Give two examples of statements in the Create Table command that check for referential integrity violations. 9) List two integrity constraints that the Alter Table command can violate. 10) Earlier in the course we talked about database schema and database instances. Does the DDL implement either one of these? If so, which one?

View Answer
divider
INSTANT ANSWER

Consider the following relational database schema: employee (employee-name, employee-id, street, e-city) works(employee-id, company-id, salary) company (company-name, company-id, c-city) manages(employee-id, manager-id) Specify the following queries on this database schema using the relational operators we discussed in class. Write your answers on a separate sheet of paper in the order that they are specified below. 1. Retrieve the name and address of employees who work for First Bank Corporation. 2. Retrieve the name, street address, and city of residence of all employees who work for Thrifty Industries and earn more than \( \$ 10,000 \) per year. 3. Retrieve the name of all employees who live in the same city as the company for which they work. 4. Retrieve the name of all employees who live on the same street and in the same city as do their managers. 5. Retrieve the name of all employees who do not work for First Bank Corporation. 6. Retrieve the name of all employees who earn more than every employee of Small Bank Corporation. 7. (Assume that companies may be located in several cities) Retrieve all companies located in every city in which Thrifty Industries is located. 8. For each company, find the average salary of employees working for that company. 9. For each city, find the number of employees who work for at least one company in that city.

View Answer
divider