subject

Copy andpaste this into this linkhttps://www. programiz. com/python-programming/online-compi ler/ then answer the questions below. Will give brainliest if you do it correctly def myFunction():
a = int(input("Type in a number. "))
b = 1
for i in range(1, a + 1, 1):
b *= i
c = 0
for j in range(1, a + 1, 1):
c += j
d = 1
myTuple = (b , c)
return myTuple

x = myFunction()
print(x[0])
print(x[1])
print(x[-1])
print(x[-2])
tuple2 = 3 * x
print(tuple2)

1. What is the value of x[1] when the user types in 5?
2. What is the value of x[0] when the user types in 8?
3. What is the value of x[-1] when the user types in 4?
4. WHat is the value of tuple2[4] when the user types in 7?
5. Add a line that has tuple3 = x + tuple2. What is the value of tuple3[5] when the user types in 6?

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 11:30
To hide gridline when you display or print a worksheet
Answers: 1
question
Computers and Technology, 22.06.2019 13:00
Which part of the cpu accepts data?
Answers: 1
question
Computers and Technology, 23.06.2019 00:10
Write a function so that the main0 code below can be replaced by the simpler code that calls function mphandminutes tomiles0. original main0 int main) l double milesperhour-70.0; double minutestraveled = 100.0; double hourstraveled; double milestraveled; hourstraveled = minutestraveled / 60.0; milestraveled = hourstraveled * milesperhour; cout < "miles" 2 using namespace std; 4 /* your solution goes here/ 6 int maino 1 test passed 7 double milesperhour 70.0 all tests passed 8 double minutestraveled 100.0; 10 cout < < "miles: " < < mphandminutestomiles(milesper-hour, minutestraveled) < < endl; 12 return 0; 13
Answers: 1
question
Computers and Technology, 23.06.2019 15:00
Based on the current economic situation do you expect the employment demand for graduating engineers to increase or decrease? explain the basis for your answer. with a significant economic recovery, what do you think will happen to future enrollments in graduating engineering programs?
Answers: 1
You know the right answer?
Copy andpaste this into this linkhttps://www. programiz. com/python-programming/online-compi ler/ th...
Questions
question
Mathematics, 16.07.2021 22:20
question
Mathematics, 16.07.2021 22:20
question
Biology, 16.07.2021 22:20
question
Biology, 16.07.2021 22:20
question
English, 16.07.2021 22:20
Questions on the website: 13722363