
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
Can you use Python
Thanks

Transcribed Image Text:Please write a function named line, which takes two arguments: an integer and a string.
The function prints out a line of text, the length of which is specified by the first argument.
The character used to draw the line should be the first character in the second argument.
If the second argument is an empty string, the line should consist of stars.
An example of expected behaviour:
line (7, "%")
line (10, "LOL")
line (3, "")
0/0/0/0/0/0/0/
10/0/0/0/0%%
LLLLLLLLLL
***
Sample output
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

Follow-up Questions
Read through expert solutions to related follow-up questions below.
Follow-up Question
Hello...Its not correct...

Transcribed Image Text:TESTS FAILED
Send solution to server
Need help?
✔ Show all
80 %
FAIL:
LineTest:
test_0_main_program_ok
The code for testing the functions should be
placed inside
if _name_ ==
"__main__":
block. The following row should be moved:
line (7, "%")
PASS:
Line Test: test_1_function_exists
PASS:
Line Test:
test_2_function_can_be_called_with_empty_string
X
Solution
by Bartleby Expert
Follow-up Questions
Read through expert solutions to related follow-up questions below.
Follow-up Question
Hello...Its not correct...

Transcribed Image Text:TESTS FAILED
Send solution to server
Need help?
✔ Show all
80 %
FAIL:
LineTest:
test_0_main_program_ok
The code for testing the functions should be
placed inside
if _name_ ==
"__main__":
block. The following row should be moved:
line (7, "%")
PASS:
Line Test: test_1_function_exists
PASS:
Line Test:
test_2_function_can_be_called_with_empty_string
X
Solution
by Bartleby Expert
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
- Using a programming language as a tool to solve problems is standard practise in the field of computer science. Just what do you imply when you say a language may be used for almost anything?arrow_forwardProgramming languages vary. Summarize each.arrow_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
- How well known is it that Ada Lovelace contributed to the area of computer science with her work?arrow_forwardWhat are the benefits of learning a variety of programming languages? This programming language has a number of different levels, which one is regarded the most sophisticated one? Why, therefore, is this the case? Could you perhaps comment on the reasoning for your conclusion?arrow_forwardWhat is it that you've discovered about Python and other programming languages over the course of the last several weeks that has aroused your interest?arrow_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