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
What is one way to overcome sad feelings?
laiz [17]

Answer:

music

Explanation:

it calms u and takes away all ur worries for that time because ur just vibing

4 0
2 years ago
Read 2 more answers
(true or false) fortnite is the best?
GarryVolchara [31]

Answer:

FALSE ZzZzZzZz

Explanation:

Cus it is PERIOT

7 0
2 years ago
Read 2 more answers
What are the consequences of having unprotected Linux operating systems installed on embedded systems?
Gennadij [26K]

Answer:

highly venerable to external attacks

Explanation:

Embedded systems are the type of computer systems that are specially designed having hardware and software components plus programmable  capabilities embedded into the hardware itself.

These computer systems are motorized by dedicated computer hardware chips made by companies such as Broadcom, Qualcomm, and Marvell. These chips are cheap which also means that they’re highly vulnerable, and the profit margins slim. They normally put a version of the Linux operating system onto the chips, lumping it up with some other bunch of open-source and proprietary components and drivers. With little or no technical engineering work before shipping, and there's little enticement to update their "board support package" until there’s probably a very good reason for it.

6 0
3 years ago
WAP to input the rating of a movie, and print as per the given criteria:
vodka [1.7K]

Answer:

What is the question?

Explanation:

8 0
1 year ago
Who are some of the people who use social media and other internet resources to research candidates
bezimeni [28]

Answer:

Digital Citizens

6 0
3 years ago
Other questions:
  • The SETI (Search for Extraterrestrial Intelligence) project collected vast amounts of data that needed processing. SETI was one
    14·1 answer
  • Write a JavaScript statement to convert "Information Technology" to uppercase.
    6·1 answer
  • Complete method printPopcornTime(), with int parameter bagOunces, and void return type. If bagOunces is less than 2, print "Too
    5·1 answer
  • Your company runs several databases on a single MySQL instance. They need to take backups of a specific database at regular inte
    12·1 answer
  • The following SQL statement contains which type of subquery? SELECT title FROM books WHERE EXISTS (SELECT isbn FROM orderitems W
    14·1 answer
  • is there an app i can use to make a picture appear in the corner of a video then disappear after being up for a second?
    6·2 answers
  • You would like to put the data in order by product number. What should you do?
    15·1 answer
  • The declarations and statements that compose the method definition are called the __________.
    9·1 answer
  • Could I use a prepaid card to buy a Brainly membership because I tried to get the trial with a low balance but more than like 5$
    11·1 answer
  • Please help me and solution in c language​
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!