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
Write Python code to save the data to a MongoDB collection:Import json module to parse JSON dataImport MongoClient from pymongo
Zigmanuir [339]

Answer:

Explanation:

The objective of this task is to compute a program that involves the usage of Python code to save the data to MongoDB and to query  the database.

Due to the error that occur which makes me to be unable to submit this answer, I've created a word document instead and the attached file can be found below.

Thanks!

Download docx
8 0
3 years ago
Im bored anyone up for a convo? lets talk.. =D
aleksandrvk [35]

Answer:

ok im fine with dat <3

6 0
3 years ago
Read 2 more answers
Jane sold many notebooks at her school fair and earned a good amount of cash. To keep a record, she entered all the cash values
pantera1 [17]
Use tab key & shift+$
6 0
3 years ago
I have tried many times to find a gaming setup for $4k. I have tried many websites but they are not working for my liking. Any o
Vikentia [17]
I would try going to pcpartpicker.com and build your pc from there, and after you’ve done that take your remaining budget to find whatever else you need for your setup
8 0
2 years ago
PLS HURRY!!!<br> Look at the image below!
max2010maxim [7]

Answer:

Ctrl+c

Explanation:

6 0
3 years ago
Read 2 more answers
Other questions:
  • Cleo finds herself frequently searching for messages from particular senders or with specific subjects. What should she create
    5·1 answer
  • Define the following term: - hue
    11·2 answers
  • Have you ever tried to teach a class full of restless, active sixth-graders? I have. I taught sixth-grade students for 12 years.
    15·1 answer
  • To change the overall design of an entire document to include colors, fonts, and effects, a user should apply a?
    8·2 answers
  • Which of the following button should always be included when designing a navigation pictures escape contact FAQ
    5·2 answers
  • There are varying definitions for the term "dumb terminal," but it often refers to the fact that the terminal has
    13·1 answer
  • Examine the following declarations and definitions for the array-based implementations for the Stack and Queue ADTs. Assume that
    14·1 answer
  • before Katie turns in the paper she typed she wants a peer to review it and give her feedback Katie uses her all in one printer
    10·1 answer
  • On the classic gameshow The Price Is Right, contestants must guess the price of an object (guesses are distinct). The winner is
    5·1 answer
  • Another way to create a new presentation is from the Home tab
    6·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!