Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Problem 1. Determine the output of the following code: a= ([10.11],[12.13.14], {15,16}) [100] z.extend (x) x [2].add Hello) x = a[0] x. append (100) x10:2]-[200.300]

image text in transcribed

Problem 1. Determine the output of the following code: a= ([10.11],[12.13.14], {15,16}) [100] z.extend (x) x [2].add Hello) x = a[0] x. append (100) x10:2]-[200.300] a 1. append (a [2]) a [1][3]. add (50) print (a) print (x) print(z) Explain this result (draw pictures) Problem 2. Write a function that takes as input strings of the form '32F" or 100C, which represent temperatures in the Fahrenheit (F) or Celsius (C) scale. The return vale of the function should be a string where the input has been converted to the other temperature scale. Include the trailing F or C to indicate the scale of the output Problem 3. Write a function char.table(s), where s is a string. The function should produce a table that shows the characters in the string and the number of occurrences of each character. Make the table nicely format- ted, using right justification for the numbers (check out the format command.) List the characters in order (the order in the character encoding). Give some examples of the output

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design Application Development And Administration

Authors: Mannino Michael

5th Edition

0983332401, 978-0983332404

Students also viewed these Databases questions