Question

please solve this in python

Write a program that randomly generates a number between 1-200, then asks
the user to guess the number, telling them if they are too high or too low. If they
go over 10 guesses, print 'You lose', if they get it in 5 guesses or less, print
"Great Job!, otherwise print 'You win!'
View transcribed image text
Expand

Expert Answer

Want to see the step-by-step answer?

Check out a sample Q&A here.

Want to see this answer and more?

Experts are waiting 24/7 to provide step-by-step solutions in as fast as 30 minutes!*

*Response times may vary by subject and question complexity. Median response time is 34 minutes for paid subscribers and may be longer for promotional offers.
Tagged in
Engineering
Computer Science

Programing Language

Python

Related Computer Science Q&A

Find answers to questions asked by students like you.

Q: What is the purpose of the table adapter’s Fill method?

A: Purpose of the table adapter's "Fill" method: Table adapter is termed as an interface between data ...

Q: This is in C++ Given a map pre-filled with student names as keys and grades as values, complete main...

A: Program code: //include the required header files #include <map> #include <string> #inc...

Q: Briefly explain 32-bit mode

A: 32-bit mode 32 bit mode is a type of CPU architecture used to transfer 32 bits of data per clock cy...

Q: What will the following code display in the lblAsterisks control? For intX As Integer = 1 To 2 For i...

A: Program Explanation: For the outer Next loop condition 1 to 2 is used in the code above to denote t...

Q: Problem 3. Given a node in a binary search tree, its successor is the successor node in the sorted o...

A: Approch : Our approach works on two cases. 1)If the right subtree is not NULL of INPUT NODE then the...

Q: Briefly explain direct memory operand

A: Memory operand: The memory operand is defined by using the name of variable or by the register. Mem...

Q: Briefly explain protected mode

A: Protected mode Protected mode is a mode of program operation in a computer. Here program is restric...

Q: which architectural patern is suited to the applications in which data is generated by one component...

A: MVC architecture pattern is most suited for applications in which data is generated by one component...

Q: What does a derived class inherit from its base class?

A: Derived class inherited from base class Derived class is used to inherit data members and functions...

Q: How do you create a clickable image?

A: If the programmer wants to make an image clickable, the programmer simply has to create a click even...

Q: You have a clinic with 3 department (General Surgery/ Paediatrician/ Obs/Gynaecology)and many rooms ...

A: Router: A router receives and transmits data on computer networks. Switch: Switches allows sharing o...

Q: Explain the difference between integrity constraints and authorization constraints

A: S.No. Integrity Constraints Authorization Constraints 1. It is primarily used for maintaining data...

Q: C++ Language material choose the correct answer please: 1-if y is random value from 0.1 to 0.2 then ...

A: 1. correct option is B . float y =(random(100)+100)/1000.0; , it is because random(100) gives output...

Q: Discuss the problems that can be caused by data redundancy.

A: There are many problems caused by data redundancy, they are as follows, If there are multiple copie...

Q: This is in C++. Write a function that, given a string, index, and character, returns the index of th...

A: Write a function to returns the index of the first occurrence of the character starting the search a...

Q: WHAT IS NEW SEMATIC ELEMENTS IN HTML5

A: For better document structure, HTML5 introduces number of elements. Some of them can be classified a...

Q: What is a release methodology? Why is version control important?

A: Release methodology and importance of version control Release methodology is the method of keeping ...

Q: What sort of main memory and cache memory should you seek?

A: Computers Components:-The machine has four main components, which are:- The central processing unit...

Q: Does INT 16h function 11h remove a character from the keyboard buffer?

A: No, INT 16h function 11h does not remove a character from the keyboard buffer. INT 16h function 11h ...

Q: Briefly explain ASCII control characters

A: Solution: Introduction to ASCII control characters A control character is a non printable character...

Q: An advertisement for a restaurant at an exclusive club in Honolulu says, “Members and nonmembers onl...

A: Problem Synopsis: A statement regarding an advertisement for a restaurant that is located at an excl...

Q: When BL is the operand in a MUL instruction, which registers hold the product?

A: Solution: AX register holds the product when BL is the operand in MUL instruction.

Q: Using the While keyword, write a Loop clause that processes the loop body as long as the value in th...

A: 1. while loop syntax for C++:   while (condition/test) {      // block of code }   2. Example of whi...

Q: What is business intelligence? Describe the BI framework.

A: Hey, since there are multiple questions posted, we will answer first question. If you want any speci...

Q: Each language has a set of rules that must be strictly followed when writing a program. What is this...

A: Syntax: Each language has a set of rules that defines the structure of a programming language. That...

Q: Which INT 21h function reads a single character from standard input?

A: INT 21h is the assembly language mnemonic used to perform a system call. Several functions are used ...

Q: Each object that is created from a class is called a(n) __________ of the class. a. reference b. exa...

A: Object created from class A class is a blueprint. A class has declarations of fields, properties an...

Q: To save the current contents of an array when elements are added to the array, you use the keyword i...

A: The keyword Preserve suggests that the data contained in the array will be moved to the newly genera...

Q: A(n) __________ is a property that appears in a base class but expects to be overridden in a derived...

A: In object-oriented programming, a member function declared in a base class can be overridden in a de...

Q: A(n) __________ specifies how a class member can be accessed by code outside the class. a. namespace...

A: Access of class member Access modifier is used for understanding the access of code by a class memb...

Q: 7) A condition such as "pcount < 20" has a _____value. numeric alphanumeric characte  boolean

A: The given expression is using a relational operator and checks that the pcount value is less than 20...

Q: Suppose you have a relation containing the x, y coordinates and names ofrestaurants. Suppose also th...

A: The B-Tree index form would be preferable in the following problem, since the query given is not a r...

Q: True or FalseThe test expression in a switch statement can be a double or a decimal value.

A: Given Statement: The test expression in a switch statement can be a double or a decimal value. Objec...

Q: Look at the following C++ pseudo code:   Binary_search(int a[], int size) { ……….// binary search and...

A: Given: A pseudocode in C++ including two procedures like the selection sort and the binary-search. O...

Q: Which of the following determines whether the user pressed the $ key? a. If ControlChars.DollarSign ...

A: The appropriate format for determining whether the user has pressed the" "$key is given below:-  If ...

Q: Your data warehousing project group is debating whether to prototype a data warehouse before its imp...

A: Recommendations on data warehousing projects Data warehouse is used to collect data that are used ...

Q: Q4: Design a database for an airline. The database must keep track of customers and their reservatio...

A: Suppose that the schedule of the flight is fixed across time, although we enable specification of on...

Q: How is IFIDNI different from IFIDN?

A: IFIDN is differing from IFIDNI: IFIDN means “if identical” directive and IFIDNI means “if identical ...

Q: Assume that a database has a table named Stock, with the following columns:Column Name              ...

A: Create a table named Stock. Table Stock has the following columns: Trading_Symbol of type nchar with...

Q: Write a “for” statement that print the following sequences of values. Submit a screen capture showin...

A: Programming Approach: Use the necessary header file. Defining a main function in which variables ar...

Q: What is an event-driven program?

A: Event-Driven Program Whenever any action is performed on the graphical interface or component, an e...

Q: How is a user password assigned in Oracle 12c?

A: Object privileges enable the user to work on individual objects, and device permissions allow the us...

Q: What is the role of the project leader in, first, a predictive project team, and second, in an agile...

A: The Project Leader in any project, leads their team in specific form to achieve their target in dedi...

Q: A(n) __________ is a method that executes when a specific event takes place while an application is ...

A: Event handler: An event handler is a method that includes code used for execution of specific event...

Q: (Yes/No): Will the following code jump to the label named Target?mov ax,8109hcmp ax,26hjg Target

A: The MOV instruction transfers the data from the source to the destination. SYNTAX mov destination, s...

Q: What would be a valid range for the index of an array of size 65? What are the indices of the first,...

A: To understand it in easy way, let's understand with example. Take array size to 5 In C++ the correct...

Q: please solve this in python

A: Program: import random#genrates a random number between the rangerandomNumber=random.randint(1,10)pr...

Q: A learning management system is a great digital platform to educate students online. Student who has...

A: Given: Some specifications for creating the Learning management system are provided. There should be...

Q: Consider the query:select *from r, swhere upper(r.A) = upper(s.A);where “upper” is a function that r...

A: Hash join: Hash-join itself is the type of joining techniques used for the processing of join querie...

Q: The __________ of a string object can be used to retrieve a specific set of characters from a string...

A: Substring: Substring is defined as a string within a string. String can also be said as the array o...

Transcribed Image Text

Write a program that randomly generates a number between 1-200, then asks the user to guess the number, telling them if they are too high or too low. If they go over 10 guesses, print 'You lose', if they get it in 5 guesses or less, print "Great Job!, otherwise print 'You win!'