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
The registrar does all of the following except:
Yuliya22 [10]
The answer is B. Issue report cards of grades.
3 0
3 years ago
Read 2 more answers
How many bits would be needed if there is 15 students in the class
Anni [7]

Answer:

Bits??

Explanation:

8 0
3 years ago
What
AveGali [126]
Answer: Computers and cellular devices
Reason: Everyone every day watched entertainment with commercials of the internet all day on these technologies and proven by 92 percent. Make this brainly answer for everyone else that needs this. Hope this helps:)
8 0
2 years ago
One should take to prevent ulcers in the gastrointestinal tract?​
Andrew [12]

Answer:

food??

Explanation:

if you don't eat food, the acid produced in the stomach will break down the stomach walls instead of the food, giving you ulcers

7 0
3 years ago
Select the correct statement(s) regarding Frame Relay (FR). a. FR is a connection-oriented standard that operates at the OSI lay
DedPeter [7]

Answer:

d. all of the statements are correct

Explanation:

Frame Relay is a high-performance WAN protocol that operates at the physical and data link layers of the OSI reference model. i.e Layers 1 and 2 They are designed to cope with bursty traffic. Frame relay is also a form of data networking based on packet switching in which the packets are variable in length and experience packet delays.

Based on the above definition the correct statement is option d as all of the statements define in the other option correctly defines the function of frame relay.

7 0
3 years ago
Other questions:
  • to prevent long page load time for pages containing images. It is best to use a compress file formatlike jpeg as well as appropr
    6·2 answers
  • Alicia is typing a research paper. She is having difficulty remembering how to use the thesaurus and how to center the title. Sh
    10·2 answers
  • A model release can be either oral or written down. true or false
    11·2 answers
  • The global network that links millions of computers is the
    9·2 answers
  • Why would you set up a workbook to be shared if you are the only one using the workbook?
    7·1 answer
  • Which type of market are you in if your firm, along with three other firms, controls 95% of the total music industry?
    13·1 answer
  • Which term refers to the data stored in computer memory on which the processor applies to program instructions
    11·1 answer
  • Photographing during the midday can produce which of the following?
    8·1 answer
  • write a C++ program that ask the user for the number of cookies eaten and display the calorie consumption
    9·1 answer
  • (1) Experiment Purpose
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!