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
aivan3 [116]
3 years ago
8

Use the function random.randint to write a program that rolls a 6-sided die 100 times, and prints out all of the rolls.

Computers and Technology
1 answer:
baherus [9]3 years ago
7 0

import random

for x in range(100):

   print(random.randint(1,6))

I wrote my code in python 3.8. I hope this helps.

You might be interested in
On March 2, 2022, is birthday wish me a happy birthday
mash [69]

Answer:

happy early birthday hope you have a great day

6 0
3 years ago
Read 2 more answers
Sonora wants to extend the cells to be added in her formula. what is the quickest way to add more sells?
alexira [117]
It’s D left click that’s the answer
8 0
4 years ago
Read 2 more answers
A(n) _____ is a network confined to sites on internal web servers and only available to individuals within an organization.
Mariulka [41]
A closed network<span> is a network confined to sites on internal web servers and only available to individuals within an organization.</span>
6 0
3 years ago
Write a program whose input is two integers and whose output is the two integers swapped.
Tpy6a [65]

Answer:

The program to this question can be given as:

Program:

#include <iostream>  //header file

using namespace std;   //using namespace.

void SwapValues(int* userVal1, int* userVal2); //function declaration.

void SwapValues(int* userVal1, int* userVal2) //function definition.

{ //function body.

//perform swapping

   int t = *userVal1;  

   *userVal1 = *userVal2;

   *userVal2 = t;

}

int main() //main method  

{

int n1, n2; //define variable

cout<<"Enter first number :"; //message

cin>>n1; //input by user.

cout<<"Enter second number :"; //message  

cin>>n2; //input by user.

SwapValues(&n1,&n2); //calling function.

cout<<"Swapped values"<<endl;

cout<<"first number is :"<<n1<<endl; //print value

cout<<"second number is:"<<n2<<endl; //print value

return 0;

}

Output:

Enter first number :3

Enter second number :8

Swapped values

first number is :8

second number is :3

Explanation:

The description of the above C++ language program can be given as:

  • In the program, firstly we include the header file. Then we declare and define a function that is "SwapValues()" function in the function we pass two integer variable that is "userVal1 and userVal2" inside a function, we define an integer variable that is "t" and perform swapping.  
  • Then we define the main function in the main function we define two variables that is "n1 and n2" this variable is used to take value-form user. then we pass this value to function and print the function values.

5 0
3 years ago
How to get a javascript's varible
Kamila [148]

Answer:

If you want to use a js variable in a php script you MUST pass it within a HTTP request. There are basically two ways: Submitting or reloading the page.

Explanation:

In programming, just like in algebra, we use variables in expressions (total = price1 + price2). From the example above, you can calculate the total to be 11. JavaScript variables are containers for storing data values. All JavaScript variables must be identified with unique names. These unique names are called identifiers.

8 0
2 years ago
Other questions:
  • Which of the following is not a thing needed to make a network?
    6·2 answers
  • He following is a string of ASCII characters whose bit patterns have been converted into hexadecimal for compactness: 4A EF 68 6
    12·1 answer
  • What is ATX full size motherboard? Tell its size as well?
    14·1 answer
  • Consider the following arrays. 1 4 21 2 4 100 B # 111(A) L3π 42 Write MATLAB expressions to do the tollowing a. Select just the
    13·1 answer
  • Which of the following devices are least likely to deny a connection inline when an attack is detected? (select 2)
    6·1 answer
  • What factors should you consider when buying a hard drive?
    8·1 answer
  • Write a program that reads a stream of integers from the console and stores them in an array. The array is then analyzed to comp
    10·1 answer
  • You are a project manager for Laredo Pioneer's Traveling Rodeo Show. You're heading up a project to promote a new line of souven
    6·1 answer
  • This isn't academic, but what do I do if HI-REZ won't let me sign into an existing account. “Something went wrong” keeps popping
    5·1 answer
  • A _____ is a grid that displays fields as columns and records as rows.
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!