Answer:
Explanation:
The following code is written in Python. It is a function called guessMyNumber and like requested creates a random number and saves it to secretNumber. Then it continuously asks the user for their guess and compares it to the secret number. If the guess is correct it exits the loop otherwise it will continue to ask for a new guess.
import random
def guessMyNumber():
secretNumber = random.randint(1, 10)
print(secretNumber)
while True:
guess = input("Enter your guess: ")
guess = int(guess)
if (guess == secretNumber):
print("Congratulations you guessed correctly")
What email program would you suggest and why?
Answer:
An email program
Explanation:
And why?
Answer:
I would suggest g m a i l.
Explanation:
I use G m a i l all the time and I think it is easy to use! A lot of people think it is great too! :)
Identify the correct characteristics of Python lists. Check all that apply. Python lists are enclosed in curly braces { }. Python lists contain items separated by commas. Python lists are versatile Python data types. Python lists may use single quotes, double quotes, or no quotes.
Answer:
Python lists contain items separated by commas.
Python lists are versatile Python data types.
Python lists may uses single quotes, double quotes, or no quotes.
Explanation:
Python Lists are enclosed in regular brackets [ ], not curly brackets { }, so this is not a correct characteristic.
Answer:
a c d
Explanation:
How to do brainliest
What effect would excluding quotation marks from a search phrase have?
A.
It would narrow down the search.
B.
It would have little or no impact on the search.
C.
It would broaden the search.
D.
It would cause the search engine to bring up very different results.
Answer: C
it would broaden the search
Explanation:
Placing quotation marks around a search term or phrase limits your search to that exact term or phrase. Without the quotes, your search engine may return all results that contain each separate word. Placing AND between your keywords will return results that only include both or all your keywords.
Answer:
The answer is C. It would broaden the search.
Explanation:
I got it right on the Edmentum test.
Write a program that reads an integer between o and 1000 and adds all the digits in the integer. For example, if an integer is 932, the sum of all the digits is 14. Hint: Use the % operator to extract digits, and use the / operator to remove the extracted digit. For instance, 932 % 10=2 and 932/10 =93. Here is a sample run:
Enter a number between 0 and 1000 : 999
The sum of digits is 27.
Answer:
Answered below
Explanation:
#Program is written in Python programming language
digit = 0
sum = 0
num = int(input("Enter a number between 0 and 1000: ")
#Check that number is within the valid range
if num > 0 and num <= 1000:
while num != 0:
#Isolate each digit
digit = num % 10
sum = sum + digit
#Remove isolated digit from number
num = num/10
else:
print("Number is not within valid range")
#print total sum of digits
print(sum)
Gamification and virtual reality is the future of education
Answer:
Education is expected to be the fourth largest sector for VR investment. VR in education is predicted to be a $200 million industry by 2020, and a $700 million industry by 2025. 97% of students would like to study a VR course.
Explanation:
/* missing precondition */
public String getChar(String str, int n) {
return str.substring(n, n 1); }
Write down the most appropriate precondition for the method so that it does not throw an exception.
Answer:
An appropriate precondition is:
0 <= n && n <= str.length() - 1
Explanation:
Required:
Write down an appropriate pre-condition for the program
From the question, we understand that the method accepts two parameters:
str -> A string value
n -> An integer value which represents the index of character to return from the string str
It should be noted that:
n must be within the range of 0 and str.length()-1
Take for instance:
str = "ABCDE";
n must be within the range 0 to 4 (inclusive) in order not to raise an exception. This is so because the string index starts at 0 and stops at 1 less than the length of the string.
Hence, the precondition can be written as:
0 <= n && n <= str.length() - 1
Which means: n = 0 to length - 1