KEMBAR78
Py Code 1 | PDF
0% found this document useful (0 votes)
9 views1 page

Py Code 1

The document contains several Python code snippets demonstrating how to display age, name, and full name, as well as how to accept user input for age and names. It also includes a code example for calculating a total based on the number of months entered by the user. The snippets illustrate basic input/output operations and string concatenation in Python.

Uploaded by

abebe
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views1 page

Py Code 1

The document contains several Python code snippets demonstrating how to display age, name, and full name, as well as how to accept user input for age and names. It also includes a code example for calculating a total based on the number of months entered by the user. The snippets illustrate basic input/output operations and string concatenation in Python.

Uploaded by

abebe
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

Write a python code that display age

Age = 18
Print(“you are”, age, “years old.”)

Write a python code that display name and age in the same line
name = "Jiovanni"
age = 41
print("Hi, I am " + name + " and I am " + age + " years old")

Write a python code that accept age from keyboard


age = int(input("Enter your age: "))
print("You are", age, "years old.")

Write a python code that accept first name and last name from keyboard
and display in the same line
first_name = 'albert'
last_name = 'einstein'
full_name = first_name + ' ' + last_name
print(full_name)

write a python code that used to calculate tutorial class for school,
that accept name and number of months from keyboard and multiple by
600.
print('Welcome to Pete's garage)
name = input('Please enter your name: ')
number_of_month = int(input('Please enter your job number: '))
total= number_of_month*600
print("hi”+name+, the total is”+total+"birr”)
print('Thank you for your business')

You might also like