Memorize Python commentary 4 --Input

Getting input name = input("Enter your name: ") age = input("Enter your age: ") print("Hello " + name + "! You are " + age)

Calc # Python is just going to convert it into a string by default. num1 = input("Enter a number: ") num2 = input("Enter another number: ") result = float(num1) + float(num2) # int = integer, float is for decimal number.

print(result)

Mad Libs (Blank Filling Game)

# print("Roses are {color}") # print("{plural noun} are blue") # print("I love {celebrity}")

color = input("Enter a color: ") plural_noun = input("Enter a Plural Noun: ") celebrity = input("Enter a celebrity: ")

print("Roses are " + color) print(plural_noun + " are blue") print("I love " + celebrity)

Recommended Posts

Memorize Python commentary 4 --Input
Memorize Python commentary 5 --Lists
Memorize Python commentary 3 --Numbers
Memorize Python commentary 2 --Strings
Memorize the Python commentary on YouTube.
[Python] Standard input
python input and output
Python audio input / output
Key input in Python
[Python] About standard input
Cisco Memorandum _ Python config input
[Python3] Standard input [Cheat sheet]
Python3 standard input (competition pro)
Standard input / summary / python, ruby
Python Input Note in AtCoder
[Python] How to use input ()
Python3 standard input for competitive programming
Matrix representation with Python standard input
Tips on Python file input / output
Input / output with Python (Python learning memo ⑤)
Let's see using input in python
Notes for Python file input / output
ABC128 A, B, C commentary (python)
Python Paiza-Various skill checks and standard input
Data input / output in Python (CSV, JSON)
Get keystrokes from / dev / input (python evdev)
Python3 standard input I tried to summarize
[Introduction to Udemy Python3 + Application] 41. Input function
Mayungo's Python Learning Episode 8: I tried input
Atcoder standard input set for beginners (python)
[Python] Add comments to standard input files
[Python] Chapter 02-03 Basics of Python programs (input / output)
Python commentary whose parents were killed literally