Add a new function called print box to your program

Assignment Help Python Programming
Reference no: EM132355638

Question

Add a new function called print_box to your program. print_box will manage the other three functions by calling:

1. get_size to get a number from the user and

2. get_char to get a character from the user and then use those values as arguments to call:

3. print_line multiple times to print a properly sized hollow box drawn with the character selected.

You already have the first 3 functions written by you , here they are:

def print_line(outer, mid, dom):

print(outer, end ="")

for index in range(dom-2):

print(mid, end = "")

print(outer)

return None

def get_size(number):

number=int(input("Enter a number between 3 and 8: "))

while (number < 3) or (number > 8 ):

number=int(input("tInvalid entry - try again: "))

return number

def get_char(userInput):

while True:

userInput = input("enter only one character: ")

while len(userInput) != 1:

userInput=input("Invalid entry - try again: ")

return userInput

You was thinking it was going to be something like def print_box(get_char,get_size,print_line) but you really don't know where to go on afterwards.

Not really fond of calling a previous functions to another function.

Reference no: EM132355638

Questions Cloud

How the developmental needs will be met in each activity : In a 2-3 page paper written in APA format using proper spelling/grammar, compare and contrast two (2) integrated curriculums. Be sure to include the components.
Initial investment at various sale prices : Edwards Manufacturing Company (EMC) is considering replacing one machine with another. The old machine was purchased 3 years ago for an installed cost
Analyze two ways that media affect culture and society : Analyze two ways that media affect culture and society. Identify at least one positive and one negative implication arising from technology's effect on society.
What is systematic risk vs nonsystematic risk : What is systematic risk vs. nonsystematic risk? Should both of these risks be compensated with higher returns? Why or Why not?
Add a new function called print box to your program : Add a new function called print_box to your program. print_box will manage the other three functions by calling et_size to get a number from the user.
Cash-accounts receivable-inventories and accounts payable : Assume that Cash, Accounts Receivable, Inventories, and Accounts Payable vary directly with sales. Net Fixed Assets must increase by $175,000
What must be the new value for the dividend growth : What must be the new value for the dividend growth to justify entering the new, risky markets and to keep the stock price from decreasing?
Compare standards-based technologies used in various network : MN603 Wireless Networks and Security Assignment - Evaluation of 5G Network and the Security, Melbourne Institute of Technology, Australia
What is the net hedged selling price per bushel of corn : March 13, Mr. Smith planted corn and sold December corn at $2.15/bushel. On Nov. 15 (after harvest) he offset the short position by buying back December

Reviews

Write a Review

Python Programming Questions & Answers

  Write an application that allows user to read account number

Write a Python application that allows the user to read, validate, store, display, sort and search the account number and balance for N bank customers.

  Asks the user for the number of males and number of females

Write a program that asks the user for the number of males and the number of females registered in a class using two separate inputs.

  Determine an athletes final score for the event

To determine an athlete's final score for the event, the highest and lowest judges' scores are discarded and then the average of the rest of the scores.

  Code a console-based program in python

CP1404/CP5632 2016 SP2/22/52 Assignment 1 - Shopping List 1.0. You are to plan and then code a console-based program in Python 3, as described in the following information and sample output. This assignment will help you build skills using selectio..

  Program using a loop that displays the projected semester

Write your program using a loop that displays the projected semester tuition for the next 7 years - You should then display the actual year

  Write a program that will utilize a text input file

Write a program that will utilize a text input file and compute the listed specifications. The text input file "data.txt" is listed below. Build your program.

  Create a custom python module

Write a program named program51.py that defines a value-returning function named cuber that returns both the surface area and volume of a cube. A cube is a rectangular prism with all sides equal.

  Accept data for an id number of the dogs owner

The Barking Lot is a dog day care center. Design the pseudocode for a program that accepts data for an ID number of the dog's owner, and the name.

  What are the differences between python and c++

What are the differences between Python and C++? Other than the fact that C++ is object oriented programming and Python is not.

  Python project description

Grep all required data listed from the 1) to 7) and construct required run file for each step (pnr, drc, lvs, syn, pwr)based upon the choice of technology and process when executing your script.

  How complex programming problems are solved in real-life

HS1031 - Introduction to Programming - Holmes Institute - Analyse programming problems and design and implement solutions as part of a developer team

  Define three types of programming errors

Define three types of programming errors and explain with examples

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd