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
Paladinen [302]
3 years ago
14

Need 2.5 Code Practice Answers

Computers and Technology
2 answers:
konstantin123 [22]3 years ago
4 1

Answer:

import random

random.seed(1,10)

a = random.randint (1,10)

b = random.randint (1,10)

print ("What is: " + str(a) + " X " + str(b) + "?")  

ans = int(input("Your answer: "))  

if (a * b == ans):  

   print ("Correct!")  

else:  

   print ("Incorrect!")

Explanation:

iragen [17]3 years ago
3 1

Answer:

import random

#random.seed() should not be used here as this method will produce same number again and again

a = random.randint(1,11) #this method will generate random number between 1 and 10  

b = random.randint(1,11)

print ("What is: " + str(a) + " X " + str(b) + "?")  

ans = int(input("Your answer: "))

if (a * b == ans):

   print ("Correct!")

else:

   print ("Incorrect!")

Output :

What is: 8 X 5?

Your answer: 40

Correct!

Explanation:

  • First for producing random numbers,random module has to be imported.
  • As mentioned in answer, random.seed() method is used to generate same random number again and again. Here we need to generate 2 different random numbers that is why we won't use this method.
  • To produce a random number, randint() method from random module is used. This method takes 2 parameters i.e. a low and high value. The low value is inclusive and the high value is exclusive. That is why , to get a number between [1,10], randint() takes 1 as low value(inclusive) and 11 as high value(exclusive).

Elo Lemon
2 years ago
This literally doesn’t work, I copy and pasted it into python and I get an EOD error when reading a line, help?!
You might be interested in
A broadband router is used to do which of the following? run the programs on a computer locate lost files on a computer manage a
Zina [86]
The router's main job is to manage a computer's connection to an internet provider
6 0
3 years ago
In DTP, a good rule of thumb is to use as many special effects as you need to make your documents look interesting.
Margarita [4]
It all depends back on who youre present it t

younger ages (Primary-Middle),
Its Ok to use plenty of special effects, but dont ovedue your DTP with effects, so that they still can get the point.

Older ages (High & above)
Older people usually more serious than older ages to pursue their careers, so less effect, more points


5 0
3 years ago
Write a function called st_dev. st_dev should have one
aleksandrvk [35]
Huluttttttt!!! greggyffh
8 0
1 year ago
In addition to the decimal number system, the number systems used most often in PLC operationand programming are ________.
otez555 [7]

Answer: PLC uses:

1. Decimal Number system

2. Binary Number system.

3. Octal Number system.

4. Hexadecimal Number system.

5. Binary Coded Decimal Number system.

6. Negative Number system.

7. Number Conversations.

Explanation: The other numbers the Programmable Logic Controller(PLC) uses aside the decimal number system are:

1. Binary Number system.

2. Octal Number system.

3. Hexadecimal Number system.

4. Binary Coded Decimal Number system.

5. Negative Number system.

6. Number Conversations.

7 0
3 years ago
Bonjour ma question est: expliquer comment fonctionne une calculatrice qui ne contient pas une pile. Pouvez-vous m'aider?
larisa [96]

Answer:

Tout calculateur électronique ou numérique nécessite une source d'alimentation pour fonctionner, avec son circuit configuré à la porte logique requise liée aux touches d'entrée et à l'écran de sortie.

Explanation:

Les calculatrices sont des appareils utilisés pour les calculs arithmétiques. Au 19ème siècle, les calculatrices étaient mécaniques et n'utilisaient pas de batterie, elles étaient encombrantes et utilisaient des tiges et des engrenages dans leur fonctionnement. Les calculatrices récentes sont électroniques, alimentées par une batterie. Ils comprennent un circuit électronique configuré à sa porte logique requise pour le calcul, un bouton pour l'entrée et un écran pour la sortie du calcul.

6 0
3 years ago
Other questions:
  • When creating a professional presentation, how many typefaces are recommended at the most?
    5·1 answer
  • If you wish to maintain a consistent style to all the documents you create, it would be helpful to use a _____.
    10·1 answer
  • Which audio editing effect uses the option ""Get Profile"" to execute its function?
    6·1 answer
  • Which phrase is a comparison operator for inserting a not equal to argument in an IF, COUNTIF or SUMIF function? <= <>
    9·1 answer
  • Lines s, t, and u are perpendicular bisectors of the sides FGH and meet at J. If JG=2x+2, JH=2y-4, JF=8 and HI=3z-3, find x, y,
    15·2 answers
  • Technologies can offer safety and protection for people
    11·1 answer
  • I need help. I wanna help a friend by giving him my powerpoint but I dont want him to steal my work. Is their anyway to restrict
    8·1 answer
  • Please help me. Adnan also wants to add a photograph of a bridge. It is on another PowerPoint presentation that is open in a dif
    11·1 answer
  • In a paragraph, describe in detail a practical real-world example of where you would implement a singly-linked list and why a si
    8·1 answer
  • 2. Which pattern microphone should Jennifer take to the press conference? Jennifer is a journalist with one of the leading newsp
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!