Page 1 of 1

Exercise 5: string format and F-strings [2 marks] a. Display sin and cos values of n in the range 1 to 10 in a tabular f

Posted: Mon Jun 06, 2022 6:35 pm
by answerhappygod
Exercise 5 String Format And F Strings 2 Marks A Display Sin And Cos Values Of N In The Range 1 To 10 In A Tabular F 1
Exercise 5 String Format And F Strings 2 Marks A Display Sin And Cos Values Of N In The Range 1 To 10 In A Tabular F 1 (39.95 KiB) Viewed 23 times
.
Exercise 5: string format and F-strings [2 marks] a. Display sin and cos values of n in the range 1 to 10 in a tabular format as given below with 5 decimals. Use formatting method from string class. 1 0.84147 0.54030 2 0.90930 -0.41615 3 0.14112 -0.98999 4 -0.75680 -0.65364 5 -0.95892 0.28366 6 -0.27942 0.96017 7 0.65699 0.75390 8 0.98936 -0.14550 9 0.41212 -0.91113 3 10 -0.54402 -0.83907 b. Using F-String format print n and 2**n as given below. n is in the range 0 to 160 increment by 8. n is right aligned, and 2**n is center aligned. 1 256 65536 167772 16777216 4294967296 800 1099511627776 DA 281474976710656 ar 72857594837927936 (857594651921936 18446744073709551616 4722366482869545213696 1802501 1208925819614629174786176 2012 309485089821345058724781856 79228162514264337593543958336 383002 20282409683651670423947251286816 5192296858534827 1530496329220096 136 132922799578491587 03887860280344576 340282366920938463463374607431768211456 87112285931768246646623899582532662132736 22300745198538623141535718272648361505988416 5788990770823839524233143877797980545538986496 160 1461501637338902918203684832716283019655932542976 144 152 8场科卫快格拓科及酷丽%退位远离说说