Run Code
|
API
|
Code Wall
|
Users
|
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
Please
log in
to post a comment.
(P2) Ciągi 2
Python code
BUCLE FOR EN PYTHON 3
Яндекс.Интервью - Задача C
Grupo1
https://rextester.com/OSAX55060
Lab_III_3_24_11_2020
reverse the number
Lesson 9 hw
Country Flags
Please log in to post a comment.