
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
** CodeHS AP CSP 7.2.9 Top Movies **
PLEASE ANSWER THIS USING PYTHON!
"Create a" list of your favorite 4 movies. Print out the 0th element in the list. Now set the 0th element to be “Star Wars” and try printing it out again.
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 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
- In Python, Create a 2 ×4 Numpy array filled with zeros. Using a nested for loop enter int grade valuesto all elements of the array (assume the first row is Fall Semester and the second row is SpringSemester).arrow_forwardWrite a single line of code to generate a random number from the following set: (hint look for the pattern and the range). 6, 11, 16, 21, 26arrow_forwardEvery two years, the volume of digital data is said to double. Talk about four effects and problems caused by the rapid growth of data.arrow_forward
- text file 80 1 2 3 100 100 100 1001 0 2 100 3 4 100 1002 2 0 4 4 100 5 1003 100 4 0 100 100 4 100100 3 4 100 0 3 3 3100 4 100 100 3 0 100 1100 100 5 4 3 100 0 2100 100 100 100 3 1 2 0 My code below. I am getting an error when trying to create my adjacency matrix. i dont know what i am doing wrong def readMatrix(inputfilename): ''' Returns a two-dimentional array created from the data in the given file. Pre: 'inputfilename' is the name of a text file whose first row contains the number of vertices in a graph and whose subsequent rows contain the rows of the adjacency matrix of the graph. ''' # Open the file f = open(inputfilename, 'r') # Read the number of vertices from the first line of the file n = int(f.readline().strip()) # Read the rest of the file stripping off the newline characters and splitting it into # a list of intger values rest = f.read().strip().split() # Create the adjacency matrix adjMat = []…arrow_forwardneed help with python.. please paste ur working and indented code here Write one line of code for each of the following: 1) Create a list named fruits with the following items:"apple", "cherry", "pear" 2) Add "orange" at the end of the fruits list. 3) Change the value from "cherry" to "banana", in the fruits list. 4) Use the insert method to add "lemon" as the third item in the fruits list. 5) Use slicing to print the third, fourth, and fifth items in the current fruits list. 6) Use the del function to remove "banana" from the current fruits list. 7) Use negative indexing to print "pear" in the current fruits list.arrow_forwardComplete the rotate_text() function that takes 2 parameters, a string data and an integer n. If n is positive, then the function will shift all the characters in data forward by n positions, with characters at the end of the string being moved to the start of the string. If n is 0 then the text remains the same. For example: rotate_text('abcde', rotate_text('abcde', rotate_text('abcde', 1) would return the string 'eabcd' 3) would return the string 'cdeab' 5) would return the string 'abcde' rotate_text('abcde', 6) would return the string 'eabcd' ... and so on. If n is negative, then the function will shift the characters in data backward by n positions, with characters at the start of the string being moved to the end of the string. For example: rotate text('abcde', -1) would return the string 'bcdea'arrow_forward
- A fridge should keep food at a temperature between 0 and 5 degrees Celsius (inclusive). Assume you have a non-empty list of integer and/or floating-point numbers representing the hourly temperature readings, also in degrees Celsius. Print the list of all temperatures that are outside the allowed range. The answer box contains Pattern 2.3 (List filtering) as comments, to get you started. Write the corresponding code beneath each comment. Use variable names appropriate to the problem at hand instead of the generic names used by the pattern. The first step has been done for you. It uses an operation we defined for you, get_input(), to obtain the list used by each test. The list from get_input() is assigned to temperatures (which corresponds with the input_list in the pattern). You do not have to understand or work out how get_input() works. For example: Input Result [4.7] [] [5.2] [5.2] [0, 3, 5, 7, 5, 4, 2, 0, -0.2] [7, -0.2] Answer: (penalty regime: 0 %) Reset answer 1 #initialise the…arrow_forwardUsing Python Spark Read each text files that are provided and convert each words in the file to lower case. (I cannot upload the text files so if you find a folder online with 15 text documents that would work) Create a list with words from each text files. Remove stop words from each list and get the final list of words for each text files. (The list of stop words are provided in stopwords.txt)arrow_forwardThis is the questions and answers for the first parts Questions: Using Python Create a list with building names 'Richard Weeks Hall’, ’Busch Student Center’, ‘Environmental & Natural Resource Sciences Building’ Replace the list to 'Richard Weeks’, ’Busch Student Center’, ‘Environmental & Natural Resource Sciences Bldg’ Code for the total points of each name by setting• The base points as the length of the building name.• The bonus points: as ‘Bldg’ being equal to 10 points Meaning, 'Academic Building' which would be 'Academic Bldg' would have a base point of 13 and a bonus point of 10 for a total of 23. #1 Create a list of buildings Buildings=[ 'Richard Weeks Hall', 'Busch Student Center', 'Environmental & Natural Resource Sciences Building' ] print("The Building names in the list are: ") print(Buildings) #2 Process the name of each building res = [sub.replace(' Hall', '').replace('Building', 'Bldg') for sub in Buildings] print("The names have been replaced to :…arrow_forward
- 1. Create a data list, ‘n’ consisting of the numbers: 5, 9, 14, 28, 31, 1, 31, 14, 38, 31 Use R – code to find the following:a. Find the mean using a different method that does not involve the mean () function. b. Find the median. c. Create a frequency table of the data list and then give the mode. d. Create a bar graph of the data list. NOTE:you have to do the manual methodarrow_forwardggplot(data, aes(Month,Temp, fill = Month)) + ggtitle("Varying Temperatures thoughout the Months") + xlab("Months") + ylab("Temperatures") + geom_boxplot() How do I reorder/arrange the boxplot from least to most(lowest to Highest) using Rarrow_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