What is the output ? def fun(n): while n%10!=0: n//=10 return n print( fun(1023045) ) a. 1 b. 10 c. 102 d. 10230 Suppose

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
correctanswer
Posts: 43759
Joined: Sat Aug 07, 2021 7:38 am

What is the output ? def fun(n): while n%10!=0: n//=10 return n print( fun(1023045) ) a. 1 b. 10 c. 102 d. 10230 Suppose

Post by correctanswer »

What is the output ?
def fun(n): while n%10!=0: n//=10 return n print( fun(1023045)
)
a. 1
b. 10
c. 102
d. 10230
Suppose that d = {1:2, 3:4}.
Which of the following lines causes an error?
d[[1,2]] = (1,2) d[(1,2)] = [1,2]
a. neither cause an error
b. only d[[1,2]] = (1,2)causes an error
c. only d[(1,2)] = [1,2]causes an error
d. both lines cause an error
What is the output ?
d = {'a':2, 'b':3, 'c':4} print( 4 in d, 'b' in d)
a. False False
b. True False
c. False True
d. True True
Register for solutions, replies, and use board search function. Answer Happy Forum is an archive of questions covering all technical subjects across the Internet.
Post Reply