In pycharm, write a program that prompts the user for their name and age. your program should then tell

10 answers
Question:

In pycharm, write a program that prompts the user for their name and age. your program should then tell the user the year they were born. here is a sample execution of the program what is your name? Amanda how old are you? 15. This is what I have so far but I can't get pycharm to tell me the year I was born. import datetime
name = input("What is your name? ")
age = input("How old are you? ")
year = datetime. datetime. now().year
print("Hello ' + name + ' you were born in " (year - age))

Answers

Let's address the few mistakes in your code so far. First, age is of type string and year is of type int. You're trying to subtract an int by a string and that doesn't work. Also, you have inconsistent quotes "Hello '. You should always use the same type of quote. The (year - age)) isn't properly formatted into the print statement. There is no plus adding it.

Here's my working code:

import datetime

name = input("What is your name? ")

age = int(input("How old are you? "))

year = datetime.datetime.now().year

print("Hello " + name + " you were born in " + str((year - age)))

I just fixed your code. Best of luck.

dn

Explanation:

First of all, im a girl. Second, names are personal info. People should not share their names online.

HaRiEb AlLsAcK

Explanation:

(uwu) ^^

Here are the translations

1. What time is it?

 ¿Que hora es?

2. What is your name?

  ¿Que es tu nombre?

3. Manuela and Ana are siblings.

  Manuela y Ana son hermanos

Hope this helps

Answer by

Fishylikeswater

 

Ignore them or you can slap them

Explanation:

Works with my sibilings and sometimes I just scream at them WHAT!!

But that doesn't always work and if not then CUT THEM OFF PERIO

Hope this helps : )

import datetime

name = input("What is your name? ")

age = int(input("How old are you? "))

year = datetime.datetime.today().year

print("Hello {}! You were born in {}.".format(name, year - age))

I hope this helps!

Is this supposed to be a question?

Many of his family members passed away, and he saw his future slipping away, but he would not let it.

Explanation:

In the next lyrics he says how he is going to accomplish much more and not throw away his shot.

btw the musical ends with hamilton throwing away his shot and burr not waiting for it like what the heck lol

Que hora es?

Que es tu nombre?

Manuela y Ana son hermanas.

Similar Solved Works

4 answers

For all values of x, which expression is equivalent to 2x + 5 − x + 3x + x − 2?

For all values of x, which expression is equivalent to 2x + 5 − x + 3x + x − 2?...
7 answers

On climate maps such as the one above, color is most likely used to represent

On climate maps such as the one above, color is most likely used to represent...
3 answers

Choose some of the major news media that covered hurricane katrina a} news stations b) word of mouth

Choose some of the major news media that covered hurricane katrina a} news stations b) word of mouth c) live videos d) newspaper e) radio stations f) books g) magazines...
4 answers

Madame sofronie’s character is most developed through a. direct characterization, using her words

Madame sofronie’s character is most developed through a. direct characterization, using her words and feelings. b. indirect characterization, using her thoughts and action. direct characterization, c. describing her physical appearance. d. indirect characterization, describing her personality....
7 answers

14. Valuable molecules like glucose, amino acids, and vitamins are reabsorbed into the blood at which location in the nephron?

14. Valuable molecules like glucose, amino acids, and vitamins are reabsorbed into the blood at which location in the nephron? A. Loop of Henle B. Bowman's capsule C. proximal convoluted tubule D. collecting duct E. glomerulus...
2 answers

Plz help I am going to fall

Plz help I am going to fall [tex]Plz help I am going to fall[/tex]...
3 answers

Gold in its pure form is too soft to be used for most jewelry. Therefore, the gold is mixed with other metals to produce an alloy.

Gold in its pure form is too soft to be used for most jewelry. Therefore, the gold is mixed with other metals to produce an alloy. The composition of gold alloys are always calculated by mass, using the karat (kt) as a unit of measure. A karat represents a proportion by mass of one part in twenty-fo...
4 answers

¿Por qué decimos que en el 2020 vivimos un estado de emergencia en el Perú?

¿Por qué decimos que en el 2020 vivimos un estado de emergencia en el Perú?...
2 answers

Approximately what percentage of southern whites owned slaves?

Approximately what percentage of southern whites owned slaves?...
3 answers

(b) Without using a calculator, the square root of 18 will be between what two values (remember to look for perfect squares/perfect

(b) Without using a calculator, the square root of 18 will be between what two values (remember to look for perfect squares/perfect square roots)? Show your reasoning. You do not need to find the decimal equivalent of the root....
2 answers

What were some of the main social problem faced by america in the 1950s think about distribution of

What were some of the main social problem faced by america in the 1950s think about distribution of wealth role of women need to confirm treatment of minorities...
10 answers

These two picture would be an example of which of the 5 themes of geographyHEI Humans adapting transportation

These two picture would be an example of which of the 5 themes of geography HEI Humans adapting transportation needs to their environment Movement across barriers Regions of the world Location of humans in varied environments...
3 answers

How did the relationship between the English Man and the Native American change over time? How did it evolve and why does it

How did the relationship between the English Man and the Native American change over time? How did it evolve and why does it develop as it did? Cite specific evidence from the narrative as support...
4 answers

BONUS QUESTION: Is it true or false that each system of linear equationshas either one solution, no solutions OR an infinite number of

BONUS QUESTION: Is it true or false that each system of linear equations has either one solution, no solutions OR an infinite number of solutions?...
4 answers

Why is their less friction on snow than a concrete path

Why is their less friction on snow than a concrete path...
3 answers

The width of a rectangle is 5 units less than the length. If the area is 150 square units, then find

The width of a rectangle is 5 units less than the length. If the area is 150 square units, then find the dimension...
3 answers

5/3(5x+9)+4/5(1-9x))

5/3(5x+9)+4/5(1-9x))...
12 answers

Brainliest-Explain 3 reasons why quality is important to Toyota.​

Brainliest-Explain 3 reasons why quality is important to Toyota.​...
3 answers

What sentence about markdowns and markups is true? a. markdowns and markups have no limit. b. a markdown

What sentence about markdowns and markups is true? a. markdowns and markups have no limit. b. a markdown has no limit, but a markup is limited to 100% or less. c. a markup has no limit, but a markdown is limited to 100% or less. d. markdowns and markups are limited to 100% or less....
4 answers

Write a scientific argument that addresses the question: Why is Jackie an elite distance runner when

Write a scientific argument that addresses the question: Why is Jackie an elite distance runner when no one else in her family has that trait?...

-- 0.053459--