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
Which of the following is the best example of a manager with a delegator leadership style
monitta
No examples posted but here are a few examples;
Boss will send other employees to meetings in his/her place
Boss will leave other employees in. Charge when he/she is not there for a period of time.
Boss will assign special assignments
5 0
4 years ago
Read 2 more answers
Just giving this a shot, Which of the following statements about RAM are TRUE? Select all that apply.
tiny-mole [99]
I believe the answer is A and B

7 0
4 years ago
In 1839, Talbot released the paper-based process which he called _ to the public.
vlabodo [156]

Answer:

I'm pretty sure it's photogenic drawing.

7 0
3 years ago
What refers to a metal combined with one or more other elements
alexira [117]
The correct answer is an Alloy.
8 0
3 years ago
When saving messages as drafts, it’s important to remember that your draft will not go live unless _______. Choose only ONE best
Nadusha1986 [10]

Answer:

Option (b) is the correct answer.

Explanation:

"Drafts" is a folder of messaging software or mail software whose works are to save the message until the user does not want to send it. So to send the message from drafts, the user needs to edit the message first then he can able to send that message. The above question asks that how a user can send the draft message. Option b suggests that a user needs to click send to send the draft message.

Hence it is a right option while the reason behind the other option is invalid are as follows--

  • Option a suggests that a user needs admin permission to send this but if that is his account then no need for admin permission.
  • Option c suggests to unlock the draft but the draft folder is not locked.
  • Option d suggests to take permission from a superuser but that is not required.
7 0
3 years ago
Other questions:
  • Answer how do you properly dispose of a large box of assorted computer parts, including hard drives, optical drives, computer ca
    11·1 answer
  • B. Write a function that takes one double parameter, and returns a char. The parameter represents a grade, and the char represen
    7·1 answer
  • A student has created a Book class. The class contains variables to represent the following.An int variable called pages to repr
    11·1 answer
  • Anyone Free to Talk??????? I'm Bored :(
    6·2 answers
  • Steven, Marcos, and Juan are having a free-throw shooting contest. Each boy
    9·1 answer
  • Why was the cooper black font made?
    5·1 answer
  • It is where the home tab is located where you can view all the all the formatting purpose <br>​
    11·1 answer
  • Write a statement that calls a function named IncreaseItemQty, passing the variable addStock. Assign mugInfo with the value retu
    12·1 answer
  • Analyze the sentence below . choose your answer on the box below write your answer in your quiz notebook
    5·1 answer
  • 1- Identify the face expressions is considered....
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!