Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Lernen Challenge: Cat Fact Analyzer | Advanced API Usage and Data Processing
Working with APIs in Python

bookChallenge: Cat Fact Analyzer

In this challenge, you will deepen your skills with APIs and text processing in Python. You will use the Cat Facts API to fetch a list of 10 facts about cats. Your goal is to analyze these facts and determine how many of them contain the word "cat", regardless of case. This will help you practice both API requests and basic string searching in real-world data.

Aufgabe

Swipe to start coding

Write a function that fetches 10 cat facts from the Cat Facts API and counts how many of these facts contain the word "cat", ignoring case. The function must loop through all facts in the list and check if the word "cat" appears anywhere in each fact, regardless of capitalization. The result must be printed as a single integer.

Lösung

War alles klar?

Wie können wir es verbessern?

Danke für Ihr Feedback!

Abschnitt 3. Kapitel 4
single

single

Fragen Sie AI

expand

Fragen Sie AI

ChatGPT

Fragen Sie alles oder probieren Sie eine der vorgeschlagenen Fragen, um unser Gespräch zu beginnen

close

bookChallenge: Cat Fact Analyzer

Swipe um das Menü anzuzeigen

In this challenge, you will deepen your skills with APIs and text processing in Python. You will use the Cat Facts API to fetch a list of 10 facts about cats. Your goal is to analyze these facts and determine how many of them contain the word "cat", regardless of case. This will help you practice both API requests and basic string searching in real-world data.

Aufgabe

Swipe to start coding

Write a function that fetches 10 cat facts from the Cat Facts API and counts how many of these facts contain the word "cat", ignoring case. The function must loop through all facts in the list and check if the word "cat" appears anywhere in each fact, regardless of capitalization. The result must be printed as a single integer.

Lösung

Switch to desktopWechseln Sie zum Desktop, um in der realen Welt zu übenFahren Sie dort fort, wo Sie sind, indem Sie eine der folgenden Optionen verwenden
War alles klar?

Wie können wir es verbessern?

Danke für Ihr Feedback!

Abschnitt 3. Kapitel 4
single

single

some-alt