This is a continuation of Python Exercise # 1 for Beginners [Basic Data Types / If Statements]. If you don't understand the problem, you can find an article by google with the keywords listed in "Necessary Knowledge".
Let's go!
★ I use it very often. Let's be able to do it.
★★ It is used when performing a little complicated processing.
★★★ You are studying well. I think I can graduate from Python beginners.
★★★★ It's tricky, but it's often used in Python. Let's remember.
★★★★★ Oh. It seems that Python can be used for business as well! As expected.
Python tutorial 4.2 for statement 4.3 range () function 4.4 The else clause of the loop in break and continue statements 4.5. pass statement
--for statement --while statement --How to control the loop
(*) For the following problems, create a file as appropriate and execute it from the command line.
Level ★ Required knowledge Display elements of for statement / list using for
Display the data stored in member using the for statement.
sample.py
member = ['tanaka', 'tadokoro', 'tajima', 'tahata', 'takahashi', 'takeda']
Level ★★ Required knowledge enumerate
For each output in Problem 1
'The 〇th is Mr. 〇〇.'
Please display.
Level ★ Required knowledge range
Print a number from 1 to 100
Output example)
1
2
3
...
99
100
Level ★★ Required knowledge range
Output a number from 1 to 100.
However, when it is a multiple of 3,'Fizz'When it is a multiple of 5'Bazz'。
When it is a multiple of 3 and a multiple of 5'FizzBazz'Please display.
Level ★★★ Required Knowledge range / type conversion / string slices / whether a particular value exists in an array
Please output the numbers from 2020 to 3000.
However, when 3 is attached'3 !?'Please be surprised.
// todo: kokokara
Level ★★★
Data is being aggregated. Let's remove strange data and aggregate
Level ★
Display from -30 to 300 using a while statement However, the number with 3 is not output.
Level ★★
Keep going down until Daikichi comes out with a fortune
Level ★★★
Loses when battle HP is low Which one
Level ★★★★
Random rock-paper-scissors