Question
Python Part two: Fill in the blank3 points for each question, 30 points in total 1the result of format(3.146525, 10.3%) is ________ 2if x >
Python
Part two: Fill in the blank3 points for each question, 30 points in total 1the result of format(3.146525, 10.3%) is ________ 2if x > 0: y = 1 else: y = 3 Convert the program into a conditional expression _________ 3i = 1 while i < 10: if i % 2 !=0: print(i, end = 2* i) #there is one space before 2 i += 1 The result of the program is ________
4i = 1;sum1 = 0; while i != 0.0: sum1 += i i -= 0.1 print(sum1 =, sum1) The result of the program is ________ 5for i in range(1, 4): for j in range(1, 4): if i * j > 2: continue print(i * j) The result of the program is ________ 6def f(x, y): return x + y, x - y, x * y, y // x a = f(2, 7) After we running the program, the elements of a are________ 7s = asdasda; The value of s[2:10] + s[1:3] is_________ 8a = [1, 2, 3]; b = [10, 20, 30]; Then the result of a + b is ________ 9The result of [i * j for i in abc for j in range(1, 3)] is_________ 10a = [[1]]; b = [1]; a.extend(b *3); The result of a is_________
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started