1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Artemon [7]
4 years ago
15

a) Before writing any code, you should go through a design process. Try to do so carefully – either follow a top-down approach,

a full bottom-up approach, or some combination. But, in any case, you should come up with a list of functions you plan to implement, each with its own clear purpose. a. Create a document that outlines all the functions you will create, including a purpose for each, stating what the function does, and any parameters it has. The purpose for each function can become its docstring b) After you have written a description of your program, including the planned functions, go ahead and write code for each function. Be sure to create a docstring for each function. Turn in your program and the design document you created beforehand. Challenge: See if you can create a program so that the lines are drawn
Computers and Technology
1 answer:
olga55 [171]4 years ago
3 0

Answer:

See Explaination

Explanation:

import turtle

def drawLine(x,y,height):

'''

method to draw a vertical line from x,y with given height

'''

turtle.up()

turtle.goto(x,y)

turtle.down()

turtle.goto(x,y-height)

def drawSet(x,y,height):

'''

method to draw a full set of tally marks

'''

temp = x

#drawing 5 vertical lines

for j in range(4):

drawLine(temp,y,height)

temp+=20

#drawing a line crossing all previous lines

turtle.up()

turtle.goto(x-5,y-height/2)

turtle.down()

turtle.goto(temp-15,y-height/4)

def drawPartialSet(x,y,height,count):

'''

method to draw an incomplete set (less than 5 tally marks)

'''

temp = x

for j in range(count):

drawLine(temp,y,height)

temp+=20

#getting number

num=int(input('Enter the number: '))

#finding number of complete sets

sets=num//5

#finding number of incomplete sets

extra=num%5

#setting up turtle

turtle.setup(width=500,height=500)

turtle.pensize(5)

turtle.speed(0) #max speed

#starting x, y coordinates

x=-240

y=250

line_height=80 #height of one tally line

#drawing all complete sets

for i in range(1,sets+1):

drawSet(x,y,line_height)

x+=line_height

if i%5==0:

#moving to next line after every 5 sets

x=-240

y-=line_height+50

#drawing extra sets if exist

if extra>0:

drawPartialSet(x,y,line_height,extra)

turtle.ht() #hide turtle

turtle.done() #finish drawing

You might be interested in
Why AI strategy is important?
Nezavi [6.7K]

AI strategy is important because it will help you to focus on your core business objectives and prioritize ways that AI can help deliver those business goals.

Business operations become more consistent, swift, and scalable thanks to automation, which also reduces costs. Some Accenture clients report time savings of up to 70%. But what makes it even more intriguing is its capacity to spur economic expansion. When compared to businesses that are still in the pilot stage, those that scale successfully receive a 3X return on their AI investments. It makes sense that 84 percent of C-suite executives think they need to use AI to meet their growth goals. With a steady stream of insights to fuel innovation and competitive advantage in a world of perpetual upheaval, AI enables firms to respond quickly. Scaling up it can make it a vital facilitator of your strategic aims and even a necessity for survival.

To learn more about Business click here:

brainly.com/question/15826771

#SPJ4

7 0
1 year ago
The audience for your security assessment report (SAR) is the leadership of your company, which is made up of technical and nont
DaniilM [7]

Answer:

<em>The audience for your security assessment report (SAR) is the leadership of your company, which is made up of technical and nontechnical staff. Some of your audience will be unfamiliar with operating systems. Therefore, you will begin your report with a brief explanation of OS fundamentals and the types of information systems. </em>

Read the following resources that provide essential information you need to know before creating a thorough and accurate OS explanation:

  • Operating systems fundamentals

An operating system is the fundamental software which is needed to run a hardware every electronic hardware need an instruction set to make the hardware working. We can say that operating system is communication medium between the user as well other software to the hardware. Hardware don’t know the language of user and user don’t know the language of hardware how to give instructions to the hardware to perform some specific task so Operating system do this functionality to meet the needs of both user and hardware.

  •  The applications of the OS

Applications of operating system are following  

  • Security

Operating system make sure that all the user data is secured and an unauthorize source cannot access the computer to make any changes in user data or any other program.

  • Communication b/w application software and user

The other application of operating system is that it provides a communication channel b/w user and other application program by using some sort of compilers, interpreter to meet the user needs.  

  • File Management

Operating system also provide an essential feature of managing files. It provides complete directory and easy navigation of files and their usage access. It keeps track that where the information is stored and all other details that thing is known as file system.

  • Device Management  

Operating system also keep track of all the devices connected to it install their respective device drivers if available and make them available. OS do communication with the devices connected to it and then perform instructions via hardware and allocate which instruction set should be assign to which device.

  • Processor Management

OS control the multitasking feature of the processor. It makes an order of list of all the tasks which need to be done on processor and assign them according to there priority and also manage for how much time that task is assigned to the processor.

  • Error Detecting

OS keep track of all the information of the health of the computer and detect errors if available to avoid malfunctioning of the computer.

  • The Embedded OS

Embedded operating system are specially designed operating system which are used to for special purpose hardware/embedded system. These OS are more efficient than the simple OS and have limited features. They are designed to be compact and resource efficient. It perform real time operations and very responsive to the instructions. In our daily life ATM machine have an embedded OS, smart phones also have and in medical like MRI machine.  

  • Information system architecture

The information system is defined as formal definition of the business processes, product technologies and working system structure and other technical framework for a business organization. Information system architecture have four layers “Business Process Architecture”, “System Architecture”, “Technical Architecture” and “Product Architecture”.

Information system architecture consist of the software and hardware used to meet the consumer needs. It consists of a documented detail of software hardware used and networked and future plan to add some other features if needed to upgrade or change the system.

  • Cloud computing

Cloud computing is defined as on demand availability of computer resources over the network/internet like storage, software or processing without using the current system all the work is done on a system far away which is available on internet and can be accessed from anywhere. For such services there are data centers which store data on servers to make them available to there user.  

Cloud computing have some types like SaaS (Software as service), Storage, Database, Security, Platform as service.

4 0
3 years ago
What information is displayed in the message header of a received message? Check all that apply.
Nesterboy [21]
The answers are:


-the message subject
-the name of the sender
-the names of recipients
-the time and date the message was sent
8 0
3 years ago
Read 2 more answers
How do you implement instruction level parallelism
netineya [11]

Answer:

To obtain substantial performance enhancements, we must exploit ILP across multiple basic blocks.

Explanation:

8 0
3 years ago
You want to search the web for information on the movie Captain America: Civil War. What would be the best way to enter the key
Digiron [165]

Answer:

Option C i.e., Captain America: Civil War.

Explanation:

When the user required the data or information of the movie Captain America: Civil War then, the following option is the best format to search for the information of the movie because if any user search anything in the proper format then they gets better results related to the following search and if the user enters improperly then they also get the information but it takes some time to satisfy you.

7 0
3 years ago
Other questions:
  • What does prioritization help you to do?
    12·2 answers
  • Adam has decided to add a table in a Word doc to organize the information better.
    10·1 answer
  • If you were practicing keyboarding and the exercise contained the letters, q, o, e, p, r, and t, what section of the keyboard ar
    12·1 answer
  • What is not true about field properties in Access?
    13·1 answer
  • Write a qbasic program to display integer numbers 1 to 100 using the for next loop<br>​
    9·1 answer
  • I think i have a virus on my computer what am i supposed to do
    10·1 answer
  • 3) Given that HSI (360, 0.000, 1.000), What is the equivalent RGB<br> color?
    12·1 answer
  • if you put a drone on the charger at 8:12 and take a break at 10:03 how long is it on the charger. for
    7·1 answer
  • What is the best method for modern businesses to authorize the use of workplace resources to its employees? a. assign them a use
    9·1 answer
  • 13. You're doing research for a paper. When would you use an indirect citation?
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!