Answered step by step
Verified Expert Solution
Question
1 Approved Answer
4. What is the output of this program? Your answe LIMIT 10 2sum0 3 for i in range (1, LIMIT 1) sum- float (-1)(i+1)/2* 5
4. What is the output of this program? Your answe LIMIT 10 2sum0 3 for i in range (1, LIMIT 1) sum- float (-1)(i+1)/2* 5 print( 'sum of . , ?,' term(s)' , format (sum , , . 3f , ) ) 6 print () 7 print( ' surn of ''?,'term(s)', forma t (sun,..3ft)) 5. What is the output of this program, if the input is "This is a test'? 1 def main): 2 str input ('Enter a string: Your ans index = len (str) 4 print ( 'The new string is: ',string_change (str)) 5 def string change(strl): 6 nstr index len (str1) while index > 0: nstr str1l index 11 index-index 1 10 11 return nstr 12 main () 6. What is the output of this program? 1 charl - 2 char2=' ' Your answer: 3 size 6 4 for row in range (size): 5 for col in range(size): if (row>col): print (charl, end-') else: print (char2, end-) 10 print() 11 print (" InJob completed!'")
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