
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
Question
Q1.
- Write a pseudocode to find the average value in a list has 10 integer values.
- Write a pseudocode to find the summation of this sequence:
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution
Trending nowThis is a popular solution!
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
- 1. List Collection Complete the program that will reverse each word on the given string E fun main() { print("Enter a string: ") val str = rdLn() val words str.split("") val newStr wordReverse (words) println("new string length: ${newStr.length}") println(newStr) } fun wordReverse (words: List): String{ //List Manipulation Code Here } private fun rdLn() = readLine()!! private fun rdInt() = rdLn().toInt () Enter a string: the quick brown fox new string length: 19 eht kciuq nworb xof Enter a string: there are 10 boys new string length: 17 ereht era 01 syob Enter a string: red blue @#$% yellow new string length: 20 der eulb %$#@ wolley Example output 1: Example output 2: Example output 3:arrow_forward121: Write a Python program that prompts the user to enter 3 numbers, store these numbers in a list, and then calculate the average of the numbers stored in the list. Your average calcualtion cose should work for any number of items in the list (Hint: use the len() method)arrow_forwardThe chapter is nested lists Create code in python using for loops Thanks!arrow_forward
- Assume my_list is a list of integer values. Write a list comprehension statement in Python that creates a second list named plus_one. The plus_one list should contain the values of my_list with 1 added to each value. For example, if my_list contains the following values: [10, 20, 30, 40, 50] The plus_one list should contain these values: [11, 21, 31, 41, 51]arrow_forwardWhen using a for-loop to modify a list, you always have to make a copy of the list. (a) True (b) False Thank you!arrow_forwardArray List: Write a program that reads in words and prints them out in reverse order. Complete this code.arrow_forward
- A list called parts has already been created and filled with data. It has a length of 5. Write a for loop that prints each value in this list.arrow_forwardLists and strings: Perform the following using the list and string defined below: Mylist = [“orange”,”banana”,”apple”,”grape”] Mystring = “314-800-2346” What does Mylist[2] equal? What does Mystring[2] equal? What does the len(Mylist) equal? What does len(Mystring) equal? Write a for loop that will display the strings in Mylist from last to first. Write a line of code that appends “pear” to Mylistarrow_forwardIn NumPy write a program to generate a list that contain 5 random integers in the range 1 to 100. Display the list in the output.arrow_forward
- Assume that the variable data refers to the list [5, 3, 7]. Write the expressions that perform the following tasks: a. Replace the value at position o in data with that value's negation. b. Add the value 10 to the end of data. c. Insert the value 22 at position 2 in data. d. Remove the value at position 1 in data. e. Add the values in the list newData to the end of data. f. Locate the index of the value 7 in data, safely. g. Sort the values in data.arrow_forwardpython LAB: Subtracting list elements from max When analyzing data sets, such as data for human heights or for human weights, a common step is to adjust the data. This can be done by normalizing to values between 0 and 1, or throwing away outliers. Write a program that adjusts a list of values by subtracting each value from the maximum value in the list. The input begins with an integer indicating the number of integers that follow.arrow_forwardPython Smallest and largest numbers in a list Write a program that reads a list of integers into a list as long as the integers are greater than zero, then outputs the smallest and largest integers in the list. Ex: If the input is: 10 5 3 21 2 -6 the output is: 2 and 21 You can assume that the list of integers will have at least 2 values.arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
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