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
riadik2000 [5.3K]
3 years ago
9

Edhesive Intro to CS Code Practice 1.8

Computers and Technology
1 answer:
Nonamiya [84]3 years ago
6 0

<em>Questions:</em>

<em>CS Code Practice 1.8  Question 1:</em>

<em>Write a code that accepts the user's age as an input, then print their age in 10 years.</em>

<em></em>

<em>CS Code Practice 1.8  Question 2:</em>

<em>Write a code that accepts a whole number as an input, subtracts 5 and print the answer</em>

<em></em>

Answer:

Question 1:

currentage = int(input("Enter your age: "))

print("Your age in 10 years is "+str(currentage + 10))

Question 2:

userinput = int(input("Enter a whole number: "))

print(str(userinput)+" - "+str(5)+" = "+str(userinput - 5))

Explanation:

There are two questions in this category and I don't know which of them you need; So, I answered both.

Question 1:

This line prompts user for age

currentage = int(input("Enter your age: "))

This line adds 10 to user input and prints the result

print("Your age in 10 years is "+str(currentage + 10))

Question 2:

This line prompts user for a whole number

userinput = int(input("Enter a whole number: "))

This line subtracts 5 from the whole number and prints the result

print(str(userinput)+" - "+str(5)+" = "+str(userinput - 5))

You might be interested in
Which type of password would be considered secure
max2010maxim [7]
Try using at least one capital letter and multiple number and symbols
Example: [email protected]#3
5 0
4 years ago
Read 2 more answers
Gave me six external part of the computer system and identify which is the output and input devices
Mariana [72]
1. monitor output
2. keyboard input
3. mouse input
4. <span>microphone input</span>
5. printer output , or input if it has scanner
<span>6. speakers output</span>
5 0
3 years ago
The linux/unix command __________ can be used to search for files or contents of files.
Nana76 [90]
The `grep` command is used for this. https://man7.org/linux/man-pages/man1/grep.1.html
8 0
2 years ago
An ink-jet printer is a type of impact printer. <br> a. True <br> b. False
Mumz [18]
The answer is: false it is not a impact printer
6 0
3 years ago
Write a script called fact.sh that is located in your workspace directory to calculate the factorial of a number n; where n is a
ira [324]

Answer:

hope this helps

Explanation:

7 0
3 years ago
Other questions:
  • The program needs a Frisbee Golfer class.
    15·1 answer
  • Rachelle's computer has frequent system crashes and it takes a long time to access files and folders. What hardware component is
    8·1 answer
  • Which of the following is a scam where perpetrators promise high pay for working on different projects like wooden calendars, pa
    13·1 answer
  • All of the following are strategies to help you prepare for standardized test except <br>​
    5·1 answer
  • int sequence[10] = { 3, 4, 5, 6, 7, 8, 9, 10, 1, 2 }; Write a C++ program to ask the user to enter a number, if the number can b
    10·1 answer
  • Where is voice data stored in Android?
    11·1 answer
  • Chief technology officers can influence a company's current and future ____.
    9·1 answer
  • True or False. A geosynchronous satellite changes its area in the sky each day.
    5·2 answers
  • marianne needs to create a version of her slide presentation that does not include all the slides and will be used for a particu
    9·1 answer
  • To have the full protection of the law, copyrights, patients, and ______ should be registered with the government.
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!