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]
4 years ago
12

Write a Python program to do the following:

Computers and Technology
1 answer:
viktelen [127]4 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
A network interface port has collision detection and carrier sensing enabled on a shared twisted-pair network. From this stateme
hram777 [196]

Answer:

This is an Ethernet port operating at half duplex.

Explanation:

Modern Ethernet networks built with switches and full-duplex connections no longer utilize CSMA/CD. CSMA/CD is only used in obsolete shared media Ethernet (which uses repeater or hub).

7 0
3 years ago
Read 2 more answers
The pc card and cardbus devices are being replaced by what technology?
Ronch [10]
They are replaced by ExpressCard

3 0
3 years ago
Which of the following is not an operating system?
Ymorist [56]

Answer:

B

Explanation:

Microsoft is an OS that updates its home about every 5-10 years

6 0
3 years ago
With which access control method do system administrators establish what information users can share?
monitta

Answer: Mandatory access control

Explanation:

Mandatory access control is defined as the highly uncompromising access control. This access control provides accessing resources of the system under surveillance of  system administrator or operating system.

  • It does not permit access of any subject for operating or functioning on object  without authority.It has the ability to manipulate the control through system administrator.
  • It controls who can share information by accessing, what information can be shared, circumstance of access etc.

8 0
3 years ago
Why do generated backup scripts usually include backticks around names such as database names and column names?
babymother [125]
Using backticks<span> permits you to use alternative characters.</span><span>
Generated backup scripts usually include backticks around names such as database names and column names t</span>o allow for names that include spaces. 

8 0
3 years ago
Other questions:
  • What is the oldest and most common technique to differentiate information systems?
    8·1 answer
  • It takes you 0.8 of a minute to read each page of your health book. It takes you 5.5 minutes to take the test at the end. How lo
    10·2 answers
  • List three different computer languages, and describe how each one is used in software development
    13·1 answer
  • The producer thread will alternate between sleeping for a random period of time and inserting a random integer into the buffer.
    7·1 answer
  • Write a program that reads in a list of numbers, and for each number, determines and prints out whether or not that number is ab
    7·1 answer
  • A problem associated with old drivers is:
    8·1 answer
  • Practising some questions for board exams for class 12 python,pls help with detailed answer
    14·1 answer
  • ICT4AD was meant to modernize the civil service through E-governance implementation.
    10·1 answer
  • What option in the zone aging/scavenging properties dialog box will prevent dns record time stamps from being updated too often?
    9·2 answers
  • On the line below, write the two places you can control tab settings.
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!