
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
Concept explainers
Question

Transcribed Image Text:Lab Activity 1.4B: Implementing User Input and Comments in a Script
Implementing User
+
main.py
>_ Terminal
1 # Write your code here
Input and Comments in
workspace $ |
a Script
Steps for Completion
</>
1. Go to your main.py file.
2. On the first line, add a docstring
explaining what your file does.
Then, assign a variable called
whole_num to the user's input
and cast it to an integer.
3. Next, print 10 underscores as the
top border of the table.
4. On the first line print your whole
number, then multiply your whole
number by multiples of 2's till 10
and print that out.
5. Finally, print 10 underscores again
for the bottom border of the table,
as in step 3.
6. Run the file by using the python3
main.py command.
M..
+
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 4 steps with 2 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
- I need the answer as soon as possiblearrow_forwardwrite the code to lookup, add and remove phoneentries from the phonebook text file . These are the code we use for the lookup, add and remove in the case statement.(Lookup)# Look someone up in the phone bookgrep $1 phonebook (add)echo "$1 $2" >> phonebooksort -o phonebook phonebook (Remove)grep -v "$1" phonebook > /tmp/phonebookmv /tmp/phonebook phonebook Write a complete Bash script which will accept up to three command-line arguments: the first one is either (lookup, add or remove), the second one is a name enclosed in single quotes and the third one (if doing an add) is a phone number enclosed in single quotes. Using a case statement to match on either lookup, add or remove, the script should then perform the requested operation. Again here, you should first check for null arguments before continuing with the rest of the script or requested operation. In addition, the person may not be in the phonebook for lookup or remove so, you need to account for this.arrow_forwardF/u from first question. Using nameRegExp as the regular expression, apply the test() method to the record.Lastname property (the last name stored in the employee record currently being examined in the forEach() loop). Store the results of the test() method in the foundName variable. Repeat the previous instructions in this step (starting with the Create the nameSearch... instruction and ending with the Using nameRegExp... instruction) to determine whether the employee's position property matches the value entered into the positionSearch input box on the web form. Store the value of the positionSearch input box in the positionSearch variable, the type of search in the positionSearchType variable, the regular expression in the positionRegExp variable, and the result of the regular expression test in the foundPosition variable. The final search condition in the web form allows the user to specify the employee's department. Users can leave the department blank (to match any department) or…arrow_forward
- Explain your approach to reading individual bytes from a file Some of the data may be encrypted by adding 5 to a byte. If encrypted data has a value between zero (0) and four (4), what will the decrypted value be? GUI Design. Create a wireframe(s) for the GUI (See CRUD table in homework assignment) Create an algorithm for the required program. Submit a flowchart (as an image filearrow_forwardSuppose we set the float property on a element. Which of the following statements are correct? (There are multiple correct options. Please select all of them.) The floated element is taken out of the normal flow. The elements after the floated element may overlap with the floated element. O The floated element no longer takes up the full width of the page. The elements after the floated element are moved up.arrow_forwardThank you very much for your help. I do need the btnSubmitPrice to work when clicked though, and via the assignment given, I cannot have an InputBox unless I am also allowed to have the btnSubmitPrice to be clicked when a user adds another item. When a user adds another item, the txtTotalSales and txtAverageSalePrice have to change as well and update with the new values. I do not know how to do this. I tried moving the text under btnSubmitPrice_Click instead of FrmMain_Load and it did not work.arrow_forward
- Create an anonymous block that a teacher can run to insert the student's grade on a particular assignment. Accept a NUMERIC_GRADE, CLASS_ASSESSMENT_ID, CLASS_ID and STU_ID. Use “today‟s” date for the DATE_TURNED_IN.arrow_forwardWrite the parameterList for a procedure that receives a Decimal value followed by the address of a Decimal variable. Use decSales and decBonus as the parameter names.arrow_forwardCreate a vector x which ranges in values from -180 to 180 in steps of 10. Then let y = x. These values are in degrees. Find a variable z = cosd(x)’*sind(y); Use surf to plot the surface plot, and label using commands xlabel, ylabel, and zlabel. Add a title.arrow_forward
- Create a UML diagram to document the Cuboid class. You can model this class after the Rectangle class we covered in this chapter. It should have 3 data fields: width, length, height. It should have 3 accessors and 3 mutators. It should have a method that calculates the volume of the cuboid. Save your file in MS Word or PDF format. Hint: In MS Word, you can create a table of 1 column and 3 rows. What is a cuboid? You can consider a cuboid as a cube whose length, width, and height may not be equal to each other.arrow_forwardDevelop the code that would be used in the main() function to test the class Cube. Create an object of Cube type using the constructor with argument, with the name of "Box", side length of 5, and color "Brown". Print out the information for the Cube. Change the name to BigBox, and increase the volume by 60%. Print the information for your Cube object one more time to verify the changes. Edit View Insert Format Tools 12pt ✓ Paragraph v Table BIU ✓ T² ✓arrow_forwardOne-page test plan Fill up the following template word document attached in the image, in order to make a one-page test plan for our parking management system. Use the class diagram as a reference. The template gives you an idea of what a test plan should contain.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