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
SCORPION-xisa [38]
3 years ago
12

Write a Python program to do the following:

Computers and Technology
1 answer:
viktelen [127]3 years ago
5 0

Answer:

(b)Tb = Ta[:3]

(c)Tc = Ta[-3:]

(d)Td = Tb + Tc

Explanation:

In order to generate random number in python, we need to first import random() function from random module

This function will generate a float number between 0 and 1, to make it between 1 and 15, we add 1 to the multiplication between the random number and the range differences

(a)

from random import random()

L = []

for i in range(10):

    L.append(1 + round(random()*14))

Ta = tuple(L)

(b) To copy the first 3 elements of tuple Ta, we simply go from : to 3

Tb = Ta[:3]

(c) To copy the last 3 elements of tuple Ta, we simply go from -3 to :

Tc = Ta[-3:]

(d) To concatenate the 2 tuples, we simply add them up

Td = Tb + Tc

You might be interested in
Why is the radial gradient type a good choice for the grapes?
Grace [21]
<span>when you use the radial gradient fill it gives it a look like a shine on them. </span>
3 0
3 years ago
Read 2 more answers
You may have come across websites that not only ask you for a username and password, but then ask you to answer pre-selected per
raketka [301]

Answer:

The questions are used to secure and identify you furthermore. Answering personal questions that only you can answer will deter someone from hacking into your account that easily.

Explanation:

5 0
3 years ago
What is the influence of new technology on society?
sweet [91]

Answer:

E. New technology is beneficial but can also be used in a detrimental way.

Explanation:

New technology such as cryptocurrency (powered by blockchain technology) can be regarded as a welcome development that has benefited the society in so many good ways. However, cryptocurrency as a new technology also has disadvantages it presents to the society. One of such negative influence cryptocurrency has is that it can be used for illicit activities such as money laundering, funding terrorism and so on.

So, in summary, we can conclude that:

"New technology is beneficial but can also be used in a detrimental way."

5 0
2 years ago
What is composition
Dmitry [639]
The term composition in simple words is “putting together”. It is a thing composed of various elements.
4 0
3 years ago
A single digit of 1 or 0 in the binary code is called a _____________.
maksim [4K]
A single digit of 1 or 0 in the binary code is called a bit. It is the smallest possible unit of data for a computer. The only possible values for a bit is either zero or one. These values decide which paths the current can flow and which paths are blocked. Bits can represent two states namely, true and false or low and high.
5 0
3 years ago
Other questions:
  • Net Worth is equal to assets minus liabilities. Which event will have the greatest impact (positive or negative) on one's net wo
    5·1 answer
  • 1. Which of the following options will allow you to insert a quick table? (1 point) Insert ribbon &gt; Shapes drop-down menu
    6·2 answers
  • Write a client program that writes a struct with a privateFIFO name (call it FIFO_XXXX, where XXXX is the pid that you got from
    11·1 answer
  • Which principle of CSR requires that a business state facts fully and accurately?
    8·1 answer
  • You are required to design a 4-bit even up-counter using D flip flop by converting combinational circuit to sequential circuit.
    15·1 answer
  • Is a router on the local network that is used to deliver packets to a remote network?
    15·1 answer
  • What process periodically validates a user’s account, access control, and membership role on inclusion in a specific group?a. Re
    12·1 answer
  • What is meant by check digit
    10·1 answer
  • What is the best way to improve the following code fragment? if ((counter % 10) == 0) { System.out.println("Counter is divisible
    11·1 answer
  • In series connection, if we have two symmetric devices connected with 10 V battery, voltage for each device will be.. .5V or 10V
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!