Get Instant Help From 5000+ Experts For
question

Writing: Get your essay and assignment written from scratch by PhD expert

Rewriting: Paraphrase or rewrite your friend's essay with similar meaning at reduced cost

Editing:Proofread your work by experts and improve grade at Lowest cost

And Improve Your Grades
myassignmenthelp.com
loader
Phone no. Missing!

Enter phone no. to receive critical updates and urgent messages !

Attach file

Error goes here

Files Missing!

Please upload all relevant files for quick & complete assistance.

Guaranteed Higher Grade!
Free Quote
wave
Python Loop Exercises: Find 3 Odd Numbers and Check for Letter in a Word Before Given Letter

Mini-Exercise 1

MINI-EXERCISE 1 Exercise A Write a while loop that repeatedly asks the user for a number until exactly 3 odd numbers have been given. QUESTION 1: You have a code that starts with the following lines – s = input("Give me a word: ") c = input("Give me a letter: ") Write a loop that checks if s contains any letter that occurs before c in the alphabet. Assume all letters in s and c are lowercase. Modify "contains" to be True or False depending on the above Hint: Remember that "a" < "b" < "c" ... in Python To get you started, try completing the code below: contains = False for char in s: # ... QUESTION 2: Solve the same question as above, using two other types of loops: 2.1: Write this using a for-range loop i.e. for i in range(...) 2.2: Write this using a while loop QUESTION 3: Which of your three solutions (from 1, 2.1, 2.2) do you like best and why? QUESTION 4: Write a modified solution (using any type of loop you want) that works even if the given word s and letter c could have mixture of uppercase and lowercase letters. I can no longer simply use "<" because recall that "D" < "a" is True even though "a" clearly occurs before "d" in the actual alphabet. Hint: Use one of the string methods to help you out.

support
Whatsapp
callback
sales
sales chat
Whatsapp
callback
sales chat
close