Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question 1: What is the output of each of the following pieces of Python code. Code Output A. import re text - 302.33 64.52 204.24

image text in transcribed
Question 1: What is the output of each of the following pieces of Python code. Code Output A. import re text - "302.33 64.52 204.24 532.2 res = re.findall("[0-9] (3) [:][0-9](2)", str) print (res) B. import re text = 'Petra: The Rose Red City res = re.findall('R.+', text) print (res) C. import re text - 'aaref@psut.edu.jo res-re.search(@\\S+', text) if res: print("Valid input") else: print("Invalid ") phrase = "Petra is known for its Hellenistic architecture" D. counter = 0 letters for word in phrase.split(): for letter in word: letter = letter.lower() if letter not in letters.keys (): letters(letter] =0 letters[letter) = 1 for key in letters, keys (: if letters [key] > 2: counter += 1 print (counter)

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_2

Step: 3

blur-text-image_3

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

Beyond Big Data Using Social MDM To Drive Deep Customer Insight

Authors: Martin Oberhofer, Eberhard Hechler

1st Edition

0133509796, 9780133509793

More Books

Students also viewed these Databases questions