Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Submission.py
#python 3.6.9 print ("Hello, world!") age = int(input("How old are you? ")) next_year_age = age + 1 print(f"On your next birthday, you will be {next_year_age}.") # Note that we could do the addition right in the display if we wanted: print(f"On your next birthday, you will be {age + 1}.") print() # This prints a blank line cartons = int(input("How many egg cartons do you have? ")) eggs = cartons * 12 print(f"You have {eggs} eggs") # In the next example, to create a blank line I included \n at the beginning of the string cookies = int(input("\nHow many cookies do you have? ")) people = int(input("How many people are there? ")) cookies_per_person = cookies / people print(f"Each person may have {cookies_per_person} cookies")
run
|
edit
|
history
|
help
0
Ej2_python_204676887
Primes finding algorithm
ASICC art
MBTI
PyClassLinSearch
Python if condition
Hello wold Happy
lhp-1
f strings 3
GoogleCodindQues.py