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
vlabodo [156]
4 years ago
10

Write a program that reads a target string from the keyboard and then another sentence string from the keyboard.

Computers and Technology
1 answer:
Rzqust [24]4 years ago
5 0

The solution is in the attachment

You might be interested in
Declaring a member as ____ in the base class provides access to that member in the derived classes but not to anyone else. a. pu
Sidana [21]

When a member is declared as b. <u>protected</u> in the base class, it provides access to that member in the derived classes but not to anyone else.

<h3>What is a derived class?</h3>

A derived class can be defined as a type of class that inherits the information or members of a base (parent) class such as a car in a syntax.

Basically, a public class is accessible to everybody while a private class can only be accessed by users within the declared class. Also, a constant is a class whose value remains unchanged.

In Computer programming, when a member is declared as <u>protected</u> in the base class, it ultimately provides access to that member only in the derived classes but not to other members or anyone else.

Read more on data types here: brainly.com/question/20264183

#SPJ1

6 0
2 years ago
Create the logic for a game that simulates rolling two dice by generating two random numbers between 1 and 6 inclusive. The play
guajiro [1.7K]

Answer:

The solution code is written in Python 3.

  1. import random  
  2. count = 0
  3. flag = False
  4. guess = int(input("Input your guess (2-12): "))
  5. while(count <=3):
  6.    dice1 = random.randint(1, 7)
  7.    dice2 = random.randint(1, 7)
  8.    if((dice1 + dice2) == guess):
  9.        flag = True
  10.    count += 1
  11.    
  12. if(flag):
  13.    print("User wins!")
  14. else:
  15.    print("Computer wins!")

Explanation:

A Random generator is needed for this question and therefore we start by importing Python random class (Line 1)

Next, create one counter variable,<em> count</em>, to ensure there will be only three rolling of the dices (Line 3).  We need another variable, <em>flag</em>, to track the status if the two dices equal to the <em>guess</em> number chosen by user (Line 4).

Next, prompt use to input a guess number (Line 5).

Within the while loop, we can use random class method <em>randint() to </em>generate random integer. The arguments 1 and 7 will give one random number ranged from 1 to 6 for <em>dice1</em> and<em> dice2</em>, respectively (Line 8 - 9).

If the total of<em> dice1 + dice2</em> equal to user <em>guess</em>, we turn the<em> flag </em>to <em>True</em>. If not, the <em>flag </em>will remain <em>False</em> after completing entire while loop.

If the <em>flag </em>turned to <em>True</em>, print the message "User Wins!" else print the message ("Computer wins!")

8 0
4 years ago
When should a writer establish common ground before the bottom-line statement? A. When the details are arranged in order of impo
BabaBlast [244]
In the bottom line statement,the writer can establish a common ground when b. the reader may disagree with the bottom line statement. Hope this is the best answer and would be of big help in this assignment of yours then.
3 0
3 years ago
Read 2 more answers
WILL GIVE MORE POINTS, PLEASE HELP!!!
Karo-lina-s [1.5K]
Right 4 down 5 right 8 !!!!!!!!!
5 0
3 years ago
Does anyone have 2.19.4 Guess a number 2.0 code for codehs?
lubasha [3.4K]

Answer:

I'm trying to create a program that will ask the user for an exam score in the range 0 to 100. ... I want to take the python course but I have not class code, anyone can help?

Explanation:

3 0
3 years ago
Other questions:
  • Which of the following has likely attended vocational school?
    10·1 answer
  • Edhesive 3.4 question 2
    11·2 answers
  • In __________ write, the data are stored in the cache, and control returns to the caller. Select one: a. a synchronous b. a buff
    8·1 answer
  • A technician recently fixed a computer with several viruses and spyware programs on it and notices the Internet settings were se
    15·1 answer
  • Eric’s computer slows down when he open several computer programs. Why does this happen?
    15·2 answers
  • Although your project has been accepted by the customer, the contract with the system vendor specifies that it will support the
    13·1 answer
  • Write an algorithm to calculate the sum of integer ​
    7·1 answer
  • . Aisha’s supervisor asks her to create an aspect of a program that will hold data and make it easy to access. What does Aisha n
    5·1 answer
  • What is the easiest way to defeat ganon in BOTW?
    11·2 answers
  • WILL MARK BRAINLIEST WORTH ALOT OF POINTS! HELP ME GET THIS DONE
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!