Question
plz answers these short Qs in python language Q1-Given the String variable address, write an expression that returns the position of the first occurrence of
plz answers these short Qs in python language
Q1-Given the String variable address, write an expression that returns the position of the first occurrence of the String "Avenue" in address.
Q2-Write a sequence of statements that finds the first comma in the string associated with the variable line, and associates the variable clause the portion of line up to, but not including the comma.
Q3-Assume that sentence is a variable that has been associated with a string consisting of words separated by single space characters with a period at the end. For example: "This is a possible value of sentence."
Write the statements needed so that the variable secondWord is associated with the second word of the value of sentence . So, if the value of sentence were "Broccoli is delicious." your code would associate secondWord with the value "is" .
Q4-Write an expression whose value is the result of converting the int value 42 to a str (consisting of the digit 4 followed by the digit 2).
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