1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
exis [7]
2 years ago
10

Write a program that prompts the user to enter their name store this value in a variable called name Prompt the user for their c

urrent age store this value in a variable called Create a variable dogAge which takes the age entered and multiplies by 7 Print to the screen “Your name is" name "and in dog years you are" dogAge "years old" To join multiple parts together in a print statement use commas: print (“Your name is", name, "and in dog years you are", dogAge)​
Computers and Technology
1 answer:
Anarel [89]2 years ago
8 0

Answer:

Explanation:

The following code is written in Python. It prompts the user for the name and age, saves them to their own variables. Then it creates and calculates the dogAge variable. Finally, it combines all of this information and prints out the statement.

name = input("Enter your name: ")

age = input("Enter your age: ")

dogAge = int(age) * 7

print("Your name is", name, "and in dog years you are", dogAge, "years old.")

You might be interested in
An ipv4 address in the range 169.254.0.1 through 169.254.255.254 indicates a problem with what type of service
DENIUS [597]

Dynamic Host Configuration Protocol, also known as DHCP.

3 0
3 years ago
Write the code to produce a for loop that counts down from 20 to 0 by 2’s and prints the number each time it goes through the lo
yulyashka [42]

Explanation:

Count-controlled for loop (Three-expression for loop)

This is by far the most common type. This statement is the one used by C. The header of this kind of for loop consists of a three-parameter loop control expression. Generally it has the form:

for (A; Z; I)

A is the initialisation part, Z determines a termination expression and I is the counting expression, where the loop variable is incremented or dcremented. An example of this kind of loop is the for-loop of the programming language C:

for (i=0; i <= n; i++)

This kind of for loop is not implemented in Python!

Numeric Ranges

This kind of for loop is a simplification of the previous kind. It's a counting or enumerating loop. Starting with a start value and counting up to an end value, like for i = 1 to 100

Python doesn't use this either.

Vectorized for loops

They behave as if all iterations are executed in parallel. This means, for example, that all expressions on the right side of assignment statements get evaluated before the assignments.

Iterator-based for loop

Finally, we come to the one used by Python. This kind of a for loop iterates over an enumeration of a set of items. It is usually characterized by the use of an implicit or explicit iterator. In each iteration step a loop variable is set to a value in a sequence or other data collection. This kind of for loop is known in most Unix and Linux shells and it is the one which is implemented in Python.

Example of a simple for loop in Python:

>>> languages = ["C", "C++", "Perl", "Python"]  

>>> for x in languages:

...     print(x)

...  

C

C++

Perl

Python

>>>

3 0
3 years ago
What is printed by the following program? var isRaining = false; var isCloudy = false; var isSunny = !isRaining &amp;&amp; !isCl
hram777 [196]

Answer:

The output to this given question is "Is it warm: true".

Explanation:

In this question firstly two-variable defines that are isRaining and isCloudy. In those variables assign false value. Then we define another variable that is isSunny. In isSunny variable, we check condition that is if variable isRaining not AND (logical gate) variable isCloudy not equal to isSunny. The AND logical gate is used to check that both condition is true or not. Then we define another variable that is isWarm. In this variable, we check condition if isSunny OR (logical operator) isSummer is true. The OR operator is used to check in both value if one condition will true it will print true. At the last will print the value.

8 0
3 years ago
This speaker could be an instructor, a politician on the television, or even a radio or television commercial. What barriers wer
Shkiper50 [21]

Answer:

Electromagnetic interference and noise from the transmitting or receiving device.

Explanation:

Communication involves four processes, they are; encoding, sending, decoding, and feedback. A message, during this process of communication, can be altered, this is known as noise.

Telecommunication is simply communication between long distances. The effect of noise is more pronounced and can be noticed by listeners. These noises are produced by the transmitter and electromagnetic signals or waves of other transmitting devices.

6 0
3 years ago
PLEASE HURRY!!!!! Part of a program that does not work correctly
stiv31 [10]

Answer:

bug

Explanation:

A bug computer definition is referred to as a failure or a flaw in the software program. A Bug produces an incorrect or undesired result that deviates from the expected result or behavior.

8 0
2 years ago
Read 2 more answers
Other questions:
  • Write a function called ReverseLetters that takes an input phrase consisting of a single word and reverses the sequence of lette
    15·1 answer
  • Consider the following declaration: double[] sales = new double[50]; int j; Which of the following correctly initializes all the
    11·1 answer
  • Write a program that prompts the user for a measurement inmeters and then converts it into miles, feet, and inches.
    9·1 answer
  • As an administrator for the Contoso Corporation, your primary office is in Sacramento and your data recovery site in Las Vegas.
    15·1 answer
  • When using a presentation software you can change the size of the text to...? Increase Font size, Decrease font size, increase t
    15·2 answers
  • Excel spread sheets are primarily used to
    13·2 answers
  • What should you include in a persuasive speech
    14·1 answer
  • 8.2 code practice edhesive?
    8·1 answer
  • Plz plz plz subsribe to my channel, CookieFunTime
    9·1 answer
  • I watched an ad but the im button done is no where in sight, has anyone else experienced this recently. it was fine a few days a
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!