Step 1: When we divide 1/3 and the output will be 0.3333333333333333
Step 2: storying the values in dummy list
Step 3: print(dummy[-1]) will print the last value of the list
Ans : A. it outputs 3
Step 1: When we divide 1/3 and the output will be 0.3333333333333333
Step 2: storying the values in dummy list
Step 3: print(dummy[-1]) will print the last value of the list
Ans: 3
Correct answer is A
string = str(1/3)
dummy = ''
for character in string:
dummy = dummy + character
print (dummy [-1])
upvoted 2 times
...
Log in to ExamTopics
Sign in:
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
iemi
2 days, 4 hours agothewoodsii81
1 week, 1 day agojarun2024
2 months, 2 weeks agojarun2024
2 months, 2 weeks agoDave304409
4 months, 3 weeks agoDKAT2023
4 months, 3 weeks agokstr
5 months, 2 weeks ago