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
Vladimir79 [104]
1 year ago
13

Write the following short piece of code in python:

Computers and Technology
1 answer:
elena55 [62]1 year ago
5 0

Programmers refer to a brief section of reusable source code, machine code, or text as a “snippet.” These are typically explicitly defined operational units that are integrated into bigger programming modules.

<h3>What are the short piece of code in python?</h3>

Guido van Rossum created Python, an interpreted, object-oriented, high-level programming language with dynamic semantics. It was first made available in 1991.

The syntax of Python is straightforward and resembles that of English. Python's syntax differs from various other programming languages in that it enables programmers to construct applications with fewer lines of code.

Therefore, Python operates on an interpreter system, allowing for the immediate execution of written code. As a result, prototyping can proceed quickly.

Learn more about python here:

brainly.com/question/10718830

#SPJ1

You might be interested in
Why are video games interesting?
TiliK225 [7]
Because there fun and helps boys get together or to get ur mind off of stuff
5 0
3 years ago
Which best describes a paraphrase?
Anna11 [10]
To rewrite something , but in your own words
4 0
3 years ago
Write a function (named n_pointed_star) to make the turtle draw an n-pointed star. The function should return nothing, and accep
Andreyy89

Answer:

import sys

import turtle

import random

def n_pointed_star(total_points):

if total_points <= 4:

 raise ValueError('Not enough total_points')

area = 150

for coprime in range(total_points//2, 1, -1):

 if greatest_common_divisor(total_points, coprime) == 1:

  start = turtle.position()

  for _ in range(total_points):

   turtle.forward(area)

   turtle.left(360.0 / total_points * coprime)

  turtle.setposition(start)

  return

def greatest_common_divisor(a, b):

while b != 0:

 a, b = b, a % b

return a

   

turtle.reset()

n_pointed_star(5)

Explanation:

  • Inside the n_pointed_star function, check whether the total no. of points are less than or equal to 4 and then throw an exception.
  • Loop through the total_points variable and check whether the result  from greatest_common_divisor is equal to 1 or not and then set the starting position of turtle and move it.
  • Create the greatest_common_divisor which takes two parameters a and b to find the GCD.
  • Finally reset the turtle and call the n_pointed_star function.
8 0
3 years ago
Which of the follow is the best technique to determine how many menu items are needed and how to structure the menus and sub men
AnnZ [28]

Answer:

c. ​Group use cases by actor.

Explanation:

A use case is used to describe interaction between systems and users to achieve a goal. Mostly, a list of possible interaction between the system and the user is identified. The user can be a single person or a group. By using use case, the requirement of a systems is identified from a users point of view.

8 0
3 years ago
The term “digital divide” refers to the gap between
juin [17]
It is the gap between demographics and regions.
4 0
3 years ago
Other questions:
  • What is the value of the variable phones after the execution of the following code? phones = {'John': '5555555', 'Julie' : '7777
    6·1 answer
  • In excel what does sidney need to consider when creating formulas
    7·1 answer
  • My 2 in 1 laptop/tablet
    13·1 answer
  • Error messages begin with the ____ symbol.
    6·2 answers
  • Which type of computing device is best suited to having a digital pen as an input device?
    9·1 answer
  • 1. What makes discrimination different from harassment? (Don't give me definitions.)
    5·1 answer
  • Write the definition of a function isSenior, that receives an integer parameter and returns true if the parameter's value is gre
    13·1 answer
  • Please write a Java program to read movies.txt file. (It is in Modules under Chapter Code) Create your own movies.ser file from
    14·1 answer
  • Fiona is creating a presentation with PowerPoint Online about how pencils are made. She would like to type an explanation about
    5·1 answer
  • Functions are used to _________
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!