Movatterモバイル変換


[0]ホーム

URL:


Menu
×
See More 
Sign In
+1 Get Certified Upgrade For Teachers Spaces Get Certified Upgrade For Teachers Spaces
   ❮     
     ❯   

Python Tutorial

Python HOMEPython IntroPython Get StartedPython SyntaxPython OutputPython CommentsPython VariablesPython Data TypesPython NumbersPython CastingPython StringsPython BooleansPython OperatorsPython ListsPython TuplesPython SetsPython DictionariesPython If...ElsePython MatchPython While LoopsPython For LoopsPython FunctionsPython RangePython ArraysPython IteratorsPython ModulesPython DatesPython MathPython JSONPython RegExPython PIPPython Try...ExceptPython String FormattingPython NonePython User InputPython VirtualEnv

Python Classes

Python OOPPython Classes/ObjectsPython __init__ MethodPython self ParameterPython Class PropertiesPython Class MethodsPython InheritancePython PolymorphismPython EncapsulationPython Inner Classes

File Handling

Python File HandlingPython Read FilesPython Write/Create FilesPython Delete Files

Python Modules

NumPy TutorialPandas TutorialSciPy TutorialDjango Tutorial

Python Matplotlib

Matplotlib IntroMatplotlib Get StartedMatplotlib PyplotMatplotlib PlottingMatplotlib MarkersMatplotlib LineMatplotlib LabelsMatplotlib GridMatplotlib SubplotMatplotlib ScatterMatplotlib BarsMatplotlib HistogramsMatplotlib Pie Charts

Machine Learning

Getting StartedMean Median ModeStandard DeviationPercentileData DistributionNormal Data DistributionScatter PlotLinear RegressionPolynomial RegressionMultiple RegressionScaleTrain/TestDecision TreeConfusion MatrixHierarchical ClusteringLogistic RegressionGrid SearchCategorical DataK-meansBootstrap AggregationCross ValidationAUC - ROC CurveK-nearest neighbors

Python DSA

Python DSALists and ArraysStacksQueuesLinked ListsHash TablesTreesBinary TreesBinary Search TreesAVL TreesGraphsLinear SearchBinary SearchBubble SortSelection SortInsertion SortQuick SortCounting SortRadix SortMerge Sort

Python MySQL

MySQL Get StartedMySQL Create DatabaseMySQL Create TableMySQL InsertMySQL SelectMySQL WhereMySQL Order ByMySQL DeleteMySQL Drop TableMySQL UpdateMySQL LimitMySQL Join

Python MongoDB

MongoDB Get StartedMongoDB Create DBMongoDB CollectionMongoDB InsertMongoDB FindMongoDB QueryMongoDB SortMongoDB DeleteMongoDB Drop CollectionMongoDB UpdateMongoDB Limit

Python Reference

Python OverviewPython Built-in FunctionsPython String MethodsPython List MethodsPython Dictionary MethodsPython Tuple MethodsPython Set MethodsPython File MethodsPython KeywordsPython ExceptionsPython Glossary

Module Reference

Built-in ModulesRandom ModuleRequests ModuleStatistics ModuleMath ModulecMath Module

Python How To

Remove List DuplicatesReverse a StringAdd Two Numbers

Python Examples

Python ExamplesPython CompilerPython ExercisesPython QuizPython ServerPython SyllabusPython Study PlanPython Interview Q&APython BootcampPython CertificatePython Training

PythonExercises


Test your Python skills with exercises from all categories:

Exercises

Tip:Sign in to track your progress - it's free.

0/99 done

Get Started3 exercises

Done

Syntax3 exercises

Done

Comments3 exercises

Done

Variables4 exercises

Done

Variable Names3 exercises

Done

Multiple Variable Values3 exercises

Done

Output Variable3 exercises

Done

Global Variable3 exercises

Done

Data Types8 exercises

Done

Numbers4 exercises

Done

Casting3 exercises

Done

Strings4 exercises

Done

Slicing Strings3 exercises

Done

Modify Strings5 exercises

Done

Concatenate Strings3 exercises

Done

Format Strings3 exercises

Done

Booleans6 exercises

Done

Arithmetic Operators5 exercises

Done

Assignment Operators4 exercises

Done

Comparison Operators4 exercises

Done

Logical Operators4 exercises

Done

Identity Operators3 exercises

Done

Membership Operators4 exercises

Done

Bitwise Operators3 exercises

Done

Operator Precedence3 exercises

Done

Lists4 exercises

Done

Access Lists4 exercises

Done

Change Lists3 exercises

Done

Add List Items4 exercises

Done

Remove List Items4 exercises

Done

Loop Lists3 exercises

Done

List Comprehension3 exercises

Done

Sort Lists3 exercises

Done

Copy Lists3 exercises

Done

Join Lists3 exercises

Done

Tuples3 exercises

Done

Access Tuples4 exercises

Done

Update Tuples3 exercises

Done

Unpack Tuples3 exercises

Done

Loop Tuples3 exercises

Done

Join Tuples3 exercises

Done

Sets4 exercises

Done

Access Sets3 exercises

Done

Add Set Items3 exercises

Done

Remove Set Items4 exercises

Done

Loop Sets3 exercises

Done

Join Sets3 exercises

Done

Frozenset3 exercises

Done

Dictionaries4 exercises

Done

Access Dictionaries3 exercises

Done

Change Dictionaries3 exercises

Done

Add Dictionary Items3 exercises

Done

Remove Dictionary Items4 exercises

Done

Loop Dictionaries4 exercises

Done

Copy Dictionaries3 exercises

Done

Nested Dictionaries3 exercises

Done

If6 exercises

Done

Elif4 exercises

Done

Else5 exercises

Done

Shorthand If3 exercises

Done

Logical6 exercises

Done

Nested If3 exercises

Done

Pass3 exercises

Done

Match3 exercises

Done

While Loops5 exercises

Done

For Loops5 exercises

Done

Functions3 exercises

Done

Args / Kwargs3 exercises

Done

Args / Kwargs3 exercises

Done

Decorators3 exercises

Done

Scope3 exercises

Done

Lambda4 exercises

Done

Range3 exercises

Done

Arrays3 exercises

Done

Iterators3 exercises

Done

Modules5 exercises

Done

Dates4 exercises

Done

Math4 exercises

Done

JSON3 exercises

Done

RegEx4 exercises

Done

PIP3 exercises

Done

Try Except3 exercises

Done

None3 exercises

Done

User Input3 exercises

Done

String Formatting4 exercises

Done

Virtual Environment3 exercises

Done

Classes4 exercises

Done

__init__ Method4 exercises

Done

Self Parameter3 exercises

Done

Class Properties3 exercises

Done

Class Methods5 exercises

Done

Inheritance3 exercises

Done

Polymorphism3 exercises

Done

Encapsulation3 exercises

Done

Inner Class3 exercises

Done

File Handling3 exercises

Done

Open File3 exercises

Done

Write to File3 exercises

Done

Remove File3 exercises

Done

Log in to track your progress

If you haven't already,sign up to become a W3Schooler, and get points for every exercise you complete.

As a logged-in W3Schools user you will have access to many features like havingyour own web page,track your learning progress,receive personal guided paths, andmore.


The Exercise

The exercises are a mix of "multiple choice" and "fill in the blanks" questions. There are between 3 and 9 questions in each category.The answer can be found in the corresponding tutorial chapter. If you're stuck, or answer wrong, you can try again or hit the "Show Answer" button to see the correct answer.


Kickstart your career

Get certified by completingthe course

Get certifiedw3schoolsCERTIFIED.2025


×

Contact Sales

If you want to use W3Schools services as an educational institution, team or enterprise, send us an e-mail:
sales@w3schools.com

Report Error

If you want to report an error, or if you want to make a suggestion, send us an e-mail:
help@w3schools.com

W3Schools is optimized for learning and training. Examples might be simplified to improve reading and learning.
Tutorials, references, and examples are constantly reviewed to avoid errors, but we cannot warrant full correctness
of all content. While using W3Schools, you agree to have read and accepted ourterms of use,cookie and privacy policy.

Copyright 1999-2025 by Refsnes Data. All Rights Reserved.W3Schools is Powered by W3.CSS.


[8]ページ先頭

©2009-2025 Movatter.jp