Python code 100 Random Numbers (twice)python code

instructions:
You need to write code that will print two bricks of numbers, one with integers, one with decimals.

Answers

Answer 1
Answer:

import random

i = 1

while i <= 100:

   print("#"+str(i)+": "+str(random.randint(1,100)), end=", ")

   i+=1

print()

i = 1

while i <= 100:

   print("#"+str(i)+": "+str(random.uniform(1,100)), end=", ")

   i += 1

I hope this helps!


Related Questions

Is the willingness to put a customer’s needs above ones own needs and to go beyond a job description to achieve customer satisfaction
This quiz is meant to test your understanding of secure passwords. Click on the title and answer the following questions in the submission box: What are the characteristics of a secure password? Why is phishing harmful?
When applying scenario logic to technology commercialization we should not consider if there is enough social, political, and market support for commercialization to take place Select one: True False
Assume that two computers are directly connected by a very short link with a bandwidth of 125 Mbps. One computer sends a packet of 1000 Bytes to the other computer. What’s the end-to-end delay (ignoring the propagation delay)?
In confirmatory visualization Group of answer choices Users expect to see a certain pattern in the data Users confirm the quality of data visualization Users don't know what they are looking for Users typically look for anomaly in the data

What type of result does the MATCH function, when used on its own, return?

Answers

Answer:

It returns the lookup value located in a specific location.

Explanation:

Want to.learn about computers​

Answers

Yes...I do want to learn about computer

Develop a crawler that collects the email addresses in the visited web pages. You can write a function emails() that takes a document (as a string) as input and returns the set of email addresses (i.e., strings) appearing in it. You should use a regular expression to find the email addresses in the document.

Answers

Answer:

see explaination

Explanation:

import re

def emails(document):

"""

function to find email in given doc using regex

:param document:

:return: set of emails

"""

# regex for matching emails

pattern = r'[\w\.-]+at[\w\.-]+\.\w+'

# finding all emails

emails_in_doc = re.findall(pattern, document)

# returning set of emails

return set(emails_in_doc)

# Testing the above function

print(emails('random text ertatxyz.com yu\npopatxyz.com random another'))

In a clustered column chart, the names of each column are part of the ____ series. select one:a. category
b. data
c. label
d. legend

Answers

data.......;...............;.........;......;.
Hello RandomHacker

Answers: In a clustered column chart, the names of each column are part of the data series. 

Hope That helps
-Chris

Object-oriented programming allows you to derive new classes from existing classes. This is calledcomposition.
interfaces.
inheritance
polymorphism

Answers

Answer: Inheritance

Explanation: Inheritance is the feature that is displayed by the class where it happens to acquire the properties of the other classes and exhibit it. the inheriting nature of the class is seen in two different categories -superclass and subclass. It is a concept that is usually followed in the object -oriented programming. The reason for the inheritance is to reuse the element and their properties of other class.

Answer:

PoLymORpHiSm Kid. Other kid is wrong mark me branliest. TRUST ME

Explanation:

;3

In this chapter, you learned that although a double and a decimal both hold floating-point numbers, a double can hold a larger value. Write a C# program named DoubleDecimalTest that declares and displays two variables—a double and a decimal. Experiment by assigning the same constant value to each variable so that the assignment to the double is legal but the assignment to the decimal is not.

Answers

Answer:

The DoubleDecimalTest class is as follows:

using System;

class DoubleDecimalTest {

 static void Main() {

     double doubleNum = 173737388856632566321737373676D;  

    decimal decimalNum = 173737388856632566321737373676M;

   Console.WriteLine(doubleNum);

   Console.WriteLine(decimalNum);  }}

Explanation:

Required

Program to test double and decimal variables in C#

This declares and initializes double variable doubleNum

     double doubleNum = 173737388856632566321737373676D;

This declares and initializes double variable decimalNum (using the same value as doubleNum)

     decimal decimalNum = 173737388856632566321737373676M;

This prints doubleNum

   Console.WriteLine(doubleNum);

This prints decimalNum

   Console.WriteLine(decimalNum);

Unless the decimal variable is commented out or the value is reduced to a reasonable range, the program will not compile without error.

Other Questions