
Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
expand_more
expand_more
format_list_bulleted
Question
Write a pseudocode for this python
# loop to generate numbers from 1 t0 50
for num in range(1,51):
# checking the divisibility and printing the message
if num %3 ==0:
print("Wooly")
elif num %5 == 0:
print("Bully")
elif num %3 == 0 and num %5 == 0:
print("Wooly BullY")
else:
print(num)
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by stepSolved in 2 steps

Knowledge Booster
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
- In CORAL LANGUAGE please and thank you! Summary: Given integer values for red, green, and blue, subtract the gray from each value. Computers represent color by combining the sub-colors red, green, and blue (rgb). Each sub-color's value can range from 0 to 255. Thus (255, 0, 0) is bright red, (130, 0, 130) is a medium purple, (0, 0, 0) is black, (255, 255, 255) is white, and (40, 40, 40) is a dark gray. (130, 50, 130) is a faded purple, due to the (50, 50, 50) gray part. (In other words, equal amounts of red, green, blue yield gray). Given values for red, green, and blue, remove the gray part. Ex: If the input is: 130 50 130 the output is: 80 0 80 Hint: Find the smallest value, and then subtract it from all three values, thus removing the gray.arrow_forwardCreate a Flowchart for the python code below for the nested loops. Program: numSet = [1,2,3] #list of number alphaSet = ['A', 'B', 'C'] #list of alphabets for num in numSet: #loop to iterate over numbers for alpha in alphaSet: #loop to iterate over alphabets print(num,alpha) #printing the resultarrow_forwardOverview This program will prompt a user for a start and a limit, it will then while-loop through, doubling the iterator each pass, until the limit is reached. Expected Output Example 1 Enter the start of the loop: Enter the limit of the loop: 25 The current value is 3 The current value is 6 The current value is 12 The current value is 24 The last value of current that was less than 25 was 24 Example 2 Enter the start of the loop: 25 Enter the limit of the loop: 102 The current value is 25 The current value is 50 The current value is 100 The last value of current that was less than 102 was 100 Specifications • You should submit a single file called M5A2.py • It should follow the submission standards outlined here: Submission Standards Your program populate an integer named start using input • Your program populate an integer named limit using input Your program must use an iterator named current Your program must move through the values using a while-loop Tips and Tricks That last…arrow_forward
- Questio Write a program that receives a series of characters from the user, the program stops if the user enters the same character two consecutive times, the program should display the number of entered characters at the end of the program (the last duplicated character is counted only once): Sample Run: Enter your characters: asbnmkrr we got 7 characters please wirte it in java using loops please answer it in java using netbeans.arrow_forwardPlease answer in python with showing the codesarrow_forwardWrite thisd code in python lqanguagearrow_forward
- Note: It python code The code needs validation to filter any inputs Given Code: print("USING WHILE LOOP") lower_bound=int(input("Enter the lower bound: ")) upper_bound=int(input("Enter the upper bound: ")) incVal=int(input("Enter a number to increment by: ")) print("\n") while(lower_bound<=upper_bound): print(lower_bound) lower_bound=lower_bound+incVal Example output 1 : USING WHILE LOOP Enter the lower bound: 1Enter the upper bound: 10Enter a number to increment by: 1 12345678910 Example Output 2: USING WHILE LOOPEnter the lower bound: 10Enter the upper bound: 1Enter a number to increment by: 1 Invalid Input Example Output 3: USING WHILE LOOPEnter the lower bound: 1Enter the upper bound: -10Enter a number to increment by: 1 Invalid Inputarrow_forwardPython programing language 1. You just got a job working for the local Honda motorcycle shop. For every motorcycle you sell you get 10% commission. Using a while loop create the following output. Enter the sale amount: 9999Your commission is $999.90.Your paycheck will be $999.90.Did you make another sale: YEnter the sale amount: 4599Your commission is $459.90Your paycheck will be $1,459.80Did you make another sale: N 2. Write an application that uses a while loop to validate 3 test scores. What is the first test score: 101Please re-enter a number between 0 and 100What is the first test score: 100What is the second test score: 110Please re-enter a number between 0 and 100What is the second test score: 99What is the third test score: 87With an average score of 95.33% you are on track for an A in this course.arrow_forwardAnswer in Python 3! Frequency analysis loop programarrow_forward
- # Question 1low = 3hi = 50total = 0 # replace this for-loop with a while loop# don't change any more than is necessary for m in range (hi, low-1,-2): total = total + m print("Total is", total) Subject: Python Programmingarrow_forwardC program onlyarrow_forwardLooping for Statements Write a program that will display a multiplication table with the format shown below. The range of the table 2 10 10 20 30 100 X123 1123 X 3 10 2246 3369 2 4 10 20 30arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education

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)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON

C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON

Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning

Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education