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
3 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
Two Technicians are discussing ShopKey Pro. Technician
Vlada [557]

Answer:

Technician A is correct

Explanation:

Contact us is the most common term used in online applications such as in websites, mobile/android application to search contact information. People mostly scanning the “contact us” page to find the contact information, if they want to contact the company or organization.

Why technician A is correct.

Technician A is correct because people always try to find the “Contact us” page to find contact information for asking questions, to provide feedback, or any suggestion if they want to provide. It is hard for people to find contact information to provide feedback or give an idea to improve the ShopKey version in “support” heading under the “help” section. Because people are more inclined to search such information in the “Contact us” page rather than exploring the website to find such contact.

Why technical B is not correct

When people want to provide feedback, ask a question or suggest a new idea, they mostly prefer to search for information in the contact us pages. An ordinary user, who has no knowledge of website management or website hierarchy, search contact information in the “Contact us” page rather than searching in support or in the help section.

3 0
3 years ago
If I Uninstall Nba 2k 19 from my ps4 will my career be gone forever?​
Rudik [331]

Answer:

Not unless you have a ps plus membership

Explanation:

Ps plus have cloud storage so if you have ps plus membership,even if you delete 2k19 your data will be saved in the cloud storage therefore your my carrer will not be gone forever!

7 0
3 years ago
Read 2 more answers
Please help explain Loops question. I will give brainliest.
OLEGan [10]

Answer:

And 1 and 2 and 3

Explanation:

It is asked to display the 'and' every time, and the count is equal to 1 plus the previous count starting at zero, so it runs 3 times

7 0
2 years ago
Brooke is trying to save enough money in the next fifteen months to purchase a plane ticket to Australia. Every month Brooke sav
ankoles [38]

Answer:

3000

Explanation:

8 0
3 years ago
Fill in each blank with the correct answer/output.
borishaifa [10]

Answer:

37

Explanation:

Given int[] vals = {7,5,3,9,0,37,93,16,68,6,99};

In programming, the position of each value in the list are known as index. The first value is always assigned index of 0 not 1, the second value is assigned index of 1 and so on. For example;

val[0] = 7 i.e value with index 0

val[1] = 5

val[4] = 0

In order to print out this value

System.out.println(vals[vals[1]+vals[4]]);

Substituting the index value val[1] and val[4] into the argument given

vals[vals[1]+vals[4]]

= vals[5+0]

= vals[5]

= 37 (value at the 5th index)

System.out.println(vals[vals[1]+vals[4]]);

= 37

This means that the system will print out 37 to the console

4 0
4 years ago
Other questions:
  • The source ip address is 164.109.28.3 subnet mask of 255.255.128.0 network address is
    7·1 answer
  • Networking device converts analog signals to digital ones?
    8·1 answer
  • Example 4-1: The styles for the main content of an HTML document main { clear: left; } main h1 { font-size: 170%; } main h2 { fo
    13·1 answer
  • Intellectual ______ is the legal term for ownership of intangible assets such as ideas, art, music, movies, and software.
    12·2 answers
  • Discuss the following
    14·1 answer
  • Self-disclosure is most likely to occur _____________.a.
    7·2 answers
  • Write any three type of looping structure with syntax​
    13·1 answer
  • 3. In 1989, the first handheld console was released by _____ and it was called ________.
    11·1 answer
  • Well I ended up figuring it out
    7·1 answer
  • If you want to create programs with more detailed images, maybe even characters that you could interact with, what pieces of inf
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!