Ask Question

This is the assignment

Write a program that:

stores your name in one variable called name

stores your age in another variable called age

prints a one-line greeting that includes your name and your age.

Your program should output something like this:

Hi! My name is Arthur and I am 62 years old.

Hint: Do not get user input for the values of name and age but instead simply save these values inside your program as static variables, or variables that do not change value.

What should my code be?

+4
Answers (1)
  1. 18 July, 19:02
    0
    name=input ("Enter your name")

    age=input ("Enter your age")

    print ("Hi! My name is " + name + " and I am" + age + " years old.")
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “This is the assignment Write a program that: stores your name in one variable called name stores your age in another variable called age ...” in 📗 Computers & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers