Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Author - Please specify your name and email ( 1 point ) Q 1 . Declare two integers. Print the lesser of two given numbers

Author - "Please specify your name and email" (1 point)
Q1. Declare two integers. Print the lesser of two given numbers if both numbers are even,
but print the greater number if one or both the numbers are odd.
Declar **5** pairs of such examples. (2 points)
**Input-1:**
number_one =40
number_two =50
**Output-1:**
40
Q2. Entity Recognition
For the given sentence below -
a. Use the `split()` function to split the sentence in word tokens (2 points)
b. Loop through the returned list using any loop statment (1 point)
c. During your loop, check if the token is an animal using if statment and print statment "Animal found", if found one. You must use animals list given below and use 'in' operator (3 points)
sentence = "The quick brown fox jumps over the lazy dog"
animals =['fox','elephant','dog', 'monkey']
# Write your code here
Q3. For two-word strings given below. Print `True` if both the words begin with
the same letter otherwise print `False`(1 point)
str1= "Hello World"
str2= "Jumping Jack"
#Write your code here

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

Mobile Communications

Authors: Jochen Schiller

2nd edition

978-0321123817, 321123816, 978-8131724262

More Books

Students also viewed these Programming questions

Question

LO2.6 Explain how the market system deals with risk.

Answered: 1 week ago