![tblynch21](/avatars/34924.jpg)
tblynch21
16.12.2020 •
Computers and Technology
A pre-design document you can use to create a new project quickly
Solved
Show answers
More tips
- G Goods and services How to Choose a Bread Maker?...
- A Art and Culture Who Said The Less We Love a Woman, the More She Likes Us ?...
- F Family and Home How to Get Rid of Your Neighbors?...
- S Society and Politics How Could Nobody Know About the Dead Mountaineers?...
- H Health and Medicine How to Cure Adenoids?...
- H Health and Medicine Why Wearing a Back Brace Can Be Beneficial During Back Strain?...
- S Sport When and Where Will the 2014 World Cup be Held?...
- C Computers and Internet How to Choose a Monitor?...
- H Horoscopes, Magic, Divination Where Did Tarot Cards Come From?...
Answers on questions: Computers and Technology
- C Computers and Technology WILL MARK BRAINLIEST! By the mid-1990s, how did revenue generated from video games compare to revenue generated from movies? A.Revenue made from video game sales still...
- H History 25 POINTS ANSWER ASAP Choose the right phrase to complete the sentence. The rebels are Union Soldiers/Confederate Soldiers /escaped enslaved people. Which One ?...
- M Mathematics Please hurry 20 points...
- M Mathematics Write an equation for the line described. Write the equation in the form specified. parallel to y + 8x = 4, through (3, 4); slope-intercept form Select one: A. y = 8x...
- C Chemistry Compounds are substances. neutral charged ionized non-neutral...
- B Biology Which animal group has mostly live births?...
- E English I don t really like language sorry whoever is doing this answer...
- M Mathematics A large map has a scale of 121 inches = 40 miles. If two cities are 121 feet apart on the map, what is the actual distance between them?...
- M Mathematics ( − + 5 + 3)2; simplify...
- M Mathematics Find the 90% confidence interval for the population standard deviation given the following. n = 51, x = 11.49, s = 2.34 and the distribution is normal. a. 1.92 σ 3.25...
Ответ:
13) B - Landscape and Portrait
14) C - Template
Explanation:
The two print options are known as landscape and portrait and a template is a pre-designed document.
Ответ:
h = 19 # h is already assigned a positive integer value 19
i = 1 # used to calculate perfect square
q = 0 # stores the sum of the perfect squares
while q < h:
# this loop executes until value of number of perfect squares is less than h
q = q + (i*i) # to calculate the sum of perfect squares
i = i + 1 # increments i by 1 at every iteration
print(q) # displays the sum of perfect squares
Output:
30
Explanation:
Here we see that the sum of the perfect square is printed in the output i.e. 30. If we want to assign value 4 to q then we should alter the code as following:
h = 19
i = 1
sum_of_ps = 0
q=0
while sum_of_ps < h:
sum_of_ps = sum_of_ps + (i*i)
q = q + 1
i = i + 1
print(q)
If you want to take input from the user and also display the perfect squares in output you can use the following code:
h = int(input('Enter the value of h: ')) #takes value of h from user
i = 1
sum_of_ps = 0
q=0
while sum_of_ps < h:
sum_of_ps = sum_of_ps + (i*i)
print(i*i) #displays the perfect squares of h
q = q + 1
i = i + 1
print(sum_of_ps) #displays sum of perfect squares
print(q) #displays number of perfect squares whose value is less than h
Output:
1
4
9
16
30
4
2)# k and m are already assigned positive integers 10 and 40
k = 10
m = 40
i = 1 # i is initialized to 1
q = 0 # q stores the number of perfect squares between k and m
while i*i < m: # loop computes perfect square of numbers between k and m
if i*i > k:
q = q + 1 # counts the number of perfect squares
i = i + 1 #increments the value of i at each iteration
print (q) # prints the no of perfect squares between k and m
If you want to display the perfect squares too use , add print(i*i) statement after if statement if i*i > k:
Output:
3
3)def Fibonacci(n): # method Fibonacci which has an integer parameter n
if n <= 1: # if the value of n is less than or equals to 1
result = n # stores the value of n into result
elif n > 1: # else if the value of n is greater than 1
result = Fibonacci(n-1) + Fibonacci(n-2)
# calls Fibonacci method recursively to associate nth value of Fibonacci #sequence with variable result
return result #returns the final value stored in result variable
print(Fibonacci(8))
#calls Fibonacci function and passes value 8 to it
Output:
21