#1 Name Use a loop to write your name ten times Advanced: Show a couple different ways to do it

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

python3

#1 Name
- Task: Use a loop to write your name ten times.
- Advanced: Show a couple of different ways to do it.

#2 Fifty
- Task: Ask the user to enter a number and tell them if the number is greater than 50 or not.
- Advanced: Ensure valid input by making sure the user enters a number and not random text.

#3 Absolute
- Task: Ask the user to enter a number, then print the absolute value of it.

#4 Random
- Task: Print out a random number between 100 and 200 using the random function.

#5 Free Choice
- Task: Create a program that uses any math function not previously used (excluding random or absolute value functions). For example, write a program that calculates the power of something or the square root. You can research math functions online to select one.

#6 Voltage
- Task: Ask the user to enter a number and then categorize it:
  - Less than 30: low voltage
  - 30-60: medium voltage
  - 61-100: high voltage

#7 Namecount
- Task: Redo Task #1, but each time you print your name, also display the value of the loop counter. Perform this ten times.
  - Example output:  
    - Patti K 0  
    - Patti K 1  
    - Patti K 2  

#8 Fiftytally
- Task: Redo Task #2, but this time, use a loop that continually prompts for numbers until the user enters 0. Upon exiting the loop, inform the user of how many times their numbers exceeded 50. This requires using a loop and tracking how often numbers greater than 50 are entered.
Transcribed Image Text:#1 Name - Task: Use a loop to write your name ten times. - Advanced: Show a couple of different ways to do it. #2 Fifty - Task: Ask the user to enter a number and tell them if the number is greater than 50 or not. - Advanced: Ensure valid input by making sure the user enters a number and not random text. #3 Absolute - Task: Ask the user to enter a number, then print the absolute value of it. #4 Random - Task: Print out a random number between 100 and 200 using the random function. #5 Free Choice - Task: Create a program that uses any math function not previously used (excluding random or absolute value functions). For example, write a program that calculates the power of something or the square root. You can research math functions online to select one. #6 Voltage - Task: Ask the user to enter a number and then categorize it: - Less than 30: low voltage - 30-60: medium voltage - 61-100: high voltage #7 Namecount - Task: Redo Task #1, but each time you print your name, also display the value of the loop counter. Perform this ten times. - Example output: - Patti K 0 - Patti K 1 - Patti K 2 #8 Fiftytally - Task: Redo Task #2, but this time, use a loop that continually prompts for numbers until the user enters 0. Upon exiting the loop, inform the user of how many times their numbers exceeded 50. This requires using a loop and tracking how often numbers greater than 50 are entered.
Expert Solution
Step 1

“Since you have asked multiple question, we will solve the first question for you. If you
want any specific question to be solved then please specify the question number or post
only that question.”

Python:-

Its high-level defined data structures, along with dynamic typing and dynamic binding, make it particularly appealing for use in rapid application development as well as as a scripting or glue language to join together preexisting components. 

steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Types of Loop
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.
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education