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
hram777 [196]
3 years ago
11

Create the setStyles() function using the commands listed in the steps below. Christine wants one of five fancy style sheets to

be randomly used when the page is opened. Declare the styleNum variable equal to the value returned by the randInt() function, using 5 as the parameter value.
Computers and Technology
1 answer:
jolli1 [7]3 years ago
3 0

Answer:

Hi there! This can be implemented in a simple Python function which uses the "random" module to generate the number.

Explanation:

Using Python as the languge, we can write a the below code in a file called styles.py. The first line imports the randint function from the "random" module. The setStyles() function declares an array or 5 elements (here I have just used numbers but these could be string names of the stylesheets as well). Next, styleNum is assigned the random number and the associated stylesheet is selected from the array of stylesheets.

styles.py

from random import randint

def setStyles():

   stylesheets = [1,2,3,4,5];

   styleNum = randint(1,5);

   stylesheet = stylesheets[styleNum];

   print(stylesheet);

setStyles();

You might be interested in
Why the computer is known as versatile and diligent device ? explain.<br>​
Scrat [10]

Answer:

Computer is called versatile and diligent device because it is used in almost all the fields for various purposes and it can perform the task repeatedly without loosing its speed and accuracy for long time.

5 0
2 years ago
In Microsoft word,when you highlight existing text you want to replace ,you’re in?
Lerok [7]

In Microsoft Word, when you highlight existing text you want to replace, you are in overtype or typeover mode. However, this may also be the case when you are in the Find and Replace tool, where you will type in all the exact phrases or words that will eventually be highlighted and then be replaced in just one click.

5 0
3 years ago
In Full Screen Reading View, which area is reduced?
REY [17]

Go to options .

  • Suppose you are reading a document .
  • You want to read in full screen .
  • Hence the Go-to bar will be reduced .
6 0
3 years ago
Given an array a, declared to contain 34 elements, write an expression that refers to the last element of the array.
Mice21 [21]
If the language is zero indexed:

a[ 33 ]
4 0
3 years ago
(a) Explain the term formatting a disk for storage.​
Elena L [17]

Answer:

Disk formatting is the process of preparing a data storage device such as a hard disk drive, solid-state drive, floppy disk or USB flash drive for initial use. In some cases, the formatting operation may also create one or more new file systems. The first part of the formatting process that performs basic medium preparation is often referred to as "low-level formatting".[1] Partitioning is the common term for the second part of the process, making the data storage device visible to an operating system.[1] The third part of the process, usually termed "high-level formatting" most often refers to the process of generating a new file system.[1] In some operating systems all or parts of these three processes can be combined or repeated at different levels[3] and the term "format" is understood to mean an operation in which a new disk medium is fully prepared to store files. Some formatting utilities allow distinguishing between a quick format, which does not erase all existing data and a long option that does erase all existing data.

As a general rule,[nb 1] formatting a disk by default leaves most if not all existing data on the disk medium; some or most of which might be recoverable with privileged[nb 2] or special tools.[4] Special tools can remove user data by a single overwrite of all files and free space.[5]

Explanation:

PLEASE MARK ME AS BRAINLIEST

6 0
3 years ago
Other questions:
  • If you have a list of words that you wish me to make into a bulleted list, you must first highlig or ______ The words with the c
    13·1 answer
  • What is likely to happen to the economy when there’s too much money or credit circulating?
    13·1 answer
  • You want to enable nap so that all portal computers using wireless connections have an active firewall. which type of enforcemen
    11·1 answer
  • The way a program is proceed is know as control flow and are :Sequence(one line after the other), Decision-making(either this or
    8·1 answer
  • Write a program to calculate the area of a triangle whose base is 10cm and height is 6cm
    6·1 answer
  • In an array based implementationof a queue a possible solution to dealing with the full condition is to
    14·1 answer
  • And then what happened,Paul Revere rhyme
    14·2 answers
  • How to bypass a Lightspeed and Rocket Filter blocked website without being a admin and without downloading extensions? Must incl
    15·1 answer
  • Energy/power management systems, kitchen appliances, smart televisions, baby monitors, fitness trackers, and personal health mon
    8·1 answer
  • when an overridden method is called from within a subclass, it will always refer to the version of that method defined by the (a
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!