Write a python nested for loop that prints out the following pattern
100
99 98
97 96 95
94 93 92 91
90 89 88 87 86
85 84 83 82 81 80
79 78 77 76 75 74 73
72 71 70 69 68 67 66 65
64 63 62 61 60 59 58 57 56
55 54 53 52 51 50 49 48 47 46
45 44 43 42 41 40 39 38 37 36 35
34 33 32 31 30 29 28 27 26 25 24 23
22 21 20 19 18 17 16 15 14 13 12 11 10
2, Write a python nested for loop that prints out the following pattern
* # * # * # * # * # * # * # * # * # * #
* # * # * # * # * # * # * # * # * #
* # * # * # * # * # * # * # * #
* # * # * # * # * # * # * #
* # * # * # * # * # * #
* # * # * # * # * #
* # * # * # * #
* # * # * #
* # * #
* #
3. write a python program that calculates the total of the following serious of 100 numbers
+ 1/5 + 2/7 + 3/9 + 4/9 + . . .
4. what is the total sum of the numbers from question 3
Answer:
Explanation:
Here are the codes for all the programs mentioned above alongwith the output attached for the run.
feel free to comment if you need any help!
1)
Code:
n = 100
for i in range(1, 14):
for j in range(i):
print(n, end=' ')
n = n-1
print()
Output:
2)
Code:
for i in range(10, 0, -1):
for j in range(i):
print('*#', end=' ')
print()
Output:
3)
Code:
num = 1
den = 5
sum = 0
for i in range(100):
n = num/den
sum = sum + n
num = num + 1
den = den + 2
print(sum)
Output:
4) The total should be 47.05
It is shown above in the output.
PLEASE UPVOTE IF YOU FOUND THIS HELPFUL!
PLEASE COMMENT IF YOU NEED ANY HELP!
Write a python nested for loop that prints out the following pattern 100 99 98 97...
Write a Python program (using a nested loop) to print out the following pattern (there is a space between the numbers next to each other). 1 2 1 3 2 1 4 3 2 1 5 4 3 2 1
5. Mark’s class just took the admission test for business school and averaged 87.05. Chapter 10 Data Set 2 contains the population of scores for the 10 other classes in Mark’s university. How did Mark’s class do? Class 1 Class 2 Class 3 Class 4 Class 5 Class 6 Class 7 Class 8 Class 9 Class 10 78 81 96 85 88 78 90 79 96 86 77 78 97 90 88 82 86 93 87 89 78 93 88...
python Write a Python program to construct the following pattern, using a nested for loop. * * * * * * * * * * * * * * * * * * * * * * * * * * *
Problem #1: Consider the below matrix A, which you can copy and paste directly into Matlab. The matrix contains 3 columns. The first column consists of Test #1 marks, the second column is Test # 2 marks, and the third column is final exam marks for a large linear algebra course. Each row represents a particular student.A = [36 45 75 81 59 73 77 73 73 65 72 78 65 55 83 73 57 78 84 31 60 83...
8. The following data are scores from a Physics final administered to 34 students. 81 76 93 99 47 67 69 72 83 88 56 62 91 94 98 63 77 84 98 75 79 67 73 65 89 86 91 85 97 73 56 92 88 83 Use the Chart below to construct a Frequency Distribution with 5 classes (15 pts) Class Tally (This column is optional.) Frequency
1. Forecast demand for Year 4. a. Explain what technique you utilized to forecast your demand. b. Explain why you chose this technique over others. Year 3 Year 1 Year 2 Actual Actual Actual Forecast Forecast Forecast Demand Demand Demand Week 1 52 57 63 55 66 77 Week 2 49 58 68 69 75 65 Week 3 47 50 58 65 80 74 Week 4 60 53 58 55 78 67 57 Week 5 49 57 64 76 77...
Use the following collection of 30 test scores: 100, 65, 67, 61, 62, 70, 75, 73, 88, 77, 83, 79,95, 79, 8102, 86, 87, 87, 91, 87, 89, 92, 90, 99, 87, 72, 93, 79, 52 a. Construct a frequency distribution table using 6 classes: include classes, frequencies, class marks, class boundaries, relative frequencies, and relative percentages. b. Find the mean to the nearest tenth and sample standard deviation to the nearest tenth. c. Use the results from part b...
Question 9-15 are based on the random sample below which is obtained to test the following hypothesis about the population mean. Test the hypothesis that the mean is less than 80. 80 100 81 93 80 57 98 90 71 56 58 78 59 55 55 77 72 78 56 94 98 59 93 86 89 62 60 66 59 71 96 97 94 69 64 77 87 77 64 90 90 95 98 99 56 69 72 81 95...
Ex1 In Python Write a while loop that prints out a list containing the first 5 numbers that are multiples of 9 from 1 to 100. (Hint: use break statement) The output should be [9, 18, 27, 36, 45]
Microsoft Excel Question. I'm having trouble using the vlookup function, I have calculated a final numerical grade for a hypothetical course, and and trying to use a set of numerical grades with their corresponding letter grades to get a vlookup function to return the letter grade from the numerical grade. However the function for some reason only returns the lowest value out of the set grades, not the closest match. Projects Classwork Teamwork/Integrity 100 100 A+ 98 A+ 97 A...