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
kaheart [24]
3 years ago
5

Write a Python program that prints your name, CS classes taken (or other relevant experience), and the date on separate lines. U

se one variable each for the month, day, and year (3 total). Make sure there are no spaces between the forward slash and numbers. Submit the .py file. Sample Run: My name is Steven Allbee I have taken CS 10 - Python Programming Today's date is 1/17/19
Computers and Technology
1 answer:
BigorU [14]3 years ago
7 0

Answer:

The program in Python is as follows:

name = input("Name: ")

course = input("Course: ")

month = input("Month: ")

day = input("Day: ")

year = input("Year: ")

ddate = (month+"/"+day+"/"+year).replace(" ", "")

print("My name is ",name)

print("I have taken  ",course)

print("Today's date is ",ddate)

Explanation:

This line prompts user for name

name = input("Name: ")

This line prompts user for course classes taken

course = input("Course: ")

This line prompts user for month

month = input("Month: ")

This line prompts user for day

day = input("Day: ")

This line prompts user for year

year = input("Year: ")

This line calculates the date and remove all blank spaces

ddate = (month+"/"+day+"/"+year).replace(" ", "")

The next three lines print the user inputs

print("My name is ",name)

print("I have taken  ",course)

print("Today's date is ",ddate)

You might be interested in
Ummm, I hate to interrupt your day, but does anyone know where Mitch72 is????? Because he hasn't talked in a week, and he hasn't
Anettt [7]

Answer:

sorry but no

Explanation:

4 0
3 years ago
Write a function called getChar that has no function inputs, but takes in two character inputs from the user (in1 and in2) and o
bearhunter [10]

Answer:

def getChar():

   while True:

       in1 = input('Enter first char: ')

       try:

           if len(in1) != 1:

               raise

           else:

               in2 = input('Enter second char: ')

               if len(in2) != 1:

                   raise

               else:

                   break

       except:

           print('Enter just one character')

   return in1, in2

def chars2string(in1,in2):

   print(in1*5 + in2*5)

def main():

   ls = getChar()

   in1 = ls[0]

   in2 = ls[1]

   chars2string(in1, in2)

if __name__ == '__main__':

   main()

Explanation:

The programming language used is python 3.

The script first defines a function getChar and makes use of a while loop in combination with try and except blocks and IF statements, the code ensures that both inputs that are entered by the user after the prompt are 1 in length. i.e. Just one character. This function returns the two characters that were entered.

The second function that is defined is chars2string this function takes two arguments, It repeats each argument five times and returns a joined string.

Finally, the main function is defined and it calls the getChar function  first, the values that are returned by this function is assigned to two variables, that is then passed on to the chars2string function. The main function is called and the Joined string is printed to the screen.

3 0
3 years ago
What is class in python
Nataly_w [17]

Answer:

It is a code template for creating objects.

7 0
3 years ago
Read 2 more answers
Many businesses use robotic solutions. Which department of the food and beverage industry uses robotic solutions on a large scal
Alenkinab [10]

Answer:

Its packing you're welcome :)

Explanation:

7 0
4 years ago
Read 2 more answers
What is the name of the option in most presentation applications with which you can modify slide elements?
Fittoniya [83]

The option that you’re looking for is the Insert Tab.

Slide elements generally refer to the objects that you can put inside a slide in most presentation programs. This includes elements such as shapes, texts, pictures, videos, and even audio files. The Insert Tab can generally be accessed on the toolbar pinned to the top of your presentation program.

7 0
4 years ago
Other questions:
  • A _____ is a form of Web conferencing that uses streaming media technologies to broadcast video and/or audio over the Internet f
    15·2 answers
  • 1. Mobile devices have a _________ viewport that displays a web page content that fits within a mobile screen.
    11·1 answer
  • Data mining must usestatistics to analyze data.<br> True<br> False
    12·1 answer
  • If you need to use a custom theme frequently, you can save a presentation file as a(n) ____ theme file.
    12·2 answers
  • What are options in the Advanced tab in the Share Workbook dialog box? Check all that apply
    14·2 answers
  • Design a class named Person with fields for holding a person’s name, address, and telephone number. Write one or more constructo
    12·1 answer
  • g You are looking to rob a jewelry store. You have been staking it out for a couple of weeks now and have learned the weights an
    10·1 answer
  • Write c++ program from 1to 100 to find prime numbers using statement.<br><br>please help me​
    15·1 answer
  • Hiiiiiiiiihwdawdfgthnythgrfergthyjuhgfd
    12·2 answers
  • why is it important for software manufacturers to update their programs to work with the latest operating systems? compuscholar
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!