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]
4 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]4 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
This is a list of commands that tell your computer what to do. A icon B FAT C GUI D menu
ycow [4]
D. Menu                                                   I hope this helps you! ^^
             
6 0
3 years ago
Read 2 more answers
Don't pat any attention to this
Sauron [17]

Answer: what? do you need any help, bc I can help with any question you have

Explanation:

4 0
4 years ago
Read 2 more answers
A document created by the scriptwriter that contains general information about a program is called _____.
denpristay [2]
It is called the, "Program Proposal".
7 0
3 years ago
What happens to an LR if they troll/spam?
Mkey [24]
They have a chance of being blocked
8 0
3 years ago
What was the worlds first coding language
svetoff [14.1K]

Answer:

lol baby

Explanation:

becuase it goated

8 0
2 years ago
Read 2 more answers
Other questions:
  • True or False, PDF documents have many benefits, but their main disadvantage is that the formatting of their text and graphic el
    15·1 answer
  • How many electrons are there in an atom of carbon? A. Four B. Eight C. Six D. One
    15·2 answers
  • Most browsers allow you to maintain your most frequently visited websites. what is this called? Special place holder, secret lis
    6·2 answers
  • Dit View
    5·2 answers
  • What kind of company would hire an Information Support and Service employee?
    7·1 answer
  • How do you copy and paste a screenshot on an hd computer
    12·2 answers
  • If you want Nud3s add me on sc Kermit4lyfe1
    11·2 answers
  • Imagine you are a toy designer. How would you use measuring, dimensions, volume, and surface area information to create your toy
    10·2 answers
  • How was the addition of an improvement over early web design?
    11·1 answer
  • Help plz (will give brainliest)
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!