*5.20 (Display four patterns using loops) Use nested loops that display the following patterns in four separate programs: Pattern A Pattern B Pattern C Pattern D 1 2 3 4 5 6 1 2 3 4 5 1 2 3 4 1 2 3 1 2 3 45 6 1 2 3 45 1 2 3 4 1 2 3 1 2 1 1 2 2 1 3 2 1 4 3 2 1 54321 12 3 1 2 3 4 1 2 3 45 1 2 3 4 5 6 1 2 6 5 4 32 1 1

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
3
34
56
7 6
3
2 3 4
6 7
*5.20
(Display four patterns using loops) Use nested loops that display the following
patterns in four separate programs:
Pattern A
Pattern B
Pattern C
Pattern D
1 2 3 4 5 6
1 2 3 4 5
1 2 3 4
1 2 3
1 2
1 2 3 4 56
1 2 3 4 5
1 2 3 4
1 2 3
1 2
1
1 2
1 2 3
1 2 3 4
1 2 3 45
1 2 3 4 5 6
2 1
3 2 1
4 321
5 4 3 2 1
6 5 4 3 2 1
1
**5.21 (Display numbers in a pyramid pattern) Write a nested for loop that displays the
following output:
N2
44
Transcribed Image Text:3 34 56 7 6 3 2 3 4 6 7 *5.20 (Display four patterns using loops) Use nested loops that display the following patterns in four separate programs: Pattern A Pattern B Pattern C Pattern D 1 2 3 4 5 6 1 2 3 4 5 1 2 3 4 1 2 3 1 2 1 2 3 4 56 1 2 3 4 5 1 2 3 4 1 2 3 1 2 1 1 2 1 2 3 1 2 3 4 1 2 3 45 1 2 3 4 5 6 2 1 3 2 1 4 321 5 4 3 2 1 6 5 4 3 2 1 1 **5.21 (Display numbers in a pyramid pattern) Write a nested for loop that displays the following output: N2 44
V buppuSG Llat uiC tulioN Ior a uni-
versity is $10,000 this year and increases 5% every year. Write a program that
computes the tuition in ten years and the total cost of four years' worth of tuition
starting ten years from now.
5.10 (Find the highest score) Write a program that prompts the user to enter the number
of students and each student's score, and displays the highest score. Assume that
the input is stored in a file named score.txt, and the program obtains the input from
the file.
*5.11
(Find the two highest scores) Write a program that prompts the user to enter the
number of students and each student's score, and displays the highest and second-
highest scores.
5.12
(Find numbers divisible by 5 and 6) Write a program that displays, ten numbers
per line, all the numbers from 100 to 1,000 that are divisible by 5 and 6. The num-
bers are separated by exactly one space.
5.13
(Find numbers divisible by 5 or 6, but not both) Write a program that displays, ten
numbers per line, all the numbers from 100 to 200 that are divisible by 5 or 6, but
not both. The numbers are separated by exactly one space.
5.14
(Find the smallest n such that n> 12,000) Use a while loop to find the smallest
integer n such that n2 is greater than 12,000.
(Find the largest n such that n' < 12,000) Use a while loop to find the largest
integer n such that n is less than 12,000.
5.15
*S 16
Fon Lieting 5 8 onothor solution to find
Transcribed Image Text:V buppuSG Llat uiC tulioN Ior a uni- versity is $10,000 this year and increases 5% every year. Write a program that computes the tuition in ten years and the total cost of four years' worth of tuition starting ten years from now. 5.10 (Find the highest score) Write a program that prompts the user to enter the number of students and each student's score, and displays the highest score. Assume that the input is stored in a file named score.txt, and the program obtains the input from the file. *5.11 (Find the two highest scores) Write a program that prompts the user to enter the number of students and each student's score, and displays the highest and second- highest scores. 5.12 (Find numbers divisible by 5 and 6) Write a program that displays, ten numbers per line, all the numbers from 100 to 1,000 that are divisible by 5 and 6. The num- bers are separated by exactly one space. 5.13 (Find numbers divisible by 5 or 6, but not both) Write a program that displays, ten numbers per line, all the numbers from 100 to 200 that are divisible by 5 or 6, but not both. The numbers are separated by exactly one space. 5.14 (Find the smallest n such that n> 12,000) Use a while loop to find the smallest integer n such that n2 is greater than 12,000. (Find the largest n such that n' < 12,000) Use a while loop to find the largest integer n such that n is less than 12,000. 5.15 *S 16 Fon Lieting 5 8 onothor solution to find
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 8 steps with 3 images

Blurred answer
Follow-up Questions
Read through expert solutions to related follow-up questions below.
Follow-up Question

That is not Python. We are currently using Python 3 IDE.

Solution
Bartleby Expert
SEE SOLUTION
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY