Home / MCQ Bank / Computer
Computer Formatting And Decorators

What will be the output of the following Python code? '{0:f}, {1:2f}, {2:05.2f}'.format(1.23456, 1.23456, 1.23456)

Select the best option to verify your answer:
Show Correct Answer
Correct Answer: Option D • '1.234560, 1.234560, 01.23'

Related Computer Questions

Which one of the following is not attributes of file? A sizeable geographical area with communication based on the telephone system is though as Which event is raised when a user presses a key while a control has focus in a Windows Forms Application? What is the output of the following code? #include<stdio.h> int recursive_binary_search(int *arr, int num, int lo, int hi) { if(lo > hi) return -1; int mid = (lo + hi)/2; if(arr[mid] == num) return mid; else if(arr[mid] < num) lo = mid + 1; else hi = mid - 1; return recursive_binary_search(arr, num, lo, hi); } int main() { int arr[8] = {1,2,3,4,5,6,7,8},num = 7,len = 8; int indx = recursive_binary_search(arr,num,0,len-1); printf("Index of %d is %d",num,indx); return 0; } How do you create a factor in R named color with levels "red", "green", and "blue"?