2-3 Intro to PyCharm Resendez
.docx
keyboard_arrow_up
School
Southern New Hampshire University *
*We aren’t endorsed by this school
Course
X121
Subject
Computer Science
Date
Jan 9, 2024
Type
docx
Pages
2
Uploaded by ElderScienceSwan36
Claudia Resendez
IT-140
2-3 PyCharm Introduction Assignment
Part A
# Prompt the user for their name
name = input("What is your name? ")
# Prompt the user for their age
age = input("How old are you? ")
# Calculate the birth year
Birth_year = 2023 – int(age)
# Display the result
Print(f”Hello {name}! You were born in {birth_year}.”)
Claudia Resendez
IT-140
2-3 PyCharm Introduction Assignment
Part B
I think PyCharm offers many interesting features that simplify coding for programers.
One feature is the syntax highlighting. This function colors different parts a different color based
solely on their functions. Comments are one color, keywords in a color, and variables have their
own color. This can help programmers tell the difference between the elements in code.
Another nice feature is PyCharm has suggestions on what you’re doing. This feature can
help speed the coding process, so you don’t have to type out long functions. It can also help
prevent typos and easily missed errors. It provides these suggestions in real time which is
extremely helpful in coding because the programmer can catch these mistakes early and save a
ton of time.
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help
Related Questions
def calculate_growth_cycle(plant_name): if(plant_name == "strawberry"): print("### The life cycle of a strawberry ###\nA seed takes 110 days to reach maturity.") elif(plant_name == "cucumber"): print("### The life cycle of a cucumber ###\nA seed takes 76 days to reach maturity.") elif(plant_name == "potato"): print("### The life cycle of a potato ###\nA seed takes 120 days to reach maturity.") else: print('Your plant is available, please try "strawberry", "cucumber" or "potato"')
Plants Growth Cycle
Learning Objectives
In this lab, you will practice:
Defining a function to match the given specifications
Calling the function in your program
Using if statements (can combine them with dictionaries)
Instructions
For every plant, there is a growth cycle. The number of days that it takes starting from being a seed and ending in being a fruit is what is called the growth cycle. Write a function that takes a plant's name as an argument and…
arrow_forward
C# Language
You are tasked with writing a program to process students’ end of semester marks. For each student you must enter into your program the student’s id number (an integer), followed by their mark (an integer out of 100) in 4 courses. A student number of 0 indicates the end of the data. A student moves on to the next semester if the average of their 4 courses is at least 60 (greater than or equal to 60).
Write a program to read the data and print, for each student:
The student number, the marks obtained in each course, final mark of the student (average of all the marks), their final grade (A,B,C,D or F) and whether or not they move on to the next semester.
In addition, after all data entry is completed, print
The number of students who move on to the next semester and the number who do not.
The student with the highest final mark (ignore the possibility of a tie).
Grades are calculated as follows:
A = 70 and over, B = 60 (inclusive) -70, C = 50(inclusive)-60
D =…
arrow_forward
Computer Science
C# Programming
Object Orientation
Please use Arrays or ArrayLists where appropriate
Implement a menu driven program that has some operations for a food truck. A food truck has multiple food items as well as a menu which contains a selection of the food items which will be sold for that day. A maximum of 10 food items can appear on the menu for any day. For each food item keep a code, description, category, price and quantity in stock (code, description and category are not usually changed).
Create a comma delimited text file called "items.txt" for 15 or more food items, indicating the item's description, category, price and quantity in stock.
Read all the food items from the text file “Items.txt”
Display all the food items available for this food truck.
Continuously prompt the user for a food item’s code to be placed on the menu until the menu is full or the user enters -1. Note that only food items which have a positive quantity in stock may be added to…
arrow_forward
11 Worksheet 5
Note:Solution using Matlab Code
Write a program that prompts the user to enter a number within the range of 1 through 7, those
numbers represent the weekdays as shown in the table. If the entered number is more than 7,
display 'invalid day'.
Number
1
2
3
4
5
6
7
Day
Sunday
Monday
Tuesday
Wednesday
Thursday
Friday
Saturday
Type of the day
Workday
Workday
Workday
Workday
Workday
Weekend
Weekend
The program should continue to repeat itself 10 times, after which, the program should stop.
Furthermore, the program should be able to show a message saying if this is a 'workday' or a
'weekend day'.
Note: you are required to add a comment beside your command. Hint: to add a comment you
may use the % sign. thank guys you dodo great.
arrow_forward
Please use C# for this. Thank you soo much!
arrow_forward
please correct this code i didnt get the mistake
#include<stdio.h>#define NROWS 8#define NCOLS 8#define TRUE 1#define FALSE 0
void main(){ int queenht_row, queenht_col; int line,row,col,i,j; int filled; printf("Chess queenht Program\n"); do{ printf("Enter queenht's coordinates: "); scanf("%d %d",&queenht_row,&queenht_col); }while((queenht_row<1)||(queenht_row>NROWS)||(queenht_col<1)||(queenht_col>NCOLS)); for(line=1;line<=2*NROWS+1;line++){ row = line/2; if(line%2!=0){ printf("+"); for(col=1;col<=NCOLS;col++) printf("---+"); printf("\n"); } else{ printf("|"); for(col=1;col<=NCOLS;col++){ filled=FALSE; if((row==queenht_row) && (col==queenht_col)){ printf(" Q |"); filled = TRUE; continue; }…
arrow_forward
Textbook: Joyce Farrell, Microsoft® Visual C#®: An Introduction to Object-Oriented Programming, Seventh Edition, ISBN: 9781337102100.Microsoft Visual C# (chapter 5 code case problem 5-2)
Assignment instruction:
In Chapter 4 of your book, you created an interactive application named MarshallsRevenue that prompts a user for the number of interior and exterior murals scheduled to be painted during a month and computes the expected revenue for each type of mural. The program also prompts the user for the month number and modifies the pricing based on requirements listed in Chapter 4.
Now, modify your program so that the user must enter a month value from 1 through 12. If the user enters an incorrect number, the program prompts for a valid value. Also, the user must enter a number between 0 and 30 inclusive for the number of murals of each type; otherwise, the program prompts the user again.
In order to prepend the $ to currency values, the program will need to use the…
arrow_forward
Search
Chapter 3 Project
Project Name: Chpt3_Project
Class Name: Chpt3_Project
Write a Java program that generates a random number between 50 and 150 that represents the
temperature in Celsius of a pot of boiling water on a stove, and determine if the water is hot enough
cook the following vegetable:
Beans: cook at 100 degrees Celsius
Inputs: The program must prompt the user for the temperature that beans cook at.
Enter the temperature in Celsius that beans cook at:
Output: The program should tell the user if the water is hot enough to cook the beans.
The water temperature is Celsius and is enough to cook beans.
Example of a program run: Run the program three times and take a screen snipit after each run.
Step 1. Create an algorithm (either flowchart or pseudocode) that you will use to write the program.
Place the algorithm in a Word document.
Step 2. Code the program in Eclipse and test the program to verify it works correctly. Be sure to run the
program three times.
Step 3. Use the…
arrow_forward
name formatter on c# create an application that lets the user enter the following pieces of data:
• the user’s first name
• the user’s middle name
• the user’s last name
• the user’s preferred title (mr., mrs., ms., dr., etc.)
assume the user has entered the following data:
• first name: kelly
• middle name: jane
• last name: smith
• title: ms.
the application should have buttons that display the user’s name formatted in the following ways: ms. kelly jane smith kelly jane smith kelly smith smith, kelly jane, ms. smith, kelly jane smith, kelly
arrow_forward
IN C PROGRAMMING!!! Follow the prompt in the picture and make sure output matches example.
arrow_forward
airport_codes = {
}
}
San Francisco': 'SFO',
'Paris': 'CDG',
'London': 'LHR',
'San Jose': 'SJC',
'New York': 'JFK'
new_airport_codes = {
'Vancouver': 'YVR',
'Seattle': 'SEA',
'New York': 'LGA'
Type the program's output
print (airport_codes.get ('New York', 'na'))
print (airport_codes.get('Seattle', 'na'))
airport_codes. update (new_airport_codes)
print (airport_codes.get ('New York', 'na'))
print (airport_codes.get ('Seattle', 'na'))
arrow_forward
C++ beginner
arrow_forward
c language
arrow_forward
C++ Help
Patients
Requirements:
You are working in a doctors’ office and have been tasked with creating an application to maintain Patient records for each doctor in the office.
Create a class to maintain a Doctor. A doctor has a name that must be stored in the Doctor class. A doctor can only treat 3 patients but could treat fewer than 3. The information for each patient should be encapsulated in a Patient class and should include the patient’s last name and up to 5 cholesterol readings for the patient. Note that less than 5 cholesterol readings may sometimes be stored. Your Doctor class should support operations to add a patient record to the end of his/her list of assigned patients (i.e., use a vector to store Patient objects in the Doctor class), and to list all patient records (name and associated cholesterol readings). Your Patient class should include operations to allow entry of the patient’s last name and up to 5 cholesterol readings, and to return the name and…
arrow_forward
Java Program
01 - Theater Ticket System
A small ten-seat theater has contracted you to build software which will reserve tickets. The theater has two rows of five seats each. Each row is referred to by number (1 or 2) and each seat in the row is referred to by letter (A, B, C, D, and E). When started, the program should ask the user for the row they prefer (row selection). If that row has no empty seats then the program should ask the user if they prefer the other row, if no then display a message stating the next show is tomorrow. Upon selecting a row, the program should present the user with a choice of available seats in the row. The user can then either choose a seat and print the ticket (in this case a simple message will suffice) or return to row selection. If a ticket is printed the program should return to row selection. The program terminates when all seats are reserved.
Please enter a row: 1
Available seats: A B C D E
Which seat, enter Q for none?: B
You have…
arrow_forward
Text-based adventure game: Pretend you are creating a text-based adventure game. At different points in the game, you want the user to select to fight, run, or hide from certain enemies. Modify the application below (week3.py) so that the selection variable is sent as an argument into the choice() function.
The user should enter 1 to fight, 2 to run, or 3 to hide in the main(). The choice() function should print one of the three options.
You will need to add an if statement in the choice() function to make the correct selection.
arrow_forward
99 question
Reza Enterprises sells tickets for buses, tours, and other travel services. Because Reza frequently mistypes long ticket numbers, Reza Enterprises has asked his students to write an application that shows if a ticket is invalid. Your application/program tells the ticket agent to enter a six-digit ticket number. Ticket numbers are designed so that if you lose the last digit of the number, then divide by 7, the remainder of the division is exactly the same to the last dropped digit. This process is shown below:
Step 1: Enter the ticket number; for example 123454
Step 2: Remove the last digit, leaving 12345
Step 3: Determine the remainder when the ticket number from step 2 is divided by 7. In this case, 12345 divided by 7 leaves a remainder of 4.
Step 4: Display a message to the ticket agent indicating whether the ticket number is valid or not. If the ticket number is valid, save the number to a .txt file called “tickets.txt” and.
arrow_forward
SEE MORE QUESTIONS
Recommended textbooks for you
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:9781337102124
Author:Diane Zak
Publisher:Cengage Learning
C++ for Engineers and Scientists
Computer Science
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Course Technology Ptr
Programming Logic & Design Comprehensive
Computer Science
ISBN:9781337669405
Author:FARRELL
Publisher:Cengage
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781337671385
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781305480537
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
Related Questions
- def calculate_growth_cycle(plant_name): if(plant_name == "strawberry"): print("### The life cycle of a strawberry ###\nA seed takes 110 days to reach maturity.") elif(plant_name == "cucumber"): print("### The life cycle of a cucumber ###\nA seed takes 76 days to reach maturity.") elif(plant_name == "potato"): print("### The life cycle of a potato ###\nA seed takes 120 days to reach maturity.") else: print('Your plant is available, please try "strawberry", "cucumber" or "potato"') Plants Growth Cycle Learning Objectives In this lab, you will practice: Defining a function to match the given specifications Calling the function in your program Using if statements (can combine them with dictionaries) Instructions For every plant, there is a growth cycle. The number of days that it takes starting from being a seed and ending in being a fruit is what is called the growth cycle. Write a function that takes a plant's name as an argument and…arrow_forwardC# Language You are tasked with writing a program to process students’ end of semester marks. For each student you must enter into your program the student’s id number (an integer), followed by their mark (an integer out of 100) in 4 courses. A student number of 0 indicates the end of the data. A student moves on to the next semester if the average of their 4 courses is at least 60 (greater than or equal to 60). Write a program to read the data and print, for each student: The student number, the marks obtained in each course, final mark of the student (average of all the marks), their final grade (A,B,C,D or F) and whether or not they move on to the next semester. In addition, after all data entry is completed, print The number of students who move on to the next semester and the number who do not. The student with the highest final mark (ignore the possibility of a tie). Grades are calculated as follows: A = 70 and over, B = 60 (inclusive) -70, C = 50(inclusive)-60 D =…arrow_forwardComputer Science C# Programming Object Orientation Please use Arrays or ArrayLists where appropriate Implement a menu driven program that has some operations for a food truck. A food truck has multiple food items as well as a menu which contains a selection of the food items which will be sold for that day. A maximum of 10 food items can appear on the menu for any day. For each food item keep a code, description, category, price and quantity in stock (code, description and category are not usually changed). Create a comma delimited text file called "items.txt" for 15 or more food items, indicating the item's description, category, price and quantity in stock. Read all the food items from the text file “Items.txt” Display all the food items available for this food truck. Continuously prompt the user for a food item’s code to be placed on the menu until the menu is full or the user enters -1. Note that only food items which have a positive quantity in stock may be added to…arrow_forward
- 11 Worksheet 5 Note:Solution using Matlab Code Write a program that prompts the user to enter a number within the range of 1 through 7, those numbers represent the weekdays as shown in the table. If the entered number is more than 7, display 'invalid day'. Number 1 2 3 4 5 6 7 Day Sunday Monday Tuesday Wednesday Thursday Friday Saturday Type of the day Workday Workday Workday Workday Workday Weekend Weekend The program should continue to repeat itself 10 times, after which, the program should stop. Furthermore, the program should be able to show a message saying if this is a 'workday' or a 'weekend day'. Note: you are required to add a comment beside your command. Hint: to add a comment you may use the % sign. thank guys you dodo great.arrow_forwardPlease use C# for this. Thank you soo much!arrow_forwardplease correct this code i didnt get the mistake #include<stdio.h>#define NROWS 8#define NCOLS 8#define TRUE 1#define FALSE 0 void main(){ int queenht_row, queenht_col; int line,row,col,i,j; int filled; printf("Chess queenht Program\n"); do{ printf("Enter queenht's coordinates: "); scanf("%d %d",&queenht_row,&queenht_col); }while((queenht_row<1)||(queenht_row>NROWS)||(queenht_col<1)||(queenht_col>NCOLS)); for(line=1;line<=2*NROWS+1;line++){ row = line/2; if(line%2!=0){ printf("+"); for(col=1;col<=NCOLS;col++) printf("---+"); printf("\n"); } else{ printf("|"); for(col=1;col<=NCOLS;col++){ filled=FALSE; if((row==queenht_row) && (col==queenht_col)){ printf(" Q |"); filled = TRUE; continue; }…arrow_forward
- Textbook: Joyce Farrell, Microsoft® Visual C#®: An Introduction to Object-Oriented Programming, Seventh Edition, ISBN: 9781337102100.Microsoft Visual C# (chapter 5 code case problem 5-2) Assignment instruction: In Chapter 4 of your book, you created an interactive application named MarshallsRevenue that prompts a user for the number of interior and exterior murals scheduled to be painted during a month and computes the expected revenue for each type of mural. The program also prompts the user for the month number and modifies the pricing based on requirements listed in Chapter 4. Now, modify your program so that the user must enter a month value from 1 through 12. If the user enters an incorrect number, the program prompts for a valid value. Also, the user must enter a number between 0 and 30 inclusive for the number of murals of each type; otherwise, the program prompts the user again. In order to prepend the $ to currency values, the program will need to use the…arrow_forwardSearch Chapter 3 Project Project Name: Chpt3_Project Class Name: Chpt3_Project Write a Java program that generates a random number between 50 and 150 that represents the temperature in Celsius of a pot of boiling water on a stove, and determine if the water is hot enough cook the following vegetable: Beans: cook at 100 degrees Celsius Inputs: The program must prompt the user for the temperature that beans cook at. Enter the temperature in Celsius that beans cook at: Output: The program should tell the user if the water is hot enough to cook the beans. The water temperature is Celsius and is enough to cook beans. Example of a program run: Run the program three times and take a screen snipit after each run. Step 1. Create an algorithm (either flowchart or pseudocode) that you will use to write the program. Place the algorithm in a Word document. Step 2. Code the program in Eclipse and test the program to verify it works correctly. Be sure to run the program three times. Step 3. Use the…arrow_forwardname formatter on c# create an application that lets the user enter the following pieces of data: • the user’s first name • the user’s middle name • the user’s last name • the user’s preferred title (mr., mrs., ms., dr., etc.) assume the user has entered the following data: • first name: kelly • middle name: jane • last name: smith • title: ms. the application should have buttons that display the user’s name formatted in the following ways: ms. kelly jane smith kelly jane smith kelly smith smith, kelly jane, ms. smith, kelly jane smith, kellyarrow_forward
- IN C PROGRAMMING!!! Follow the prompt in the picture and make sure output matches example.arrow_forwardairport_codes = { } } San Francisco': 'SFO', 'Paris': 'CDG', 'London': 'LHR', 'San Jose': 'SJC', 'New York': 'JFK' new_airport_codes = { 'Vancouver': 'YVR', 'Seattle': 'SEA', 'New York': 'LGA' Type the program's output print (airport_codes.get ('New York', 'na')) print (airport_codes.get('Seattle', 'na')) airport_codes. update (new_airport_codes) print (airport_codes.get ('New York', 'na')) print (airport_codes.get ('Seattle', 'na'))arrow_forwardC++ beginnerarrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Programming with Microsoft Visual Basic 2017Computer ScienceISBN:9781337102124Author:Diane ZakPublisher:Cengage LearningC++ for Engineers and ScientistsComputer ScienceISBN:9781133187844Author:Bronson, Gary J.Publisher:Course Technology PtrProgramming Logic & Design ComprehensiveComputer ScienceISBN:9781337669405Author:FARRELLPublisher:Cengage
- EBK JAVA PROGRAMMINGComputer ScienceISBN:9781337671385Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENTEBK JAVA PROGRAMMINGComputer ScienceISBN:9781305480537Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENT
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:9781337102124
Author:Diane Zak
Publisher:Cengage Learning
C++ for Engineers and Scientists
Computer Science
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Course Technology Ptr
Programming Logic & Design Comprehensive
Computer Science
ISBN:9781337669405
Author:FARRELL
Publisher:Cengage
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781337671385
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781305480537
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT