Computer Science, asked by serenajacksonb, 1 year ago

edhesive 7.2 code practice Question 1 , question 2, and question 3

Answers

Answered by jenniferneloumta03
34

Answer:

7.2 code practice: question 1      

Explanation:

w= input("Enter your word or phrase:")

flag = 0  

if(w.isdigit()):

   print("All numbers")

   flag= 1

else:

for i in range(10):

 if(w.find(str(i)) >=0):

  flag= 1

  print("contains a " +str(i))

if(flag==0):

print("Does not contain numbers")

Similar questions
Math, 6 months ago