This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <ctype.h> | |
int main() { | |
char sentence[100]; | |
int numberOfNumbers = 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
int main() { | |
char name[50]; | |
int numberOfElementsOfArray; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
int main() { | |
int n; | |
printf("Enter the number of x and y values: \n"); | |
scanf("%d", &n); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
while True: | |
print("Options:") | |
print("Enter 'add' to add two numbers") | |
print("Enter 'subtract' to subtract two numbers") | |
print("Enter 'multiply' to multiply two numbers") | |
print("Enter 'divide' to divide two numbers") | |
print("Enter 'quit' to end the program") | |
user_input = input(": ") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
points = 400 # use this as input for your submission | |
# establish the default prize value to None | |
prize = None | |
# use the points value to assign prizes to the correct prize names | |
if points <= 50: | |
prize = "wooden rabbit" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
points = 174 | |
points = 174 # use this input when submitting your answer | |
# set prize to default value of None | |
prize = None | |
# use the value of points to assign prize to the correct prize name | |
if points <= 50: | |
prize = "wooden rabbit" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class JavaApplication105 { | |
/** | |
* @param args the command line arguments | |
*/ | |
public static void main(String[] args) { | |
JFrame frame = new JFrame("Example"); | |
frame.setVisible(true); | |
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private readonly static string DBNAME = "Bonarego.db"; | |
public DataBase() | |
{ | |
CreateDataBase(); | |
} | |
public static string documentsFolder() | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a = [1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89] | |
for i in range(len(a)): | |
if a[i] < 5: | |
print(a[i]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name = input("What's your name?\n") | |
age = int(input("How old are you?\n")) | |
message = "You will turn 100 years old in {}".format(2019 + (100 - age)) | |
print(message) |
OlderNewer