
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
write basic python code adn create a list
list_append: adds a new element to the end of the list.
then print
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 with 1 images

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
- PYTHON: NEED CORRECTION 11) vector_add, takes two lists of the same size and adds the elements together. 12) Do subtraction, division, and multiplication for number 11. def vector_add(numList1, numList2): numList.append(numList1, numList2) return(numList) def sub_div_mult(numList): numList=list_sub(numList, 2) numList=list_divide(numList,2) numList=list_multuply(numList2) return numListarrow_forward1. 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_forward#include <iostream>// ask user how long is the list// modify code to ask user what is the starting value of the list// ask user how much to add to each list elementusing namespace std; int main(){int n[10]; // list of length 10n[0]=23;for (int i=1; i<=9; i++)n[i]=n[i-1] + 5;for (int j=0; j<=9; j++)cout<<n[j]<<" "; system("PAUSE");return 0;}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_forwardPython Suppose a list empList consists of sublists with [id,fullName] empList = [ ] Ask the user to enter their ID and name Put that information into empList Ask the user to enter a name Print the ID of the person with that name OR “Name not found” if that name isn’t in empList. Ask the user to enter a IDRemove that entry from empList OR print “No delete – name not found” if the ID isn’t there. Ask the user to enter an ID.If empList has an entry with that ID, ask the user for a newFullName and replace the existing entry in empList Print the entries in List, one per line so that the output looks like this:ID Name123 Joe Brown235 Molly Smith Please use format to do this printingarrow_forwardplease code in python Create a program that uses list comprehension to take the following list and create a new list out of elements that have at least one ‘a’ character. Print out the new list.[‘Ford’, ‘Mazda’, ‘BMW’, ‘Nissan’, ‘Hyundai’, ‘Tesla’, ‘Honda’, ‘Subaru’, ‘Kia’, ‘Audi’, ‘Fiat’, ‘Bentley’, ‘Toyota’, ‘Lexus’]arrow_forward
- python 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_forwardWrite the code (Python) necessary to sum the elements of an list named: myLstAssume the list myLst has already been created and initializedAssume the constant SIZE has already been created and initialized with the number of elements in the myLst list.Complete the following tasks:Using a loop of your choice,OOutput each element of the list myLst•Calculate the sum of the elements of the list myLst. Create any variables necessary to complete this task.Output the string "Sum is: " followed by the actual sumNote: Only submit the code necessary to complete this task. Do not create myLst or SIZE, as you are to assume they have already beencreated and assigned values.arrow_forwardO b. Remove the O. Remove the second element in the list O d. Remove the element before the last element in the list QUESTION 6 The following code inserts an element at the beginning of the list public void insertBegin(T e) { Node temp = new Node (e); head = temp; temp.Next = head; size++; } O True O False QUESTION 7 what does the following code do?arrow_forward
- using python in google colabarrow_forwardList comprehension. Write a Python program called list_comprehension.py that contains remove_list = [1,5,7, 9]. Create a list that is initialized by a list comprehension that contains all numbers from 0-10, but none of the numbers on the remove_list. Do not use for loop. Print the contents of the list.arrow_forwardNeed help with this short python questionarrow_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