Database System Concepts
Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
Bartleby Related Questions Icon

Related questions

bartleby

Concept explainers

Question

In Python lang.

ONE

  1. Generate a random number between 1 and 100. That will be the number that the user should guess. Please print the random number.
  2. Generate a random number by using the random.randint function
  3. Try several times to check that the number produced is random.

TWO: 0010

  1. Create a variable and ask the user to input a number.
  2. Ask the user to input a number in a variable that will be rewritten every time the user inserts a number and

Enforce the rules:

  1. Enforce that the input is a digit from 1 to 100.
  2. Give feedback to the user if the number needs to meet the rule.
  3. Allow the user to input the number again.

If the number meets the rules, convert the input [a string] into an integer and evaluate if the guessed number is the same as the randomly generated number

FOUR:

Evaluate if the randomly generated number is the same that the number input by the user. 

FIVE:

  1. Use the dictionaries that you created for faculty members.
  2. Be sure that all the dictionaries have the same keys: name, last name, etc.
  3. If there are keys or values missing, add them. If you do not have the value, you can use 'n/a' or 'TBD'.
  4. Make a list of the dictionaries.
  5. Loop the list to print all the information available to each faculty member.

SIX:

Make a dictionary with the US states and their capitals (listed at the end of this file). The keys will be the states, the capitals will be the values. i.e. 'New York'  : 'Albany'

  1. Use a loop to print 50 messages, one for each of the 50 states, that say:

‘Albany city is the capital of New York state.'

  1. Use a loop to print the 50 names of the states adding at the end the word state and a dot. Use end=.
  2. Use a loop to print the 50 capitals and add at the end the word city and a dot.
  3. Slow back the process by 2 seconds by using the time method.
Expert Solution
Check Mark
Knowledge Booster
Background pattern image
Computer Science
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Text book image
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Text book image
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
Text book image
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Text book image
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Text book image
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education