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
LenKa [72]
2 years ago
11

# Initialize variables

Computers and Technology
1 answer:
Ne4ueva [31]2 years ago
5 0

numGuesses = 0

userGuess = -1

secretNum = 5

name = input("Hello! What is your name?")

while userGuess != secretNum:

   userGuess = int(input("Guess a number between 1 and 20: "))

   numGuesses = numGuesses + 1

   if (userGuess < secretNum):

       print("You guessed " + str(userGuess) + ". Too low.")

   if (userGuess > secretNum):

       print("You guessed " + str(userGuess) + ". Too high.")

   if(userGuess == secretNum):

       print("You guessed " + str(secretNum)+ ". Corret! "+"It took you " + str(numGuesses)+ " guesses.")

You might be interested in
One item you will NOT need to provide when opening up a bank account
gladu [14]

Answer:

You don't need a birth certificate

Explanation:

8 0
2 years ago
Read 2 more answers
The process of making raw materials into a finished product is known as
Olin [163]
1.) Business Engineering or Manufacturing :)
<span />
6 0
2 years ago
Read 2 more answers
Your task is to create a bash shell script that is able to backup all the C++ program files in your current directory. The algor
Oliga [24]

Answer:

backup() {

 read dirname;

 if [[ whereis . /`$dirname` 2>  sterr.exe]]  

    then

        mkdir  $dirname

 for f in . / *.cpp

 do

    cp f "path_to_dirname"

    echo "file backup complete"

}

backup( )

Explanation:

The bash script above is used to backup C++ source files in a directory to a backup directory which is created if it does not exist, and copy's each .cpp file to backup, then sends a message to declare its completion.

7 0
3 years ago
Question 1 (True/False Worth 3 points)
ANTONII [103]
False because the internet connects with multiple communication networks to exchange information
6 0
2 years ago
Complete the body of the decrement static method using only the NaturalNumberKernel methods (multiplyBy10, divideBy10, and isZer
Ivan

Answer:true

Explanation:mark as brainliest

6 0
3 years ago
Other questions:
  • Put the following five steps in the order in which you would perform them to use the Paste Special function: ____. 1. Select and
    5·1 answer
  • What should you do if your computer keeps shutting down while working?
    9·2 answers
  • during zach's second visit of the year, he incurred a $450 bill. Describe how much is paid by Zach and the insurance carrier
    7·1 answer
  • You start up your laptop while getting a coffee across the room. You hear the usual chimes and doinks as it starts up. When you
    14·2 answers
  • What is a disadvantage of using transitions in a PowerPoint presentation?
    9·1 answer
  • What is also known as computer Network?
    6·2 answers
  • What is the output by the code system.out.print(8-4+2);
    13·1 answer
  • Name any three areas of of application of excel.
    12·1 answer
  • Discuss the term internal control​
    12·1 answer
  • A large retail company hires several new joiners and would like to incorporate Virtual Reality (VR) into their onboarding proces
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!