Answer:
Following are the python code to print the given pattern:
print('FOURTH') # using print method
for i in range(10): #using loop to count numbers
for j in range(10-i): # use loop to print asterisk value in reverse order
print("*", end=" ") #print value
print("") #using print method for space
Output:
Please find the attachment.
Explanation:
The description of the above python program can be described as follows:
- In the first line, use the print method, that print message "FOURTH".
- In the next line, two for loop is used in which the first loop counts the number to be print value, inside the loop another for loop is used.
- In this loop, it prints asterisk values in its reverse order and for new lines, it will use the print method with a single white space.
Certificate Of Deposit- It will be unaccesible and will help her the best.
<span>c. Department of Advanced Research Projects Agency</span>
Answer:
<u>Solution a</u>
- n = int(input("Enter an integer: "))
-
- sum = 0
-
- for x in range(1, n+1):
- sum += x
-
- print(sum)
<u>Solution b</u>
- n = int(input("Enter an integer: "))
-
- for a in range(1, n + 1):
- sum = 0
- for x in range(1, a+1):
- sum += x
- print(sum)
Explanation:
Solution code is written in Python 3.
<u>Solution a</u>
First get the user input for an integer (Line 1).
Create a variable sum and initialize it with zero value (Line 3).
Create a for loop to traverse through the number from 1 to integer n (inclusive) and sum up the current number x (Line 5-6).
Print the sum to terminal (Line 8).
<u>Solution b</u>
Create an outer for loop that traverse through the number from 1 to integer n (inclusive) (Line 3).
Create an inner loop that traverse through the number from 1 to current a value from the outer loop and sum up the current x value (Line 5-6).
Print the sum to terminal (Line 7) and proceed to next iteration and reset the sum to zero (Line 4).
Answer:
D
Explanation:
How I'll understanding the intended audience of a media piece help you? It explains the purpose and meaning of the media piece. ... Rules that help readers understand the meaning of texts. What is the design or organization of a text called?