answer.
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]
2 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]2 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
A _______ is a shortcut to a web page saved in a list in the internet explorer desktop application.
elena-14-01-66 [18.8K]
It is called a favorite
6 0
2 years ago
Longer speeches should be separated into the paragraphs of:
Virty [35]

Answer:

b) About 100 words or 3-4 fines in the transcription tool.

Explanation:

Transcription tools are the software that helps in converting the audio or speeches into texts. Traditionally, the process of transcription was done manually. With teh advancement of technologies and software, transcription software is developed. They help in transcribing the audios and videos into texts. These are useful in many sectors of business, medical, and legal areas.

One of the rules of transcription involves the division of long speeches into paragraphs. It is advised to divide the paragraph into about 100 words or 3-4 lines.

7 0
2 years ago
A router is involved in ____________ layers of the tcp/ip protocol suite.
GenaCL600 [577]
Network Layer of the TCP/IP protocol
3 0
2 years ago
Which of the following is NOT a method in which a macro can be run?
liubo4ka [24]
C....................
7 0
2 years ago
In the middle of the iteration, how should a team handle requirement changes from the customer? (1 correct answer)
Rina8888 [55]

The answer is 1 because it is

5 0
2 years ago
Read 2 more answers
Other questions:
  • Problem statement: Using loop, write a program that will ask the user to enter a character for left or right. Then, the user wil
    13·1 answer
  • A two-dimensional array can have elements of ________ data type(s).
    7·1 answer
  • Write a statement that reads a floating point value from standard input into temperature. Assume that temperature. has already b
    6·1 answer
  • You can press ____ to move the focus through the controls of the form. [page down] [tab] [f5] [f12]
    10·1 answer
  • 1.2.2: Output variable value. Jump to level 1 Write a statement that outputs variable userAge. End with a newline. 1 2 3 4 5 6 7
    12·1 answer
  • Suppose that f is a function with a prototype like this: void f(________ head_ptr); // Precondition: head_ptr is a head pointer
    6·1 answer
  • Lynn runs the locate command and the results include many files from a directory that she doesn't want to include in her search.
    11·2 answers
  • Which of the following operation is not performed by a mouse 1) left click , middle click , right click, double click​
    15·2 answers
  • Hashing algorithms are used on evidence files to uphold the chain of custody in an investigation. Which of the following is NOT
    5·1 answer
  • Given a sorted list of integers, output the middle integer. A negative number indicates the end of the input (the negative numbe
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!