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
notsponge [240]
3 years ago
13

Write a simple number guessing game Python program. In this code, generate a random integer between 1-10 (both included) and ask

the user to guess the number in three attempts. Print appropriate responses to the user such as "You won!" or "You failed"
Computers and Technology
1 answer:
seraphim [82]3 years ago
6 0

Answer:

from random import randint

num = randint(1,10)

count =0

while count<3:

 userNum = int(input("Guess a Number "))

 if num ==userNum:

   print("You won")

   break

 else:

   print("Wrong try again")

 count = count+1

Explanation:

Import randint from random

generate a random number between (1,10) and assign to num

create a loop control variable count set to 0

In a While statement with the condition count<3 prompt user to make a guess

if guess is correct print you won and break

else print wrong try again and increase count by 1

You might be interested in
In which generation microprocessor was developed short answer of computer science​
3241004551 [841]

Explanation:

in fourth generation microprocessor was developed.

may it helped u

5 0
3 years ago
Out of the following, find those identifiers, which cannot be used for naming Variables, Constants or Functions in a python prog
Alecsey [184]

Answer:1. Introduction to Python

1.1 A Simple Python Program

1.2 Creating and Running a Python Program

2. Virtual Data Storage

3. Statement Types

3.1 Input/Output Statements

3.2 The Assignment Statement

3.3 Control Statements

4. Another Example

5. Managing Complexity

5.1 Divide and Conquer

5.2 Using and Writing Functions

6. Object-Oriented Programming

6.1 What Is It?

6.2 Python and OOP

6.3 One More Example

6.4 What Have We Gained?

7. Graphical Programming

7.1 Graphics Hardware

7.2 Graphics Software

8. Conclusion

E X E R C I S E S

A N S W E R S T O P R A C T I C E P R O B L E M S

Explanation: I got you bruv.

7 0
3 years ago
Which is an example of artificial intelligence in computers? A. multimedia software B. encryption software C. voice recognition
andrezito [222]

Answer:

its option b encryption software

Explanation:

Artificial intelligence (AI) is intelligence demonstrated by machines, unlike the natural intelligence displayed by humans and animals, which involves consciousness and emotionality. The distinction between the former and the latter categories is often revealed by the acronym chosen. 'Strong' AI is usually labelled as AGI (Artificial General Intelligence) while attempts to emulate 'natural' intelligence have been called ABI (Artificial Biological Intelligence). Leading AI textbooks define the field as the study of "intelligent agents": any device that perceives its environment and takes actions that maximize its chance of successfully achieving its goals.[3] Colloquially, the term "artificial intelligence" is often used to describe machines (or computers) that mimic "cognitive" functions that humans associate with the human mind, such as "learning" and "problem solving".

3 0
3 years ago
Which slide elements must claire use to enhance her presentation?
Crank

The answer for the 1st blank is text.


6 0
3 years ago
Read 2 more answers
Write a program that outputs "Hello World!".
tekilochka [14]
Print(“Hello World!”)

I hope this helps :) I’m sry is this what you wanted or were you looking for something else because I’m willing to help either way.
4 0
2 years ago
Other questions:
  • An app builder has created a report for sales people to view records from the custom object, some users have complained that the
    8·1 answer
  • Object-oriented programs employ a group of techniques for handling errors called ________ handling.
    12·1 answer
  • Pinterest, a visual bookmarking Website, logs more than 14 terabytes of new data each day, which means its storage needs are con
    10·1 answer
  • In which job role would a course in 3D modeling help with professional career prospects?
    9·2 answers
  • A server of service is responsible for sending the contents of cengage.com to your browser when you type cengage.com into the lo
    12·1 answer
  • What do you think is the most fascinating aspect of the Internet
    5·2 answers
  • Hey! PLEASE HELP!!!
    12·1 answer
  • ¿Cuáles aspectos serían los que más incidirían para que no se pudiera cumplir con el principio de imparcialidad en una auditoría
    11·1 answer
  • What would be a social networking page background for Sigmund Freud?
    15·1 answer
  • Web résumés allow you to include extra graphics and images that you would not include in a traditional résumé. please select the
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!